File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change
1
+ # Набор правил php-cs-fixer для Студсервис
2
+
3
+ ## Install
4
+
5
+ ``` shell
6
+ composer require --dev studservis/php-cs-fixer-ruleset
7
+ ```
8
+
9
+ ## Usage
10
+
11
+ ``` php
12
+ <?php
13
+ // .php-cs-fixer.dist.php
14
+
15
+ $finder = PhpCsFixer\Finder::create()
16
+ ->in([
17
+ './application/',
18
+ './tests/'
19
+ );
20
+
21
+ $overridedProjectRules = [...];
22
+
23
+ return \StudService\PhpCsFixer\build_config($finder, $overridedProjectRules);
24
+ ```
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " studservis/php-cs-fixer-ruleset" ,
3
+ "authors" : [
4
+ {
5
+ "name" : " samizdam" ,
6
+
7
+ }
8
+ ],
3
9
"description" : " StudService shared PHP style rules for PHP-CS-Fixer" ,
4
10
"license" : " MIT" ,
5
11
"require" : {
Original file line number Diff line number Diff line change 5
5
use PhpCsFixer \Config ;
6
6
use PhpCsFixer \ConfigInterface ;
7
7
8
- function build_config (iterable $ finder , array $ rules ): ConfigInterface
8
+ function build_config (iterable $ finder , array $ rules = [] ): ConfigInterface
9
9
{
10
10
$ rules = array_merge (require __DIR__ .'/rules.php ' , $ rules );
11
11
You can’t perform that action at this time.
0 commit comments