-
Notifications
You must be signed in to change notification settings - Fork 382
/
Copy pathphpstan.neon.dist
43 lines (43 loc) · 2 KB
/
phpstan.neon.dist
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
includes:
# @see https://github.com/phpstan/phpstan-src/blob/b9f62d63f2deaa0a5e97f51073e41a422c48aa01/conf/bleedingEdge.neon
- phar://phpstan.phar/conf/bleedingEdge.neon
services:
-
class: AmpProject\AmpWP\Tests\PhpStan\ServiceContainerDynamicReturnTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension
-
class: AmpProject\AmpWP\Tests\PhpStan\ServicesDynamicReturnTypeExtension
tags:
- phpstan.broker.dynamicStaticMethodReturnTypeExtension
parameters:
level: 3
inferPrivatePropertyTypeFromConstructor: true
paths:
- %currentWorkingDirectory%/includes/
- %currentWorkingDirectory%/src/
bootstrapFiles:
- %currentWorkingDirectory%/tests/php/static-analysis-stubs/wordpress-defines.php
autoload_files:
- %currentWorkingDirectory%/tests/php/static-analysis-stubs/wordpress-defines.php
- %currentWorkingDirectory%/vendor/php-stubs/wordpress-stubs/wordpress-stubs.php
- %currentWorkingDirectory%/tests/php/static-analysis-stubs/wp-cli.php
- %currentWorkingDirectory%/tests/php/static-analysis-stubs/pwa.php
- %currentWorkingDirectory%/tests/php/static-analysis-stubs/twentyseventeen.php
- %currentWorkingDirectory%/tests/php/static-analysis-stubs/legacy-i18n.php
- %currentWorkingDirectory%/tests/php/static-analysis-stubs/gutenberg.php
- %currentWorkingDirectory%/vendor/autoload.php
- %currentWorkingDirectory%/amp.php
- %currentWorkingDirectory%/includes/amp-frontend-actions.php
- %currentWorkingDirectory%/includes/amp-post-template-functions.php
excludes_analyse:
# PHPStan cannot yet deal with view templates. See https://github.com/phpstan/phpstan/issues/351
- %currentWorkingDirectory%/includes/templates/amp-enabled-classic-editor-toggle.php
ignoreErrors:
# Uses func_get_args()
- '#^Function apply_filters(_ref_array)? invoked with [34567] parameters, 2 required\.$#'
# Setting src to false indicates a bundle of dependencies.
- '#^Property _WP_Dependency::\$src \(string\) does not accept false\.$#'
earlyTerminatingMethodCalls:
\WP_CLI:
- WP_CLI::error