-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathphpstan.neon.dist
37 lines (37 loc) · 1.53 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
parameters:
paths:
- src
- tests
- modules/json_forms_example/src
scanFiles:
- vendor/drupal/core/tests/Drupal/Tests/UnitTestCase.php
bootstrapFiles:
- vendor/autoload.php
level: 9
checkTooWideReturnTypesInProtectedAndPublicMethods: true
checkUninitializedProperties: true
checkMissingCallableSignature: true
treatPhpDocTypesAsCertain: false
exceptions:
check:
missingCheckedExceptionInThrows: true
tooWideThrowType: true
checkedExceptionClasses:
- \Assert\AssertionFailedException
implicitThrows: false
ignoreErrors:
# Note paths are prefixed with ""*/" to wirk with inspections in PHPStorm because of:
# https://youtrack.jetbrains.com/issue/WI-63891/PHPStan-ignoreErrors-configuration-isnt-working-with-inspections
# Wrong phpdoc type hint in Drupal
- '/^Parameter #1 \$key of method Drupal\\Core\\Form\\FormStateInterface::hasTemporaryValue\(\) expects string, array<int\|string> given.$/'
- '#^Method Drupal\\Core\\Form\\FormBuilderInterface::getForm\(\) invoked with \d+ parameters, 1 required.$#'
-
message: '#^Variable property access on mixed.$#'
paths:
- */src/JsonForms/Definition/Control/ControlDefinition.php
- */src/JsonForms/Definition/Layout/LayoutDefinition.php
-
message: '#^Argument of an invalid type stdClass supplied for foreach, only iterables are supported.$#'
path: */src/Form/Control/ObjectArrayFactory.php
- '#^Method Drupal\\json_forms\\JsonForms\\Definition\\Control\\[^\s]+ControlDefinition::[^\s]+\(\) should return [^\s]+\|null but returns mixed.$#'
tmpDir: .phpstan