PHP Class pchRunner, php-commit-hooks

Show file Open project: kore/php-commit-hooks Class Usage Examples

Protected Properties

Property Type Description
$checks array List of checks registered in the runner and executed by the runner.
$reporter pchReported Reporter used to report issues found by the checks.

Public Methods

Method Description
__construct ( ) : void Constructor for pchRunner
register ( pchCheck $check ) : void Register a check
run ( pchRepository $repository ) : void Run all checks and report them
setReporter ( pchReporter $reporter ) : void Set reporter

Method Details

__construct() public method

Initilizes instance properties.
public __construct ( ) : void
return void

register() public method

Register a check, which will be executed by the runner. Each check will be called in the order they are registerd.
public register ( pchCheck $check ) : void
$check pchCheck
return void

run() public method

Runs all registered checks, aggregates their found issues and passes them to the reporter, so the user will be notified in the configured way.
public run ( pchRepository $repository ) : void
$repository pchRepository
return void

setReporter() public method

Set the reporter used to report the issues found by the registered checks.
public setReporter ( pchReporter $reporter ) : void
$reporter pchReporter
return void

Property Details

$checks protected property

List of checks registered in the runner and executed by the runner.
protected array $checks
return array

$reporter protected property

Reporter used to report issues found by the checks.
protected pchReported $reporter
return pchReported