Phan\Language\Element\TypedElement::getSuppressIssueList PHP 메소드

getSuppressIssueList() 공개 메소드

public getSuppressIssueList ( ) : array
리턴 array
    public function getSuppressIssueList() : array
    {
        return $this->suppress_issue_list ?: [];
    }

Usage Example

예제 #1
0
 /**
  * @param CodeBase $code_base
  * The code base in which the function exists
  *
  * @param TypedElement $element
  * Any element such as function, method, class
  *
  * @return void
  */
 private function analyzeTypedElement(CodeBase $code_base, TypedElement $element)
 {
     // Get the set of suppressed issues on the element
     $suppress_issue_list = $element->getSuppressIssueList();
     // Check to see if any are unused
     foreach ($suppress_issue_list as $issue_type => $use_count) {
         if (0 === $use_count) {
             $this->emitIssue($code_base, $element->getContext(), 'UnusedSuppression', "Element {$element->getFQSEN()} suppresses issue {$issue_type} but does not use it");
         }
     }
 }