-
Notifications
You must be signed in to change notification settings - Fork 1
/
phpstan.neon.dist
42 lines (35 loc) · 1.31 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
# Configuration for PHPStan
# https://phpstan.org/config-reference
includes:
# @see https://github.com/phpstan/phpstan-src/blob/master/conf/bleedingEdge.neon
- phar://phpstan.phar/conf/bleedingEdge.neon
# Include this extension
- plugin-starter/vendor/szepeviktor/phpstan-wordpress/extension.neon
parameters:
level: max
inferPrivatePropertyTypeFromConstructor: true
# Paths to be analyzed.
paths:
- %currentWorkingDirectory%/plugin-starter/
- %currentWorkingDirectory%/plugin-starter.php
# Paths to ignore.
excludePaths:
- %currentWorkingDirectory%/plugin-starter/vendor/*
scanFiles:
- %currentWorkingDirectory%/plugin-starter/vendor/php-stubs/wordpress-tests-stubs/wordpress-tests-stubs.php
- %currentWorkingDirectory%/plugin-starter.php
bootstrapFiles:
- %currentWorkingDirectory%/tests/phpstan-bootstrap.php
# Additional checks.
polluteScopeWithLoopInitialAssignments: true
polluteScopeWithAlwaysIterableForeach: true
checkAlwaysTrueCheckTypeFunctionCall: true
checkAlwaysTrueInstanceof: true
checkAlwaysTrueStrictComparison: true
checkExplicitMixedMissingReturn: true
checkFunctionNameCase: true
reportMaybesInMethodSignatures: true
reportStaticMethodSignatures: true
checkTooWideReturnTypesInProtectedAndPublicMethods: true
checkUninitializedProperties: true
checkMissingIterableValueType: true