File tree Expand file tree Collapse file tree 3 files changed +34
-7
lines changed Expand file tree Collapse file tree 3 files changed +34
-7
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ use Nexus \CsConfig \Factory ;
6
+ use PhpCsFixer \Finder ;
7
+ use Utils \PhpCsFixer \CodeIgniter4 ;
8
+
9
+ $ finder = Finder::create ()
10
+ ->files ()
11
+ ->in ([
12
+ __DIR__ . '/admin ' ,
13
+ __DIR__ . '/app ' ,
14
+ __DIR__ . '/public ' ,
15
+ ]);
16
+
17
+ $ overrides = [
18
+ 'no_blank_lines_after_phpdoc ' => false ,
19
+ ];
20
+
21
+ $ options = [
22
+ 'cacheFile ' => 'build/.no-header.php-cs-fixer.cache ' ,
23
+ 'finder ' => $ finder ,
24
+ ];
25
+
26
+ return Factory::create (new CodeIgniter4 (), $ overrides , $ options )->forProjects ();
Original file line number Diff line number Diff line change 9
9
$ finder = Finder::create ()
10
10
->files ()
11
11
->in ([
12
- __DIR__ . '/admin ' , // @todo relocate when `header_comment` is enabled
13
- __DIR__ . '/app ' , // @todo relocate when `header_comment` is enabled
14
- __DIR__ . '/public ' , // @todo relocate when `header_comment` is enabled
15
12
__DIR__ . '/system ' ,
16
13
__DIR__ . '/tests ' ,
17
14
__DIR__ . '/utils ' ,
20
17
->notName ('#Foobar.php$# ' )
21
18
->append ([
22
19
__FILE__ ,
20
+ __DIR__ . '/.no-header.php-cs-fixer.dist.php ' ,
23
21
__DIR__ . '/rector.php ' ,
24
22
__DIR__ . '/spark ' ,
25
23
]);
31
29
'finder ' => $ finder ,
32
30
];
33
31
34
- // @todo change to `forLibrary()` when `header_comment` is enabled
35
- return Factory::create (new CodeIgniter4 (), $ overrides , $ options )->forProjects ();
32
+ return Factory::create (new CodeIgniter4 (), $ overrides , $ options )->forLibrary (
33
+ 'CodeIgniter 4 framework ' ,
34
+ 'CodeIgniter Foundation ' ,
35
+
36
+ );
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ public function __construct()
20
20
$ this ->rules = [
21
21
'align_multiline_comment ' => ['comment_type ' => 'phpdocs_only ' ],
22
22
'array_indentation ' => true ,
23
- 'array_push ' => true , // risky
23
+ 'array_push ' => true ,
24
24
'array_syntax ' => ['syntax ' => 'short ' ],
25
25
'backtick_to_shell_exec ' => true ,
26
26
'binary_operator_spaces ' => [
@@ -196,7 +196,7 @@ public function __construct()
196
196
'no_alternative_syntax ' => false ,
197
197
'no_binary_string ' => true ,
198
198
'no_blank_lines_after_class_opening ' => true ,
199
- 'no_blank_lines_after_phpdoc ' => false , // @todo enable fully when `header_comment` is required
199
+ 'no_blank_lines_after_phpdoc ' => true ,
200
200
'no_blank_lines_before_namespace ' => false , // conflicts with `single_blank_line_before_namespace`
201
201
'no_break_comment ' => ['comment_text ' => 'no break ' ],
202
202
'no_closing_tag ' => true ,
You can’t perform that action at this time.
0 commit comments