getContext() public method

public getContext ( ) : Context
return Phan\Language\Context The context in which this structural element exists
Exemplo n.º 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");
         }
     }
 }
Exemplo n.º 2
0
 public function getContext() : Context
 {
     return $this->element->getContext();
 }