Phan\Issue::emitWithParameters PHP Method

emitWithParameters() public static method

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
return void
    public static function emitWithParameters(string $type, string $file, int $line, array $template_parameters)
    {
        $issue = self::fromType($type);
        self::emitInstance($issue($file, $line, $template_parameters));
    }

Usage Example

示例#1
0
文件: Issue.php 项目: nagyistge/phan
 /**
  * @param CodeBase $code_base
  * The code base within which we're operating
  *
  * @param Context $context
  * The context in which the node we're going to be looking
  * at exits.
  *
  * @param string $issue_type
  * The type of issue to emit such as Issue::ParentlessClass
  *
  * @param int $lineno
  * The line number where the issue was found
  *
  * @param array parameters
  * Template parameters for the issue's error message
  *
  * @return void
  */
 public static function maybeEmitWithParameters(CodeBase $code_base, Context $context, string $issue_type, int $lineno, array $parameters)
 {
     if ($context->hasSuppressIssue($code_base, $issue_type)) {
         return;
     }
     Issue::emitWithParameters($issue_type, $context->getFile(), $lineno, $parameters);
 }
All Usage Examples Of Phan\Issue::emitWithParameters