generated from DJTommek/php-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathphpstan.neon
110 lines (104 loc) · 5.34 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
parameters:
level: 6
paths:
- src
- tests
- data/config.local.php
bootstrapFiles:
- src/bootstrap.php
treatPhpDocTypesAsCertain: false
tmpDir: temp/phpstan
additionalConstructors:
- App\Web\MainPresenter::setDependencies
- App\TelegramCustomWrapper\Events\Events::setDependencies
- App\Web\Admin\AdminTemplate::prepare
- PHPUnit\Framework\TestCase::setUp
- Tests\HttpTestClients::createRealHttpClient
- Tests\HttpTestClients::createOfflineHttpClient
- Tests\HttpTestClients::createMockedHttpClient
excludePaths:
- 'src\libs\Utils\MGRS.php' # Not my class
ignoreErrors:
-
message: "#^Access to an undefined property DJTommek\\\\MapyCzApi\\\\Types\\\\.+$#"
-
message: "#^Property unreal4u\\\\TelegramAPI\\\\Telegram\\\\Methods\\\\.+ does not accept .+\\.$#"
-
message: "#^Property unreal4u\\\\TelegramAPI\\\\Telegram\\\\Types\\\\.+ does not accept .+\\.$#"
-
message: "#^Property unreal4u\\\\TelegramAPI\\\\Telegram\\\\Types\\\\.+ left side of \\?\\? is not nullable\\.$#"
-
message: "#^Using nullsafe property access on non-nullable type unreal4u\\\\TelegramAPI\\\\Telegram\\\\Types\\\\.+\\. Use -> instead\\.$#"
-
message: "#^Access to an undefined property App\\\\Web\\\\LayoutTemplate\\:\\:.+\\.$#"
-
message: "#^Call to an undefined method App\\\\Web\\\\LayoutTemplate\\:\\:.+\\.$#"
-
# Ignore markTestSkipped
# @author https://github.com/phpstan/phpstan-phpunit/issues/52#issuecomment-1075564035
message: "#^Unreachable statement - code above always terminates.$#"
path: tests
-
# Ignore missing description of array in tests (typically for data providers)
message: "#^Method .+ return type has no value type specified in iterable type array\\.$#"
path: tests
-
# Ignore missing description of array in tests (typically for data providers)
message: "#^Method .+ has parameter .+ with no value type specified in iterable type array\\.$#"
path: tests
-
# Variable $processed is ready for future use
message: "#^Property App\\\\BetterLocation\\\\Service\\\\AbstractService\\:\\:\\$processed is never read, only written\\.$#"
count: 1
path: src/libs/BetterLocation/Service/AbstractService.php
-
# Intentionally wrong input type parameter to test method if it behaves as it should
message: "#^Parameter \\#1 \\$inputs of method App\\\\OpenElevation\\\\OpenElevation\\:\\:fillBatch\\(\\) expects array\\<App\\\\Utils\\\\Coordinates\\>, array\\<int, string\\> given\\.$#"
count: 1
path: tests/OpenElevation/OpenElevationTest.php
-
# Real value is different than described in PHPDocs
message: "#^Parameter \\#2 \\$entities of method App\\\\BetterLocation\\\\FromTelegramMessage\\:\\:getCollection\\(\\) expects array\\<unreal4u\\\\TelegramAPI\\\\Telegram\\\\Types\\\\MessageEntity\\>, unreal4u\\\\TelegramAPI\\\\Telegram\\\\Types\\\\Custom\\\\MessageEntityArray given\\.$#"
-
# Wrongly recognized class constant types for Config vs DefaultConfig - they might be string or null but in Default config is defined only as null
# @see https://github.com/phpstan/phpstan/issues/9218
message: "#^Parameter .+ of .+ expects .+, .+ given\\.$#"
path: src/libs/Factory.php
reportUnmatched: false
-
# Wrongly recognized class constant types for Config vs DefaultConfig - they might be string or null but in Default config is defined only as null
# @see https://github.com/phpstan/phpstan/issues/9218
message: "#^Parameter .+ \\$apiKey of .+ expects .+, null given\\.$#"
path: tests
reportUnmatched: false
-
# False-negative. One method is called twice and PHPStan does not know, that output might be different
message: "#^Strict comparison using \\=\\=\\= between true and false will always evaluate to false\\.$#"
count: 1
path: src/libs/BetterLocation/Service/GoogleMapsService.php
-
# False-positive. Property is assigned within given class
message: "#^Class App\\\\Repository\\\\.+Entity has an uninitialized readonly property \\$.+\\. Assign it in the constructor\\.$#"
-
# False-positive. Property is assigned within given class
message: "#^Readonly property App\\\\Repository\\\\.+Entity::\\$.+ is assigned outside of the constructor\\.$#"
-
# Values are added using internal method 'cast()' and setters
message: "#^Class App\\\\.+Dto has an uninitialized readonly property \\$.+\\. Assign it in the constructor\\.$#"
-
# There are two methods that are always called, but PHPStan is not able to handle multiple "additionalConstructors" for single class
message: "#^Class App\\\\TelegramCustomWrapper\\\\Events\\\\Events has an uninitialized readonly property \\$update\\. Assign it in the constructor\\.$#"
count: 1
path: src/libs/TelegramCustomWrapper/Events/Events.php
-
# There are two methods that are always called, but PHPStan is not able to handle multiple "additionalConstructors" for single class
message: "#^Readonly property App\\\\TelegramCustomWrapper\\\\Events\\\\Events\\:\\:\\$update is assigned outside of the constructor\\.$#"
count: 1
path: src/libs/TelegramCustomWrapper/Events/Events.php
-
# There are multiple methods that are always called, but PHPStan is not able to handle multiple "additionalConstructors" for single class
message: "#^Readonly property Tests\\\\HttpTestClients\\:\\:\\$.+ is already assigned\\.$#"
count: 4
path: tests\HttpTestClients.php
includes:
- phpstan-baseline.neon