-
Notifications
You must be signed in to change notification settings - Fork 2
/
phpstan.neon.dist
64 lines (61 loc) · 3.9 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
56
57
58
59
60
61
62
63
64
parameters:
paths:
- src
- tests
- civiremote_funding.module
scanFiles:
- vendor/drupal/core/tests/Drupal/Tests/UnitTestCase.php
- vendor/drupal/core/modules/file/file.module
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 work with inspections in PHPStorm because of:
# https://youtrack.jetbrains.com/issue/WI-63891/PHPStan-ignoreErrors-configuration-isnt-working-with-inspections
- '/^Method Drupal\\Core\\Form\\FormBuilderInterface::getForm\(\) invoked with \d+ parameters, 1 required.$/'
- '#^Method Drupal\\civiremote_funding\\Form\\[^\s]+Form::(buildForm|submitForm)\(\) has parameter \$form with no value type specified in iterable type array.$#'
- '#^Method Drupal\\civiremote_funding\\Form\\[^\s]+Form::buildForm\(\) return type has no value type specified in iterable type array.$#'
# Happens in classes implementing ContainerInjectionInterface::create()
- '/ constructor expects [^\s]+, object given.$/'
-
message: '/^Parameter #1 \$value of static method Drupal\\civiremote_funding\\Api\\[^:]+::fromApiResultValue\(\) expects array\{.+\}, array<int\|string, mixed> given.$/'
path: */Api/FundingApi.php
-
message: '/^Parameter #1 \$arrays of static method Drupal\\civiremote_funding\\Api\\DTO\\[^:]+::allFromArrays\(\) expects array<.+>, array<int\|string, mixed> given.$/'
path: */Api/FundingApi.php
- '/ no value type specified in iterable type Drupal\\file\\FileInterface/'
- '/^Access to an undefined property Drupal\\Core\\Field\\FieldItemListInterface::\$(value|entity|target_id).$/'
- '/::delete\(\) should be contravariant with parameter \$entities \(array\) of method Drupal\\Core\\Entity\\[^\s]+::delete\(\)$/'
- '/^Concat: Do not cast objects magically, please use `__toString` here, Drupal\\Core\\StringTranslation\\TranslatableMarkup and .+ found.$/'
- '/^Method Drupal\\civiremote_funding\\Element\\[^\s]+::getInfo\(\) return type has no value type specified in iterable type array.$/'
- '/^Method Drupal\\civiremote_funding\\Element\\[^\s]+::preRender[^\s]+\(\) has parameter \$element with no value type specified in iterable type array.$/'
- '/^Method Drupal\\civiremote_funding\\Element\\[^\s]+::preRender[^\s]+\(\) return type has no value type specified in iterable type array.$/'
-
message: '/ no value type specified in iterable type /'
path: '*/tests/src/Unit/File/Entity/AbstractEntityMock.php'
-
message: '/ never returns [^\s]+ so it can be removed from the return type.$/'
path: '*/tests/src/Unit/File/Entity/*Mock.php'
# LanguageAwareNumericField contains code from Drupal.
- '/^Method Drupal\\civiremote_funding\\Plugin\\views\\field\\LanguageAwareNumericField::[^\s]+ has parameter [^\s]+ with no type specified.$/'
- '/^Method Drupal\\civiremote_funding\\Plugin\\views\\field\\LanguageAwareNumericField::[^\s]+ has parameter [^\s]+ with no value type specified in iterable type array.$/'
- '/^Method Drupal\\civiremote_funding\\Plugin\\views\\field\\LanguageAwareNumericField::[^\s]+ return type has no value type specified in iterable type array.$/'
- '/^Method Drupal\\civiremote_funding\\Plugin\\views\\field\\LanguageAwareNumericField::render\(\) never returns/'
-
message: '/^Construct empty\(\) is not allowed. Use more strict comparison.$/'
path: '*/src/Plugin/views/field/LanguageAwareNumericField.php'
-
message: '/^Concat: Do not cast objects magically, please use `__toString` here, Drupal\\views\\Render\\ViewsRenderPipelineMarkup and string found.$/'
path: '*/src/Plugin/views/field/LanguageAwareNumericField.php'
tmpDir: .phpstan