-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathphpstan.neon
41 lines (39 loc) · 2.5 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
includes:
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
- vendor/phpstan/phpstan-nette/extension.neon
- vendor/phpstan/phpstan-nette/rules.neon
- vendor/phpstan/phpstan-strict-rules/rules.neon
parameters:
ignoreErrors:
# Cannot analyse typecasted array
- '#^Access to an undefined property object\:\:#'
# Returns false only on failure which should not happen in our case (CsvResponse)
- '#^Parameter \#1 \$fp of function (fputcsv|fclose) expects resource, resource\|false given\.$#'
# Too magic method
- '#^Parameter \#1 \$serie of method Tlapnet\\Chart\\CategoryChart\:\:addSerie\(\) expects Tlapnet\\Chart\\Serie\\CategorySerie, Tlapnet\\Chart\\Serie\\AbstractSerie given\.$#'
# Cannot add typehint
- '#^Call to an undefined method Nette\\ComponentModel\\IComponent\:\:isSubmittedBy\(\)\.$#'
# Should not happen
- '#^Method Tlapnet\\Report\\Utils\\Expander\:\:doSingle\(\) should return string but returns string\|null\.$#'
- message: '#^Parameter \#. \$str. of function levenshtein expects string, array\|string\|null given\.$#'
path: %currentWorkingDirectory%/src/Utils/Suggestions.php
# Intended
- '#^Parameter \#1 \$data \(.+\) of method Tlapnet\\Report\\Preprocessor\\Impl\\.+Preprocessor\:\:preprocess\(\) should be contravariant with parameter \$data \(mixed\) of method Tlapnet\\Report\\Preprocessor\\Preprocessor\:\:preprocess\(\)$#'
# InArray strict to false
- message: '#^Call to function in_array\(\) requires parameter \#3 to be set\.#'
path: %currentWorkingDirectory%/src/Parameters/Impl/SelectParameter.php
excludes_analyse:
# Too magic
- %currentWorkingDirectory%/src/Utils/Html.php
# PHPStan dont know that it should not check null if it was already checked in previous code
- %currentWorkingDirectory%/src/Subreport/Subreport.php
- %currentWorkingDirectory%/src/Subreport/SubreportBuilder.php
- %currentWorkingDirectory%/src/DataSources/PdoDataSource.php
- %currentWorkingDirectory%/src/Bridges/Nette/Database/DataSources/NetteDatabaseDataSource.php
# PHPStan dont know how to work with multiple type annotations
- %currentWorkingDirectory%/src/Bridges/Nette/Form/FormFactory.php
# Nette\Diagnostics\IBarPanel not used at all, wtf?
- %currentWorkingDirectory%/src/Bridges/Dibi/DataSources/DibiDataSource.php
- %currentWorkingDirectory%/src/Bridges/Dibi/DataSources/DibiWrapperDataSource.php
- %currentWorkingDirectory%/src/Bridges/Dibi/DataSources/MultiDibiWrapperDataSource.php
- %currentWorkingDirectory%/src/Bridges/Dibi/DataSources/TDibiDebugPanel.php