File tree Expand file tree Collapse file tree 3 files changed +21
-10
lines changed Expand file tree Collapse file tree 3 files changed +21
-10
lines changed Original file line number Diff line number Diff line change 4
4
/phpspec.yml
5
5
/phpunit.xml
6
6
/vendor /
7
+ /.php_cs.cache
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- /*
4
- * In order to make it work, fabpot/php-cs-fixer and sllh/php-cs-fixer-styleci-bridge must be installed globally
5
- * with composer.
6
- *
7
- * @link https://github.com/Soullivaneuh/php-cs-fixer-styleci-bridge
8
- * @link https://github.com/FriendsOfPHP/PHP-CS-Fixer
9
- */
3
+ $ config = PhpCsFixer \Config::create ();
4
+ $ config ->setRules ([
5
+ '@PSR2 ' => true ,
6
+ '@Symfony ' => true ,
7
+ 'array_syntax ' => [
8
+ 'syntax ' => 'short ' ,
9
+ ],
10
+ ]);
10
11
11
- use SLLH \StyleCIBridge \ConfigBridge ;
12
+ $ finder = PhpCsFixer \Finder::create ();
13
+ $ finder ->in ([
14
+ 'src ' ,
15
+ 'spec '
16
+ ]);
12
17
13
- return ConfigBridge::create ();
18
+ $ config ->setFinder ($ finder );
19
+
20
+ return $ config ;
Original file line number Diff line number Diff line change 22
22
"guzzlehttp/psr7" : " ^1.4" ,
23
23
"phpspec/phpspec" : " ^3.4 || ^4.2" ,
24
24
"phpspec/prophecy" : " >=1.8" ,
25
- "sebastian/comparator" : " >=2"
25
+ "sebastian/comparator" : " >=2" ,
26
+ "friendsofphp/php-cs-fixer" : " ^2.2"
26
27
},
27
28
"suggest" : {
28
29
"php-http/logger-plugin" : " PSR-3 Logger plugin" ,
35
36
}
36
37
},
37
38
"scripts" : {
39
+ "cs-check" : " vendor/bin/php-cs-fixer fix --dry-run" ,
40
+ "cs-fix" : " vendor/bin/php-cs-fixer fix" ,
38
41
"test" : " vendor/bin/phpspec run" ,
39
42
"test-ci" : " vendor/bin/phpspec run -c phpspec.ci.yml"
40
43
},
You can’t perform that action at this time.
0 commit comments