PHP Class pchLintCheck, php-commit-hooks

Implements linter checks for all added or modified files.
Inheritance: extends pchCheck
Afficher le fichier Open project: kore/php-commit-hooks Class Usage Examples

Protected Properties

Свойство Type Description
$linters array Configured linters to check source files for validity

Méthodes publiques

Méthode Description
__construct ( array $linters = null ) : void Construct from linter configuration
lint ( pchRepository $repository, string $file ) : array Lint single file
validate ( pchRepository $repository ) : void Validate the current check

Method Details

__construct() public méthode

Construct from linter configuration
public __construct ( array $linters = null ) : void
$linters array
Résultat void

lint() public méthode

If issues with the passed file are found the function will return an array with the found issues, and an empty array otherwise.
public lint ( pchRepository $repository, string $file ) : array
$repository pchRepository
$file string
Résultat array

validate() public méthode

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

Property Details

$linters protected_oe property

Configured linters to check source files for validity
protected array $linters
Résultat array