forked from codeigniter4/CodeIgniter4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpstan.neon.dist
63 lines (62 loc) · 2.94 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
services:
-
class: Utils\PHPStan\CheckUseStatementsAfterLicenseRule
tags:
- phpstan.rules.rule
-
class: Utils\PHPStan\CheckFrameworkExceptionInstantiationViaNamedConstructorRule
tags:
- phpstan.rules.rule
parameters:
tmpDir: build/phpstan
level: 5
paths:
- app
- system
- utils/PHPStan
treatPhpDocTypesAsCertain: false
bootstrapFiles:
- system/Test/bootstrap.php
excludePaths:
- app/Views/errors/cli/*
- app/Views/errors/html/*
- system/Commands/Generators/Views/*
- system/Config/Routes.php
- system/Debug/Toolbar/Views/toolbar.tpl.php
- system/Images/Handlers/GDHandler.php
- system/Test/Filters/CITestStreamFilter.php
- system/ThirdParty/*
- system/Validation/Views/single.php
ignoreErrors:
- '#Access to an undefined property CodeIgniter\\Database\\BaseConnection::\$mysqli|\$schema#'
- '#Access to an undefined property CodeIgniter\\Database\\ConnectionInterface::(\$DBDriver|\$connID|\$likeEscapeStr|\$likeEscapeChar|\$escapeChar|\$protectIdentifiers|\$schema)#'
- '#Call to an undefined method CodeIgniter\\Database\\BaseConnection::_(disable|enable)ForeignKeyChecks\(\)#'
- '#Call to an undefined method CodeIgniter\\Router\\RouteCollectionInterface::(getDefaultNamespace|isFiltered|getFilterForRoute|getFiltersForRoute|getRoutesOptions)\(\)#'
- '#Cannot access property [\$a-z_]+ on ((bool\|)?object\|resource)#'
- '#Cannot call method [a-zA-Z_]+\(\) on ((bool\|)?object\|resource)#'
- '#Method CodeIgniter\\Router\\RouteCollectionInterface::getRoutes\(\) invoked with 1 parameter, 0 required#'
- '#Method CodeIgniter\\Validation\\ValidationInterface::run\(\) invoked with 3 parameters, 0-2 required#'
- '#Negated boolean expression is always (true|false)#'
- '#Return type \(bool\) of method CodeIgniter\\HTTP\\Files\\UploadedFile::move\(\) should be compatible with return type \(CodeIgniter\\Files\\File\) of method CodeIgniter\\Files\\File::move\(\)#'
- '#.*\son left side of \?\? is not nullable#'
- '#While loop condition is always true#'
- '#Right side of && is always true#'
- '#.*in isset\(\) is not nullable#'
- '#.*in empty\(\) is not falsy#'
- '#.*on left side of \?\? always exists and is not nullable#'
- '#Variable \$error on left side of \?\? always exists and is always null#'
- '#Variable \$config in empty\(\) always exists and is not falsy#'
- '#If condition is always true#'
- '#Dead catch - CodeIgniter\\Exceptions\\PageNotFoundException is never thrown in the try block#'
- '#.* in isset\(\) does not exist#'
- '#Variable \$mockService in empty\(\) always exists and is always falsy#'
- '#PHPDoc type string\|null of property CodeIgniter\\Images\\Handlers\\ImageMagickHandler::\$resource is not covariant with PHPDoc type resource\|null of overridden property CodeIgniter\\Images\\Handlers\\BaseHandler::\$resource#'
parallel:
processTimeout: 300.0
scanDirectories:
- system/Helpers
dynamicConstantNames:
- APP_NAMESPACE
- CI_DEBUG
- ENVIRONMENT
- SODIUM_LIBRARY_VERSION