-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathphpstan.neon.dist
67 lines (62 loc) · 3.76 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
parameters:
level: 6
paths:
- ./
excludePaths:
- cache/
- build/
- vendor/
# TODO review once we drop PHP 7.x support
treatPhpDocTypesAsCertain: false
# some extra rules
checkAlwaysTrueCheckTypeFunctionCall: true
checkAlwaysTrueInstanceof: true
checkAlwaysTrueStrictComparison: true
checkExplicitMixedMissingReturn: true
checkFunctionNameCase: true
# TODO checkMissingClosureNativeReturnTypehintRule: true
reportMaybesInMethodSignatures: true
reportStaticMethodSignatures: true
checkTooWideReturnTypesInProtectedAndPublicMethods: true
checkMissingIterableValueType: false # TODO
ignoreErrors:
- '~^Unsafe usage of new static\(\)\.$~'
# for Doctrine DBAL 2.x, remove the support once Doctrine ORM 2.10 is released
# see https://github.com/doctrine/orm/issues/8526
-
message: '~^(Call to an undefined method Doctrine\\DBAL\\Driver\\Connection::getWrappedConnection\(\)\.|Caught class Doctrine\\DBAL\\DBALException not found\.|Call to static method notSupported\(\) on an unknown class Doctrine\\DBAL\\DBALException\.|Access to an undefined property Doctrine\\DBAL\\Driver\\PDO\\Connection::\$connection\.|Method Atk4\\Data\\Persistence\\Sql\\Expression::execute\(\) should return Doctrine\\DBAL\\Result\|PDOStatement but returns bool\.|Class Doctrine\\DBAL\\Platforms\\MySqlPlatform referenced with incorrect case: Doctrine\\DBAL\\Platforms\\MySQLPlatform\.)$~'
path: '*'
# count for DBAL 3.x matched in "src/Persistence/GenericPlatform.php" file
count: 11
# TODO these rules are generated, this ignores should be fixed in the code
# for src/Schema/TestCase.php
- '~^Access to an undefined property Atk4\\Data\\Persistence::\$connection\.$~'
- '~^Call to an undefined method Atk4\\Data\\Persistence::dsql\(\)\.$~'
# for src/FieldSqlExpression.php
- '~^Call to an undefined method Atk4\\Data\\Model::expr\(\)\.$~'
# for src/Model.php
- '~^Call to an undefined method Atk4\\Data\\Persistence::update\(\)\.$~'
- '~^Call to an undefined method Atk4\\Data\\Persistence::insert\(\)\.$~'
- '~^Call to an undefined method Atk4\\Data\\Persistence::export\(\)\.$~'
- '~^Call to an undefined method Atk4\\Data\\Persistence::prepareIterator\(\)\.$~'
- '~^Call to an undefined method Atk4\\Data\\Persistence::delete\(\)\.$~'
- '~^Call to an undefined method Atk4\\Data\\Persistence::action\(\)\.$~'
# for src/Model/ReferencesTrait.php (in context of class Atk4\Data\Model)
- '~^Call to an undefined method Atk4\\Data\\Reference::refLink\(\)\.$~'
# for src/Persistence/Sql.php
- '~^Call to an undefined method Atk4\\Data\\Persistence::expr\(\)\.$~'
- '~^Call to an undefined method Atk4\\Data\\Persistence::exprNow\(\)\.$~'
# for src/Persistence/Sql/Join.php
- '~^Call to an undefined method Atk4\\Data\\Persistence::initQuery\(\)\.$~'
- '~^Call to an undefined method Atk4\\Data\\Persistence::lastInsertId\(\)\.$~'
# for src/Reference/HasMany.php
- '~^Call to an undefined method Atk4\\Data\\Model::dsql\(\)\.$~'
# for tests/FieldTest.php
- '~^Call to an undefined method Atk4\\Data\\Reference\\HasOne::addTitle\(\)\.$~'
# for tests/JoinSqlTest.php
- '~^Call to an undefined method Atk4\\Data\\Reference\\HasOne::addField\(\)\.$~'
# for tests/ReferenceSqlTest.php
- '~^Call to an undefined method Atk4\\Data\\Reference\\HasOne::addFields\(\)\.$~'
- '~^Call to an undefined method Atk4\\Data\\Reference::addTitle\(\)\.$~'
# for tests/ScopeTest.php
- '~^Call to an undefined method Atk4\\Data\\Tests\\SUser::expr\(\)\.$~'