-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathphpstan.neon
More file actions
91 lines (81 loc) · 3.7 KB
/
phpstan.neon
File metadata and controls
91 lines (81 loc) · 3.7 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
- vendor/pepakriz/phpstan-exception-rules/extension.neon
- packages/PHPStan/extension.neon
- vendor/phpstan/phpstan-symfony/extension.neon
- vendor/phpstan/phpstan-symfony/rules.neon
- vendor/phpstan/phpstan-doctrine/extension.neon
- vendor/phpstan/phpstan-doctrine/rules.neon
parameters:
level: max
paths:
- src
- bin
- tests
# checkUninitializedProperties: true # TODO: enable later
excludePaths:
- tests/bootstrap.php
- tests/object-manager.php
- tests/GitRepository/
- src/Infrastructure/Symfony/Config
symfony:
container_xml_path: var/cache/dev/Peon_Infrastructure_Symfony_PeonKernelDevDebugContainer.xml
doctrine:
objectManagerLoader: tests/object-manager.php
ignoreErrors:
# Scenario with general wrapping to make it safer
- '#^Throwable is never thrown in the corresponding try block$#'
# Workaround, before better validation forms is solved
- '#^Peon\\Domain\\Task\\Exception\\InvalidCronExpression is never thrown in the corresponding try block$#'
# Ignore missing throws annotations for data fixtures
-
message: '#^Missing \@throws#'
path: tests/DataFixtures/DataFixtures.php
# Ignore missing throws annotations for data diffs
-
message: '#^Missing \@throws #'
path: src/Infrastructure/Cookbook/StaticRecipesCollection.php
# These are actually never thrown
-
message: '#^Missing \@throws \\Peon\\Domain\\Job\\Exception\\Job#'
path: src/Ui/Controller/DefineTaskController.php
-
message: '#^Missing \@throws \\Peon\\Domain\\Task\\Exception\\TaskNotFound#'
path: src/Ui/Controller/DefineTaskController.php
-
message: '#^Missing \@throws \\Peon\\Domain\\Job\\Exception\\Job#'
path: src/Ui/Controller/RedefineTaskController.php
# Ignore missing throws annotations for data diffs
-
message: '#^Missing \@throws #'
path: src/Infrastructure/Persistence/Doctrine/Migrations
-
message: '#^PHPDoc tag \@throws with type Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException is not compatible with parent#'
path: src/Infrastructure/Symfony/ControllerArgumentValueResolvers/UserIdArgumentValueResolver.php
-
message: '#^PHPDoc tag \@throws with type#'
path: src/Infrastructure/GitProvider/ProxyGitProvider.php
exceptionRules:
reportUnusedCatchesOfUncheckedExceptions: true
reportUnusedCheckedThrowsInSubtypes: false
reportCheckedThrowsInGlobalScope: false
uncheckedExceptions:
- LogicException # TODO: consider changing it to runtime exception or maybe switch to "checked" exceptions instead
- Nette\IOException
- PHPUnit\Framework\Exception
- Symfony\Component\Form\Exception\OutOfBoundsException
- Symfony\Component\Form\Exception\RuntimeException
- Symfony\Component\HttpKernel\Exception\NotFoundHttpException
- Doctrine\DBAL\Driver\Exception
- Doctrine\DBAL\Exception
- Twig\Error\Error
- Nette\Utils\JsonException
- Symfony\Component\Filesystem\Exception\IOException
- Github\Exception\MissingArgumentException
methodWhitelist:
PHPUnit\Framework\TestCase: '#.*#i'
methodThrowTypeDeclarations:
Cron\CronExpression:
__construct:
- InvalidArgumentException