-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathphpstan.neon.dist
97 lines (94 loc) · 6.26 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
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
includes:
- vendor/phpstan/phpstan-strict-rules/rules.neon
- vendor/phpstan/phpstan-nette/extension.neon
- vendor/phpstan/phpstan-nette/rules.neon
- vendor/spaze/phpstan-disallowed-calls/extension.neon
- vendor/spaze/phpstan-disallowed-calls/disallowed-dangerous-calls.neon
- vendor/spaze/phpstan-disallowed-calls/disallowed-execution-calls.neon
- vendor/spaze/phpstan-disallowed-calls/disallowed-insecure-calls.neon
- vendor/spaze/phpstan-disallowed-calls/disallowed-loose-calls.neon
- tests/PHPStan/disallowedCalls.neon
- tests/PHPStan/shipmonk.neon
- tests/PHPStan/conditional.config.php
parameters:
level: max
paths:
- src
exceptions:
implicitThrows: false
check:
missingCheckedExceptionInThrows: true
tooWideThrowType: true
uncheckedExceptionClasses:
- LogicException
- Nette\Application\AbortException
- Nette\Application\UI\InvalidLinkException
- Nette\InvalidStateException
- Nette\IOException
- Nette\MemberAccessException
- Nette\Utils\JsonException
- Nette\Utils\UnknownImageFileException
ignoreErrors:
-
message: "~Method Nepada\\\\FileUploadControl\\\\Utils\\\\NetteFileSystem::.* throws checked exception Exception but it's missing from the PHPDoc @throws tag~"
path: src/FileUploadControl/Utils/NetteFileSystem.php
-
message: "#^Parameter \\#1 \\$value \\(bool\\) of method Nepada\\\\FileUploadControl\\\\FileUploadControl\\:\\:setDisabled\\(\\) should be contravariant with parameter \\$value \\(mixed\\) of method Nextras\\\\FormComponents\\\\Fragments\\\\UIControl\\\\BaseControl\\:\\:setDisabled\\(\\)$#"
count: 1
path: src/FileUploadControl/FileUploadControl.php
-
message: "#^Parameter \\#1 \\$caption \\(string\\|Stringable\\|null\\) of method Nepada\\\\FileUploadControl\\\\FileUploadControl\\:\\:getLabel\\(\\) should be contravariant with parameter \\$caption \\(object\\|string(?:\\|null)?\\) of method Nextras\\\\FormComponents\\\\Fragments\\\\UIControl\\\\BaseControl\\:\\:getLabel\\(\\)$#"
count: 1
path: src/FileUploadControl/FileUploadControl.php
-
message: "#^Parameter \\#2 \\$errorMessage \\(string\\|Stringable\\|null\\) of method Nepada\\\\FileUploadControl\\\\FileUploadControl\\:\\:addRule\\(\\) should be contravariant with parameter \\$errorMessage \\(object\\|string(?:\\|null)?\\) of method Nextras\\\\FormComponents\\\\Fragments\\\\UIControl\\\\BaseControl\\:\\:addRule\\(\\)$#"
count: 1
path: src/FileUploadControl/FileUploadControl.php
-
message: "#^Parameter \\#1 \\$value \\(bool\\|string\\|Stringable\\) of method Nepada\\\\FileUploadControl\\\\FileUploadControl\\:\\:setRequired\\(\\) should be contravariant with parameter \\$value \\(bool\\|object\\|string\\) of method Nextras\\\\FormComponents\\\\Fragments\\\\UIControl\\\\BaseControl\\:\\:setRequired\\(\\)$#"
count: 1
path: src/FileUploadControl/FileUploadControl.php
-
message: "#^Method Nepada\\\\FileUploadControl\\\\Validation\\\\FakeUploadControl\\:\\:getCaption\\(\\) should return string\\|Stringable\\|null but returns object\\|string\\.$#"
count: 1
path: src/FileUploadControl/Validation/FakeUploadControl.php
-
message: "#^Parameter \\#1 \\$validator \\(\\(callable\\(\\)\\: mixed\\)\\|string\\) of method Nepada\\\\FileUploadControl\\\\FileUploadControl\\:\\:addCondition\\(\\) should be contravariant with parameter \\$validator \\(mixed\\) of method Nextras\\\\FormComponents\\\\Fragments\\\\UIControl\\\\BaseControl\\:\\:addCondition\\(\\)$#"
count: 1
path: src/FileUploadControl/FileUploadControl.php
-
message: "#^Parameter \\#2 \\$validator \\(\\(callable\\(\\)\\: mixed\\)\\|string\\) of method Nepada\\\\FileUploadControl\\\\FileUploadControl\\:\\:addConditionOn\\(\\) should be contravariant with parameter \\$validator \\(mixed\\) of method Nextras\\\\FormComponents\\\\Fragments\\\\UIControl\\\\BaseControl\\:\\:addConditionOn\\(\\)$#"
count: 1
path: src/FileUploadControl/FileUploadControl.php
-
message: "#^Dead catch \\- Throwable is never thrown in the try block\\.$#"
count: 1
path: src/FileUploadControl/FileUploadControl.php
-
message: "#^Parameter \\#2 \\$error of method Nepada\\\\FileUploadControl\\\\FileUploadControl\\:\\:createUploadErrorResponse\\(\\) expects string, mixed given\\.$#"
count: 2
path: src/FileUploadControl/FileUploadControl.php
-
message: "#^Variable property access on Nette\\\\Utils\\\\Html\\.$#"
count: 1
path: src/FileUploadControl/FileUploadControl.php
-
message: "#^Parameter \\#1 \\$data of static method Nepada\\\\FileUploadControl\\\\Storage\\\\Metadata\\\\FileUploadMetadata\\:\\:fromArray\\(\\) expects array, mixed given\\.$#"
count: 1
path: src/FileUploadControl/Storage/Metadata/FileSystemMetadataJournal.php
-
message: "#^Parameter \\#1 \\$name of class Nepada\\\\FileUploadControl\\\\Storage\\\\Metadata\\\\FileUploadMetadata constructor expects string, mixed given\\.$#"
count: 1
path: src/FileUploadControl/Storage/Metadata/FileUploadMetadata.php
-
message: "#^Parameter \\#2 \\$size of class Nepada\\\\FileUploadControl\\\\Storage\\\\Metadata\\\\FileUploadMetadata constructor expects int, mixed given\\.$#"
count: 1
path: src/FileUploadControl/Storage/Metadata/FileUploadMetadata.php
- # Used for checksum only
message: "#^Calling sha1\\(\\) is forbidden, use hash\\(\\) with at least SHA\\-256 for secure hash, or password_hash\\(\\) for passwords\\.$#"
count: 1
path: src/FileUploadControl/Storage/Metadata/FileUploadMetadata.php
- # false positive
message: "#^Invalid var phpdoc of \\$files\\. Cannot assign array.* to array\\<int, Nette\\\\Http\\\\FileUpload\\>$#"
count: 1
path: src/FileUploadControl/FileUploadControl.php