-
Notifications
You must be signed in to change notification settings - Fork 3
/
phpstan.neon.dist
55 lines (52 loc) · 2.03 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
44
45
46
47
48
49
50
51
52
53
54
55
parameters:
paths:
# The commented paths might be considered maybe with an intial baseline.
#- api
#- Civi
#- CRM
#- tests
- Civi/RemoteTools
- services
- tests/phpunit/Civi
excludePaths:
analyse:
- CRM/Remotetools/DAO/*
- tests/phpunit/bootstrap.php
scanFiles:
- remotetools.civix.php
- tools/phpunit/vendor/bin/.phpunit/phpunit/src/Framework/TestCase.php
scanDirectories:
- tools/phpunit/vendor/bin/.phpunit/phpunit/src/Framework
bootstrapFiles:
- tools/phpunit/vendor/bin/.phpunit/phpunit/vendor/autoload.php
- phpstanBootstrap.php
level: 9
universalObjectCratesClasses:
- Civi\Core\Event\GenericHookEvent
- CRM_Core_Config
checkTooWideReturnTypesInProtectedAndPublicMethods: true
checkUninitializedProperties: true
checkMissingCallableSignature: true
treatPhpDocTypesAsCertain: false
exceptions:
check:
missingCheckedExceptionInThrows: true
tooWideThrowType: true
checkedExceptionClasses:
- \Webmozart\Assert\InvalidArgumentException
implicitThrows: false
ignoreErrors:
# Note paths are prefixed with "*/" to work with inspections in PHPStorm because of:
# https://youtrack.jetbrains.com/issue/WI-63891/PHPStan-ignoreErrors-configuration-isnt-working-with-inspections
-
identifier: missingType.generics
- '#^Method Civi\\RemoteTools\\Api4\\Action\\[^\s]+Action::getHandlerResult\(\) has Civi\\RemoteTools\\Exception\\ActionHandlerNotFoundException in PHPDoc @throws tag but it.s not thrown.$#'
- '#^Method Civi\\RemoteTools\\Api4\\Api4::createAction\(\) should return Civi\\Api4\\Generic\\AbstractAction but returns array|Civi\Api4\Generic\AbstractAction.$#'
- '#^Method Civi\\RemoteTools\\Fixture\\[^\s]+Fixture::[^\s]+ should return array\{id: int\} but returns array.$#'
-
message: '#caught "Exception" must be rethrown.#'
path: */tests/phpunit/Civi/*
-
message: '#^Call to static method Civi\\RemoteTools\\Util\\ArrayUtil::isJsonArray\(\) with .+ will always evaluate to (true|false).$#'
path: */tests/phpunit/Civi/RemoteTools/Util/ArrayUtilTest.php
tmpDir: .phpstan