File tree 7 files changed +22
-13
lines changed
7 files changed +22
-13
lines changed Original file line number Diff line number Diff line change 42
42
'no_unused_imports ' => true ,
43
43
'align_multiline_comment ' => true ,
44
44
'array_indentation ' => true ,
45
+ 'blank_line_after_opening_tag ' => false ,
45
46
'header_comment ' => [
46
47
'header ' => $ header ,
47
48
'comment_type ' => 'PHPDoc ' ,
Original file line number Diff line number Diff line change 34
34
}
35
35
},
36
36
"require-dev" : {
37
- "friendsofphp/php-cs-fixer" : " ^3.57" ,
38
- "phpstan/phpstan" : " ^1.11" ,
39
- "rector/rector" : " ^1.1" ,
40
37
"phpunit/phpunit" : " ^10.5" ,
41
- "phpstan/phpstan-phpunit" : " ^1.3" ,
42
- "phpstan/extension-installer" : " ^1.3" ,
43
- "szepeviktor/phpstan-wordpress" : " ^1.3" ,
44
- "roots/wordpress" : " ^6.5"
38
+ "phpstan/phpstan" : " ^2.0" ,
39
+ "rector/rector" : " ^2.0" ,
40
+ "friendsofphp/php-cs-fixer" : " ^3.69" ,
41
+ "phpstan/extension-installer" : " ^1.4" ,
42
+ "szepeviktor/phpstan-wordpress" : " ^2.0" ,
43
+ "phpstan/phpstan-phpunit" : " ^2.0" ,
44
+ "roots/wordpress" : " ^6.7"
45
45
},
46
46
"config" : {
47
47
"allow-plugins" : {
48
- "phpstan/extension -installer" : true ,
49
- "roots/wordpress-core -installer" : true
48
+ "roots/wordpress-core -installer" : true ,
49
+ "phpstan/extension -installer" : true
50
50
}
51
51
},
52
52
"extra" : {
Original file line number Diff line number Diff line change 1
1
parameters :
2
2
level : 7
3
- checkGenericClassInNonGenericObjectType : false
4
3
paths :
5
4
- src
5
+ ignoreErrors :
6
+ -
7
+ identifier : missingType.generics
Original file line number Diff line number Diff line change 6
6
* Author: Dimitri BOUTEILLE <bonjour@dimitri-bouteille.fr>
7
7
*/
8
8
9
- use Rector \CodeQuality \Rector \Array_ \CallableThisArrayToAnonymousFunctionRector ;
10
9
use Rector \CodeQuality \Rector \Identical \SimplifyBoolIdenticalTrueRector ;
11
10
use Rector \CodeQuality \Rector \If_ \SimplifyIfReturnBoolRector ;
12
11
use Rector \Config \RectorConfig ;
31
30
])
32
31
->withSkip ([
33
32
SimplifyBoolIdenticalTrueRector::class,
34
- CallableThisArrayToAnonymousFunctionRector::class,
35
33
SimplifyIfReturnBoolRector::class,
36
34
]);
Original file line number Diff line number Diff line change @@ -44,7 +44,10 @@ public static function findClassName(?string $fileContent): ?string
44
44
45
45
$ namespace = null ;
46
46
if (preg_match ('#(^|\s)namespace(.*?)\s*;#sm ' , $ fileContent , $ m )) {
47
+ // @phpstan-ignore-next-line
47
48
$ namespace = $ m [2 ] ?? null ;
49
+
50
+ // @phpstan-ignore-next-line
48
51
$ namespace = $ namespace !== null ? trim ($ namespace ) : null ;
49
52
}
50
53
Original file line number Diff line number Diff line change @@ -151,7 +151,11 @@ public function register(): void
151
151
protected function buildRouteArgs (Route $ route ): array
152
152
{
153
153
$ actions = [];
154
- $ isDebug = $ this ->options ?->debug ?? false ;
154
+ $ isDebug = $ this ->options ?->debug;
155
+ if ($ isDebug === null ) {
156
+ $ isDebug = false ;
157
+ }
158
+
155
159
foreach ($ route ->actions as $ action ) {
156
160
$ actions [] = [
157
161
'methods ' => $ action ->methods ,
Original file line number Diff line number Diff line change 11
11
$ includeDirectory = __DIR__ . '/../web/wordpress/wp-includes ' ;
12
12
13
13
$ paths = [
14
+ '/load.php ' ,
14
15
'/functions.php ' ,
15
16
'/plugin.php ' ,
16
17
'/class-wp-http-response.php ' ,
You canβt perform that action at this time.
0 commit comments