File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed
Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ $finder = PhpCsFixer\Finder::create()
1919 ])
2020;
2121
22- $ config = PhpCsFixer \Config::create ()
22+ $ config = new PhpCsFixer \Config ();
23+ $ config
2324 ->setRiskyAllowed (true )
2425 ->setRules ([
2526 '@PHP56Migration ' => true ,
Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ The example below will add two rules to the default list of PSR2 set rules:
2424 ->in(__DIR__)
2525 ;
2626
27- return PhpCsFixer\Config::create()
28- ->setRules([
27+ $config = new PhpCsFixer\Config();
28+ return $config ->setRules([
2929 '@PSR2' => true,
3030 'strict_param' => true,
3131 'array_syntax' => ['syntax' => 'short'],
@@ -51,8 +51,8 @@ The following example shows how to use all ``Symfony`` rules but the ``full_open
5151 ->exclude('somedir')
5252 ;
5353
54- return PhpCsFixer\Config::create()
55- ->setRules([
54+ $config = new PhpCsFixer\Config();
55+ return $config ->setRules([
5656 '@Symfony' => true,
5757 'full_opening_tag' => false,
5858 ])
@@ -66,7 +66,8 @@ configure them in your config file.
6666
6767 <?php
6868
69- return PhpCsFixer\Config::create()
69+ $config = new PhpCsFixer\Config();
70+ return $config
7071 ->setIndent("\t")
7172 ->setLineEnding("\r\n")
7273 ;
Original file line number Diff line number Diff line change @@ -151,19 +151,17 @@ Cache can be disabled via ``--using-cache`` option or config file:
151151
152152 <?php
153153
154- return PhpCsFixer\Config::create()
155- ->setUsingCache(false)
156- ;
154+ $config = new PhpCsFixer\Config();
155+ return $config->setUsingCache(false);
157156
158157 Cache file can be specified via ``--cache-file `` option or config file:
159158
160159.. code-block :: php
161160
162161 <?php
163162
164- return PhpCsFixer\Config::create()
165- ->setCacheFile(__DIR__.'/.php_cs.cache')
166- ;
163+ $config = new PhpCsFixer\Config();
164+ return $config->setCacheFile(__DIR__.'/.php_cs.cache');
167165
168166 Using PHP CS Fixer on CI
169167------------------------
You can’t perform that action at this time.
0 commit comments