PHP Класс Phan\Plugin

Plugins must extends this class and return an instance of themselves.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
analyzeClass ( CodeBase $code_base, Clazz $class ) : void
analyzeClass ( CodeBase $code_base, Clazz $class ) : void
analyzeFunction ( CodeBase $code_base, Func $function ) : void
analyzeFunction ( CodeBase $code_base, Func $function ) : void
analyzeMethod ( CodeBase $code_base, Method $method ) : void
analyzeMethod ( CodeBase $code_base, Method $method ) : void
analyzeNode ( CodeBase $code_base, Context $context, ast\Node $node, ast\Node $parent_node = null ) : void Analyze the given node in the given context after Phan has analyzed the node.
analyzeNode ( CodeBase $code_base, Context $context, ast\Node $node, ast\Node $parent_node = null ) : void
emitIssue ( CodeBase $code_base, Context $context, string $issue_type, string $issue_message, integer $severity = Issue::SEVERITY_NORMAL, integer $remediation_difficulty = Issue::REMEDIATION_B, integer $issue_type_id = Issue::TYPE_ID_UNKNOWN ) Emit an issue if it is not suppressed
emitIssue ( CodeBase $code_base, Context $context, string $issue_type, string $issue_message, integer $severity = Issue::SEVERITY_NORMAL, integer $remediation_difficulty = Issue::REMEDIATION_B, integer $issue_type_id = Issue::TYPE_ID_UNKNOWN ) Emit an issue if it is not suppressed
preAnalyzeNode ( CodeBase $code_base, Context $context, ast\Node $node ) : void Do a first-pass analysis of a node before Phan does its full analysis. This hook allows you to update types in the CodeBase before analysis happens.

Описание методов

analyzeClass() абстрактный публичный Метод

abstract public analyzeClass ( CodeBase $code_base, Clazz $class ) : void
$code_base CodeBase The code base in which the class exists
$class Phan\Language\Element\Clazz A class being analyzed
Результат void

analyzeClass() абстрактный публичный Метод

abstract public analyzeClass ( CodeBase $code_base, Clazz $class ) : void
$code_base CodeBase The code base in which the class exists
$class Phan\Language\Element\Clazz A class being analyzed
Результат void

analyzeFunction() абстрактный публичный Метод

abstract public analyzeFunction ( CodeBase $code_base, Func $function ) : void
$code_base CodeBase The code base in which the function exists
$function Phan\Language\Element\Func A function being analyzed
Результат void

analyzeFunction() абстрактный публичный Метод

abstract public analyzeFunction ( CodeBase $code_base, Func $function ) : void
$code_base CodeBase The code base in which the function exists
$function Phan\Language\Element\Func A function being analyzed
Результат void

analyzeMethod() абстрактный публичный Метод

abstract public analyzeMethod ( CodeBase $code_base, Method $method ) : void
$code_base CodeBase The code base in which the method exists
$method Phan\Language\Element\Method A method being analyzed
Результат void

analyzeMethod() абстрактный публичный Метод

abstract public analyzeMethod ( CodeBase $code_base, Method $method ) : void
$code_base CodeBase The code base in which the method exists
$method Phan\Language\Element\Method A method being analyzed
Результат void

analyzeNode() абстрактный публичный Метод

Analyze the given node in the given context after Phan has analyzed the node.
abstract public analyzeNode ( CodeBase $code_base, Context $context, ast\Node $node, ast\Node $parent_node = null ) : void
$code_base CodeBase The code base in which the node exists
$context Phan\Language\Context The context in which the node exits. This is the context inside the given node rather than the context outside of the given node
$node ast\Node The php-ast Node being analyzed.
$parent_node ast\Node
Результат void

analyzeNode() абстрактный публичный Метод

abstract public analyzeNode ( CodeBase $code_base, Context $context, ast\Node $node, ast\Node $parent_node = null ) : void
$code_base CodeBase The code base in which the node exists
$context Phan\Language\Context The context in which the node exits. This is the context inside the given node rather than the context outside of the given node
$node ast\Node The php-ast Node being analyzed.
$parent_node ast\Node
Результат void

emitIssue() публичный Метод

Emit an issue if it is not suppressed
public emitIssue ( CodeBase $code_base, Context $context, string $issue_type, string $issue_message, integer $severity = Issue::SEVERITY_NORMAL, integer $remediation_difficulty = Issue::REMEDIATION_B, integer $issue_type_id = Issue::TYPE_ID_UNKNOWN )
$code_base CodeBase The code base in which the issue was found
$context Phan\Language\Context The context in which the issue was found
$issue_type string A name for the type of issue such as 'PhanPluginMyIssue'
$issue_message string The complete issue message to emit such as 'class with fqsen \NS\Name is broken in some fashion'.
$severity integer A value from the set {Issue::SEVERITY_LOW, Issue::SEVERITY_NORMAL, Issue::SEVERITY_HIGH}.
$remediation_difficulty integer A guess at how hard the issue will be to fix from the set {Issue:REMEDIATION_A, Issue:REMEDIATION_B, ... Issue::REMEDIATION_F} with F being the hardest.
$issue_type_id integer

emitIssue() публичный Метод

Emit an issue if it is not suppressed
public emitIssue ( CodeBase $code_base, Context $context, string $issue_type, string $issue_message, integer $severity = Issue::SEVERITY_NORMAL, integer $remediation_difficulty = Issue::REMEDIATION_B, integer $issue_type_id = Issue::TYPE_ID_UNKNOWN )
$code_base CodeBase The code base in which the issue was found
$context Phan\Language\Context The context in which the issue was found
$issue_type string A name for the type of issue such as 'PhanPluginMyIssue'
$issue_message string The complete issue message to emit such as 'class with fqsen \NS\Name is broken in some fashion'.
$severity integer A value from the set {Issue::SEVERITY_LOW, Issue::SEVERITY_NORMAL, Issue::SEVERITY_HIGH}.
$remediation_difficulty integer A guess at how hard the issue will be to fix from the set {Issue:REMEDIATION_A, Issue:REMEDIATION_B, ... Issue::REMEDIATION_F} with F being the hardest.
$issue_type_id integer

preAnalyzeNode() абстрактный публичный Метод

Do a first-pass analysis of a node before Phan does its full analysis. This hook allows you to update types in the CodeBase before analysis happens.
abstract public preAnalyzeNode ( CodeBase $code_base, Context $context, ast\Node $node ) : void
$code_base CodeBase The code base in which the node exists
$context Phan\Language\Context The context in which the node exits. This is the context inside the given node rather than the context outside of the given node
$node ast\Node The php-ast Node being analyzed. The parent node of the given node (if one exists).
Результат void