Phan\Language\Element\TypedElement::getSuppressIssueList PHP Method

getSuppressIssueList() public method

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

Usage Example

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");
         }
     }
 }