PHP Class HippoPHP\Hippo\Checks\AbstractCheck

Author: James Brooks ([email protected])
Inheritance: implements HippoPHP\Hippo\Checks\CheckInterface
Show file Open project: hippophp/hippo

Protected Properties

Property Type Description
$checkResult HippoPHP\Hippo\CheckResult Result of the check.
$severity integer Severity that the check will produce.

Public Methods

Method Description
checkFile ( CheckContext $checkContext, Config $config ) : CheckResult Runs checks on the file.
setSeverity ( integer $severity ) : HippoPHP\Hippo\AbstractCheck Set the severity level of the check.

Protected Methods

Method Description
addViolation ( File $file, integer $line, integer $column, string $message, integer $severity = null ) Add a violation to the current file.
checkFileInternal ( CheckContext $checkContext, Config $config )

Method Details

addViolation() protected method

Add a violation to the current file.
protected addViolation ( File $file, integer $line, integer $column, string $message, integer $severity = null )
$file HippoPHP\Hippo\File
$line integer
$column integer
$message string
$severity integer

checkFile() public method

Runs checks on the file.
public checkFile ( CheckContext $checkContext, Config $config ) : CheckResult
$checkContext HippoPHP\Hippo\CheckContext
$config HippoPHP\Hippo\Config\Config
return HippoPHP\Hippo\CheckResult

checkFileInternal() abstract protected method

abstract protected checkFileInternal ( CheckContext $checkContext, Config $config )
$checkContext HippoPHP\Hippo\CheckContext
$config HippoPHP\Hippo\Config\Config

setSeverity() public method

Set the severity level of the check.
public setSeverity ( integer $severity ) : HippoPHP\Hippo\AbstractCheck
$severity integer
return HippoPHP\Hippo\AbstractCheck

Property Details

$checkResult protected property

Result of the check.
protected CheckResult,HippoPHP\Hippo $checkResult
return HippoPHP\Hippo\CheckResult

$severity protected property

Severity that the check will produce.
protected int $severity
return integer