-
Notifications
You must be signed in to change notification settings - Fork 447
/
.php-cs-fixer.php
25 lines (20 loc) · 988 Bytes
/
.php-cs-fixer.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->name('*.php')
// The next two rules are enabled by default, kept for clarity
->ignoreDotFiles(true)
->ignoreVCS(true)
// The pattern is matched against each found filename, thus:
// - The "/" is needed to avoid having "vendor" match "Newsvendor.php"
// - The presence of "node_modules" here doesn't prevent the Finder from recursing on it, so we merge these paths below at the "exclude()"
->notPath($ignoredDirectories = ['cypress/', 'js/', 'locale/', 'node_modules/', 'styles/', 'templates/', 'vendor/'])
// Ignore root based directories
->exclude(array_merge($ignoredDirectories, ['dtd', 'lib', 'registry', 'schemas', 'xml']));
$rules = include '.php_cs_rules';
require(__DIR__ . '/classes/dev/fixers/bootstrap.php');
$config = new PhpCsFixer\Config();
$config->registerCustomFixers(new PKP\dev\fixers\Fixers())
->setRules($rules)
->setFinder($finder);
return $config;