forked from contao/contao
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpstan.neon
74 lines (60 loc) · 3.27 KB
/
phpstan.neon
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
65
66
67
68
69
70
71
72
73
74
includes:
- vendor-bin/phpstan/config/config.php
- vendor-bin/phpstan/vendor/phpstan/phpstan/conf/bleedingEdge.neon
- vendor-bin/phpstan/vendor/phpstan/phpstan-phpunit/extension.neon
- vendor-bin/phpstan/vendor/phpstan/phpstan-phpunit/rules.neon
- vendor-bin/phpstan/vendor/phpstan/phpstan-symfony/extension.neon
- vendor-bin/phpstan/vendor/phpstan/phpstan-symfony/rules.neon
- vendor-bin/phpstan/vendor/slam/phpstan-extensions/conf/symfony-rules.neon
rules:
- TheCodingMachine\PHPStan\Rules\Exceptions\DoNotThrowExceptionBaseClassRule
- TheCodingMachine\PHPStan\Rules\Exceptions\ThrowMustBundlePreviousExceptionRule
parameters:
level: 6
featureToggles:
alwaysTrueAlwaysReported: false
detectDeadTypeInMultiCatch: false
disableCheckMissingIterableValueType: false
paths:
- %currentWorkingDirectory%/calendar-bundle/src
- %currentWorkingDirectory%/calendar-bundle/tests
- %currentWorkingDirectory%/comments-bundle/src
- %currentWorkingDirectory%/comments-bundle/tests
- %currentWorkingDirectory%/core-bundle/src
- %currentWorkingDirectory%/core-bundle/tests
- %currentWorkingDirectory%/faq-bundle/src
- %currentWorkingDirectory%/faq-bundle/tests
- %currentWorkingDirectory%/listing-bundle/src
- %currentWorkingDirectory%/maker-bundle/src
- %currentWorkingDirectory%/maker-bundle/tests
- %currentWorkingDirectory%/news-bundle/src
- %currentWorkingDirectory%/news-bundle/tests
- %currentWorkingDirectory%/newsletter-bundle/src
- %currentWorkingDirectory%/newsletter-bundle/tests
universalObjectCratesClasses:
- Contao\BackendUser
- Contao\Database\Result
- Contao\Model
- Contao\Template
excludePaths:
- %currentWorkingDirectory%/core-bundle/tests/Fixtures/*
- %currentWorkingDirectory%/core-bundle/tests/Functional/app/*
- %currentWorkingDirectory%/core-bundle/tests/Functional/var/*
ignoreErrors:
- identifier: missingType.iterableValue
# Ignore the symlink warning in the file system test, because we need to create relative symlinks
- message: '#Function symlink is unsafe to use, rely on Symfony component Filesystem::symlink instead\.#'
path: %currentWorkingDirectory%/core-bundle/tests/DependencyInjection/Compiler/ConfigureFilesystemPassTest.php
# Ignore the unused ModelMetadataTrait that will be removed in Contao 6
- '#Trait Contao\\CoreBundle\\File\\ModelMetadataTrait is used zero times and is not analysed\.#'
# Ignore the wrong return type hint of the UrlGeneratorInterface::generate() method
- '#Method Contao\\CoreBundle\\Picker\\AbstractPickerProvider::generateUrl\(\) never returns null so it can be removed from the return type\.#'
treatPhpDocTypesAsCertain: false
rememberPossiblyImpureFunctionValues: false
services:
- class: Contao\Tools\PHPStan\HelperReturnTypeExtension
tags: [phpstan.broker.dynamicMethodReturnTypeExtension]
- class: Contao\Tools\PHPStan\ExtensionReturnTypeExtension
tags: [phpstan.broker.dynamicMethodReturnTypeExtension]
- class: Contao\Tools\PHPStan\GraphReturnTypeExtension
tags: [phpstan.broker.dynamicMethodReturnTypeExtension]