File tree Expand file tree Collapse file tree 4 files changed +1574
-2
lines changed
Expand file tree Collapse file tree 4 files changed +1574
-2
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ $ myStandardName = 'SymfonyCustom ' ;
4+
5+ require_once __DIR__ .'/vendor/squizlabs/php_codesniffer/tests/bootstrap.php ' ;
6+
7+ // Add this Standard
8+ PHP_CodeSniffer \Config::setConfigData (
9+ 'installed_paths ' ,
10+ __DIR__ .DIRECTORY_SEPARATOR .'SymfonyCustom ' ,
11+ true
12+ );
13+
14+ // Ignore all other Standards in tests
15+ $ standards = PHP_CodeSniffer \Util \Standards::getInstalledStandards ();
16+ $ standards [] = 'Generic ' ;
17+
18+ $ ignoredStandardsStr = implode (
19+ ', ' ,
20+ array_filter (
21+ $ standards ,
22+ function ($ v ) use ($ myStandardName ) {
23+ return $ v !== $ myStandardName ;
24+ }
25+ )
26+ );
27+
28+ putenv ("PHPCS_IGNORE_TESTS= {$ ignoredStandardsStr }" );
Original file line number Diff line number Diff line change 1717 ],
1818 "require" : {
1919 "squizlabs/php_codesniffer" : " 3.2.*"
20+ },
21+ "require-dev" : {
22+ "phpunit/phpunit" : " ^6.0"
2023 }
2124}
You can’t perform that action at this time.
0 commit comments