forked from westonruter/syntax-highlighting-code-block
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpstan-baseline.php
27 lines (24 loc) · 1.09 KB
/
phpstan-baseline.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php declare( strict_types=1 );
$ignoreErrors = [];
$ignoreErrors[] = [
'message' => '#^Access to an undefined property WP_Block_Type\\:\\:\\$editor_script\\.$#',
'count' => 1,
'path' => '*', // Originally `__DIR__ . '/syntax-highlighting-code-block.php'`, but see https://youtrack.jetbrains.com/issue/WI-63891/PHPStan-ignoreErrors-configuration-isnt-working-with-inspections#focus=Comments-27-6188783.0-0
];
$ignoreErrors[] = [
'message' => '#^Access to an undefined property WP_Block_Type\\:\\:\\$editor_style\\.$#',
'count' => 1,
'path' => '*',
];
// See <https://github.com/phpstan/phpstan-src/pull/2277#issuecomment-1481954014>.
$ignoreErrors[] = [
'message' => '#^Call to function property_exists\\(\\) with WP_Block_Type and \'editor_script…\' will always evaluate to true\\.$#',
'count' => 1,
'path' => '*',
];
$ignoreErrors[] = [
'message' => '#^Call to function property_exists\\(\\) with WP_Block_Type and \'editor_style_handles\' will always evaluate to true\\.$#',
'count' => 1,
'path' => '*',
];
return [ 'parameters' => [ 'ignoreErrors' => $ignoreErrors ] ];