-
Notifications
You must be signed in to change notification settings - Fork 44
/
phpstan.neon
42 lines (35 loc) · 2.2 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
42
includes:
- vendor/phpstan/phpstan-symfony/extension.neon
- vendor/phpstan/phpstan-strict-rules/rules.neon
parameters:
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
excludePaths:
# The following two paths are excluded since PHPStan crashes with "unknown interface" error
# which cannot be excluded with ignoreErrors config
- bundle/Core/Search/Elasticsearch/Query/Common/CriterionVisitor/Tags.php
- bundle/Core/Search/Elasticsearch/QueryDSL/PrefixQuery.php
ignoreErrors:
-
message: '#Else branch is unreachable because ternary operator condition is always true.#'
path: bundle/Core/FieldType/Tags/Type.php
# Doctrine DBAL
- '#Cannot call method fetch(All)?\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int#'
- '#expects string\|null, Doctrine\\DBAL\\Query\\Expression\\CompositeExpression given#'
- '#\$value2 of method Doctrine\\DBAL\\Platforms\\AbstractPlatform::getBitAndComparisonExpression\(\) expects string, int given.#'
# Tags Bundle specifics
- '#Netgen\\TagsBundle\\Core\\FieldType\\Tags\\Value::__construct\(\) does not call parent constructor#'
- '#Method .*::getRelatedContent\(\) should return .* but returns .*#'
- '#Variable property access on \$this\(Netgen\\TagsBundle\\API\\Repository\\Values\\Tags\\Tag\)#'
# Errors caused by public properties in eZ Platform
- '#Property Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation::\$limitationValues \(array\) on left side of \?\? is not nullable.#'
- '#Call to function is_string\(\) with string will always evaluate to true.#'
- '#Call to function is_array\(\) with array(<.*>)? will always evaluate to true.#'
- '#Instanceof between (.*) and (.*) will always evaluate to true.#'
- "#Casting to int something that's already int.#"
- '#should be contravariant with parameter#'
- '#should be covariant with return type#'
- "#Casting to bool something that's already bool.#"
# Errors caused by Ibexa Elasticsearch
- '#Ibexa\\Contracts\\Elasticsearch#'
- '#Ibexa\\Elasticsearch#'