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 11{
22 "name" : " studservis/php-cs-fixer-ruleset" ,
3+ "authors" : [
4+ {
5+ "name" : " samizdam" ,
6+ 7+ }
8+ ],
39 "description" : " StudService shared PHP style rules for PHP-CS-Fixer" ,
410 "license" : " MIT" ,
511 "require" : {
Original file line number Diff line number Diff line change 55use PhpCsFixer \Config ;
66use PhpCsFixer \ConfigInterface ;
77
8- function build_config (iterable $ finder , array $ rules ): ConfigInterface
8+ function build_config (iterable $ finder , array $ rules = [] ): ConfigInterface
99{
1010 $ rules = array_merge (require __DIR__ .'/rules.php ' , $ rules );
1111
You can’t perform that action at this time.
0 commit comments