File tree 4 files changed +1574
-2
lines changed
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 17
17
],
18
18
"require" : {
19
19
"squizlabs/php_codesniffer" : " 3.2.*"
20
+ },
21
+ "require-dev" : {
22
+ "phpunit/phpunit" : " ^6.0"
20
23
}
21
24
}
You can’t perform that action at this time.
0 commit comments