PHP Класс Phan\Issue

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( string $type, integer $category, integer $severity, string $template, integer $remediation_difficulty, integer $type_id )
__invoke ( string $file, integer $line, array $template_parameters = [] ) : phan\IssueInstance
emit ( string $type, string $file, integer $line, variadic $template_parameters ) : void
emitInstance ( phan\IssueInstance $issue_instance ) : void
emitWithParameters ( string $type, string $file, integer $line, array $template_parameters ) : void
fromType ( string $type ) : Issue return Issue
getCategory ( ) : integer
getNameForCategory ( integer $category ) : string
getRemediationDifficulty ( ) : integer
getSeverity ( ) : integer
getSeverityName ( ) : string
getTemplate ( ) : string
getType ( ) : string
getTypeId ( ) : integer
issueMap ( ) : Issue[]
maybeEmit ( CodeBase $code_base, Context $context, string $issue_type, integer $lineno, $parameters ) : void
maybeEmit ( CodeBase $code_base, Context $context, string $issue_type, integer $lineno, $parameters ) : void
maybeEmitInstance ( CodeBase $code_base, Context $context, phan\IssueInstance $issue_instance ) : void
maybeEmitInstance ( CodeBase $code_base, Context $context, phan\IssueInstance $issue_instance ) : void
maybeEmitWithParameters ( CodeBase $code_base, Context $context, string $issue_type, integer $lineno, array $parameters ) : void
maybeEmitWithParameters ( CodeBase $code_base, Context $context, string $issue_type, integer $lineno, array $parameters ) : void

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

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

public __construct ( string $type, integer $category, integer $severity, string $template, integer $remediation_difficulty, integer $type_id )
$type string
$category integer
$severity integer
$template string
$remediation_difficulty integer
$type_id integer (unique integer id for $type)

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

public __invoke ( string $file, integer $line, array $template_parameters = [] ) : phan\IssueInstance
$file string
$line integer
$template_parameters array
Результат phan\IssueInstance

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

public static emit ( string $type, string $file, integer $line, variadic $template_parameters ) : void
$type string The type of the issue
$file string The name of the file where the issue was found
$line integer The line number (start) where the issue was found
$template_parameters variadic Any template parameters required for the issue message
Результат void

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

public static emitInstance ( phan\IssueInstance $issue_instance ) : void
$issue_instance phan\IssueInstance An issue instance to emit
Результат void

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

public static emitWithParameters ( string $type, string $file, integer $line, array $template_parameters ) : void
$type string The type of the issue
$file string The name of the file where the issue was found
$line integer The line number (start) where the issue was found
$template_parameters array Any template parameters required for the issue message
Результат void

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

return Issue
public static fromType ( string $type ) : Issue
$type string
Результат Issue

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

public getCategory ( ) : integer
Результат integer

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

public static getNameForCategory ( integer $category ) : string
$category integer
Результат string The name of the category

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

public getRemediationDifficulty ( ) : integer
Результат integer

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

public getSeverity ( ) : integer
Результат integer

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

public getSeverityName ( ) : string
Результат string A descriptive name of the severity of hte issue

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

public getTemplate ( ) : string
Результат string

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

public getType ( ) : string
Результат string

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

public getTypeId ( ) : integer
Результат integer (Unique integer code corresponding to getType())

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

public static issueMap ( ) : Issue[]
Результат Issue[]

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

public static maybeEmit ( CodeBase $code_base, Context $context, string $issue_type, integer $lineno, $parameters ) : void
$code_base CodeBase The code base within which we're operating
$context Phan\Language\Context The context in which the node we're going to be looking at exits.
$issue_type string The type of issue to emit such as Issue::ParentlessClass
$lineno integer The line number where the issue was found
Результат void

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

public static maybeEmit ( CodeBase $code_base, Context $context, string $issue_type, integer $lineno, $parameters ) : void
$code_base CodeBase The code base within which we're operating
$context Phan\Language\Context The context in which the node we're going to be looking at exits.
$issue_type string The type of issue to emit such as Issue::ParentlessClass
$lineno integer The line number where the issue was found
Результат void

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

public static maybeEmitInstance ( CodeBase $code_base, Context $context, phan\IssueInstance $issue_instance ) : void
$code_base CodeBase The code base within which we're operating
$context Phan\Language\Context The context in which the instance was found
$issue_instance phan\IssueInstance An issue instance to emit
Результат void

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

public static maybeEmitInstance ( CodeBase $code_base, Context $context, phan\IssueInstance $issue_instance ) : void
$code_base CodeBase The code base within which we're operating
$context Phan\Language\Context The context in which the instance was found
$issue_instance phan\IssueInstance An issue instance to emit
Результат void

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

public static maybeEmitWithParameters ( CodeBase $code_base, Context $context, string $issue_type, integer $lineno, array $parameters ) : void
$code_base CodeBase The code base within which we're operating
$context Phan\Language\Context The context in which the node we're going to be looking at exits.
$issue_type string The type of issue to emit such as Issue::ParentlessClass
$lineno integer The line number where the issue was found
$parameters array
Результат void

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

public static maybeEmitWithParameters ( CodeBase $code_base, Context $context, string $issue_type, integer $lineno, array $parameters ) : void
$code_base CodeBase The code base within which we're operating
$context Phan\Language\Context The context in which the node we're going to be looking at exits.
$issue_type string The type of issue to emit such as Issue::ParentlessClass
$lineno integer The line number where the issue was found
$parameters array
Результат void