PHP Class pchSvnKeywordsCheck, php-commit-hooks

Implements a check for required keywords on the modified or added files.
Inheritance: extends pchCheck
Show file Open project: kore/php-commit-hooks Class Usage Examples

Protected Properties

Property Type Description
$keywords array For each file type an array of keywords can be configured, each associated with a list of contained texts in the property with the name of the keyword.

Public Methods

Method Description
__construct ( array $keywords = null ) : void Construct from optional keywords configuration
checkKeywords ( pchRepository $repository, string $file ) : array Check keywords for a single file
validate ( pchRepository $repository ) : void Validate the current check

Method Details

__construct() public method

Construct from optional keywords configuration
public __construct ( array $keywords = null ) : void
$keywords array
return void

checkKeywords() public method

Check the keywords, as specified in the configuration, for one single file.
public checkKeywords ( pchRepository $repository, string $file ) : array
$repository pchRepository
$file string
return array

validate() public method

Validate the check on the specified repository. Returns an array of found issues.
public validate ( pchRepository $repository ) : void
$repository pchRepository
return void

Property Details

$keywords protected property

For each file type an array of keywords can be configured, each associated with a list of contained texts in the property with the name of the keyword.
protected array $keywords
return array