/
phpstan.neon.dist
49 lines (49 loc) · 1.66 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
includes:
- phar://phpstan.phar/conf/bleedingEdge.neon
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
- vendor/phpstan/phpstan-strict-rules/rules.neon
- phpstan-baseline.neon
parameters:
phpVersion: 80100
level: 9
paths:
- src
- tests
treatPhpDocTypesAsCertain: false
checkImplicitMixed: true
checkBenevolentUnionTypes: true
excludePaths:
- tests/*/data/*
exceptions:
check:
missingCheckedExceptionInThrows: true
uncheckedExceptionClasses:
- 'MariaStan\Ast\Exception\InvalidAstException'
- 'MariaStan\Ast\Exception\InvalidArgumentException'
- 'MariaStan\PHPStan\Exception\InvalidArgumentException'
- 'InvalidArgumentException'
- 'ReflectionException'
- 'Error'
strictRules:
# Ignore Dynamic call to static method PHPUnit\Framework\Assert::assertSame(). etc
strictCalls: false
# Ignore: Only booleans are allowed in an if condition, MariaStan\Parser\Token|null given etc
booleansInConditions: false
# Allow short ternary operator
disallowedConstructs: false
ignoreErrors:
-
message: '#.*throws checked exception.*#'
path: tests/
# Annoying unions:
# mysqli methods can't return false: we have exceptions enabled.
- '#mysqli_stmt\|false#'
# query could return true instead of result for queries that don't product result set, but let's assume that
# we know what we're doing.
- '#bool\|mysqli_result#'
- '#mysqli_result\|false#'
-
# I'm explicitly creating GenericObjectType to append additional information to mysqli_stmt/mysqli_result.
message: '#Doing instanceof PHPStan\\Type\\Generic\\GenericObjectType is error-prone and deprecated.#'
path: src/PHPStan