PHP Class Phan\Issue

Afficher le fichier Open project: etsy/phan Class Usage Examples

Méthodes publiques

Méthode Description
__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

Method Details

__construct() public méthode

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 méthode

public __invoke ( string $file, integer $line, array $template_parameters = [] ) : phan\IssueInstance
$file string
$line integer
$template_parameters array
Résultat phan\IssueInstance

emit() public static méthode

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
Résultat void

emitInstance() public static méthode

public static emitInstance ( phan\IssueInstance $issue_instance ) : void
$issue_instance phan\IssueInstance An issue instance to emit
Résultat void

emitWithParameters() public static méthode

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
Résultat void

fromType() public static méthode

return Issue
public static fromType ( string $type ) : Issue
$type string
Résultat Issue

getCategory() public méthode

public getCategory ( ) : integer
Résultat integer

getNameForCategory() public static méthode

public static getNameForCategory ( integer $category ) : string
$category integer
Résultat string The name of the category

getRemediationDifficulty() public méthode

public getRemediationDifficulty ( ) : integer
Résultat integer

getSeverity() public méthode

public getSeverity ( ) : integer
Résultat integer

getSeverityName() public méthode

public getSeverityName ( ) : string
Résultat string A descriptive name of the severity of hte issue

getTemplate() public méthode

public getTemplate ( ) : string
Résultat string

getType() public méthode

public getType ( ) : string
Résultat string

getTypeId() public méthode

public getTypeId ( ) : integer
Résultat integer (Unique integer code corresponding to getType())

issueMap() public static méthode

public static issueMap ( ) : Issue[]
Résultat Issue[]

maybeEmit() public static méthode

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
Résultat void

maybeEmit() public static méthode

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
Résultat void

maybeEmitInstance() public static méthode

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
Résultat void

maybeEmitInstance() public static méthode

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
Résultat void

maybeEmitWithParameters() public static méthode

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
Résultat void

maybeEmitWithParameters() public static méthode

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
Résultat void