phplint
is a tool that can speed up linting of php files by running several lint processes at once.
$ composer require overtrue/phplint
$ ./vendor/bin/phplint ./ --exclude=vendor
more:
$ ./vendor/bin/phplint --help
use Overtrue\PHPLint\Linter;
$path = __DIR__ .'/app';
$exclude = ['vendor'];
$extensions = ['php'];
$linter = new Linter($path, $exclude, $extensions);
// get errors
$errors = $linter->lint();
//
// [
// '/path/to/foo.php' => 'Parse error: syntax error, unexpected '$key' (T_VARIABLE) on line 168',
// '/path/to/bar.php' => 'Parse error: syntax error, unexpected 'class' (T_CLASS), expecting ',' or ';' on line 28',
//]
MIT