當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PHP_PMD_AbstractNode::getImage方法代碼示例

本文整理匯總了PHP中PHP_PMD_AbstractNode::getImage方法的典型用法代碼示例。如果您正苦於以下問題:PHP PHP_PMD_AbstractNode::getImage方法的具體用法?PHP PHP_PMD_AbstractNode::getImage怎麽用?PHP PHP_PMD_AbstractNode::getImage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PHP_PMD_AbstractNode的用法示例。


在下文中一共展示了PHP_PMD_AbstractNode::getImage方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: checkNodeImage

 /**
  * {@inheritdoc}
  */
 protected function checkNodeImage(PHP_PMD_AbstractNode $node)
 {
     $excludedVariables = explode('|', $this->getStringProperty('excludeVariables'));
     if (!in_array($node->getImage(), $excludedVariables)) {
         parent::checkNodeImage($node);
     }
 }
開發者ID:alexisfroger,項目名稱:pim-community-dev,代碼行數:10,代碼來源:ShortVariableWithExclusion.php

示例2: apply

 public function apply(PHP_PMD_AbstractNode $node)
 {
     $staticReferences = $node->findChildrenOfType('ClassOrInterfaceReference');
     foreach ($staticReferences as $reference) {
         if ($this->isReferenceInParameter($reference)) {
             continue;
         }
         $this->addViolation($reference, array($reference->getImage(), $node->getImage()));
     }
 }
開發者ID:syntropysoftware,項目名稱:cryptoffice-frontend,代碼行數:10,代碼來源:StaticAccess.php

示例3: apply

 public function apply(PHP_PMD_AbstractNode $node)
 {
     foreach ($node->findChildrenOfType('FormalParameter') as $param) {
         $declarator = $param->getFirstChildOfType('VariableDeclarator');
         $value = $declarator->getValue();
         if (!$this->isBooleanValue($value)) {
             continue;
         }
         $this->addViolation($param, array($node->getImage(), $declarator->getImage()));
     }
 }
開發者ID:syntropysoftware,項目名稱:cryptoffice-frontend,代碼行數:11,代碼來源:BooleanArgumentFlag.php

示例4: apply

 public function apply(PHP_PMD_AbstractNode $node)
 {
     return;
     // not good enough, if, elseif,... nest each other and get detected by this rule :(
     foreach ($node->findChildrenOfType('ScopeStatement') as $scope) {
         if (!$this->isNestedScope($scope)) {
             continue;
         }
         $this->addViolation($scope, array($node->getImage()));
     }
 }
開發者ID:syntropysoftware,項目名稱:cryptoffice-frontend,代碼行數:11,代碼來源:NestedScopes.php

示例5: apply

 public function apply(PHP_PMD_AbstractNode $node)
 {
     foreach ($node->findChildrenOfType('ScopeStatement') as $scope) {
         $parent = $scope->getParent();
         if (!$this->isIfOrElseIfStatement($parent)) {
             continue;
         }
         if (!$this->isElseScope($scope, $parent)) {
             continue;
         }
         $this->addViolation($scope, array($node->getImage()));
     }
 }
開發者ID:syntropysoftware,項目名稱:cryptoffice-frontend,代碼行數:13,代碼來源:ElseExpression.php

示例6: isNotSuperGlobal

 /**
  * Tests if the given variable represents one of the PHP super globals
  * that are available in scopes.
  *
  * @param PHP_PMD_AbstractNode $variable The currently analyzed variable node.
  *
  * @return boolean
  */
 protected function isNotSuperGlobal(PHP_PMD_AbstractNode $variable)
 {
     return !isset(self::$_superGlobals[$variable->getImage()]);
 }
開發者ID:n2bh,項目名稱:phpmd,代碼行數:12,代碼來源:AbstractLocalVariable.php

示例7: isNotProcessed

 /**
  * Checks if the given node was already processed.
  *
  * @param PHP_PMD_AbstractNode $node The node to check.
  *
  * @return boolean
  */
 protected function isNotProcessed(PHP_PMD_AbstractNode $node)
 {
     return !isset($this->processedVariables[$node->getImage()]);
 }
開發者ID:syntropysoftware,項目名稱:cryptoffice-frontend,代碼行數:11,代碼來源:LongVariable.php


注:本文中的PHP_PMD_AbstractNode::getImage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。