forked from hyperf/hyperf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.neon
51 lines (50 loc) · 2.62 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
43
44
45
46
47
48
49
50
51
# Magic behaviour with __get, __set, __call and __callStatic is not exactly static analyser-friendly :)
# Fortunately, You can ignore it by the following config.
#
parameters:
bootstrapFiles:
- "bootstrap.php"
inferPrivatePropertyTypeFromConstructor: true
treatPhpDocTypesAsCertain: true
reportUnmatchedIgnoredErrors: false
excludes_analyse:
- %currentWorkingDirectory%/src/*/tests/*
- %currentWorkingDirectory%/src/*/publish/*
- %currentWorkingDirectory%/src/*/class_map/*
- %currentWorkingDirectory%/src/di/src/Resolver/FactoryResolver.php
- %currentWorkingDirectory%/src/config-zookeeper/src/Client.php
- %currentWorkingDirectory%/src/contract/*
- %currentWorkingDirectory%/src/crontab/*
- %currentWorkingDirectory%/src/database/*
- %currentWorkingDirectory%/src/filesystem/*
- %currentWorkingDirectory%/src/graphql/*
- %currentWorkingDirectory%/src/grpc/*
- %currentWorkingDirectory%/src/grpc-server/*
- %currentWorkingDirectory%/src/ide-helper/*
- %currentWorkingDirectory%/src/swagger/*
- %currentWorkingDirectory%/src/validation/*
- %currentWorkingDirectory%/src/view/src/Engine/*
- %currentWorkingDirectory%/src/server/src/SwowServer.php
ignoreErrors:
- '#side of && is always#'
- '#method Redis::zRevRangeByScore\(\) expects int, string given#'
- '#Argument of an invalid type Hyperf\\AsyncQueue\\Job supplied for foreach, only iterables are supported#'
- '#Variable .* in isset\(\) always exists and is not nullable#'
- '#Static call to instance method Hyperf\\DbConnection\\Db.*#'
- '#Static call to instance method SplPriorityQueue\:\:insert\(\)#'
- '#Call to an undefined method ReflectionType::getName#'
- '#Call to an undefined method Traversable<mixed, mixed>\:\:getArrayCopy#'
- '#Unsafe usage of new static#'
- '#Method Hyperf\\Contract\\Sendable::send#'
- '#Variable .* in PHPDoc tag @var does not exist#'
- '#Call to an undefined method Hyperf\\Database\\Model\\Model::hydrate#'
- '#PHPDoc tag @param has invalid value#'
- '#Static call to instance method Hyperf\\RpcServer\\Router\\Router::#'
- '#Method Hyperf\\Utils\\Serializer\\ScalarNormalizer::denormalize\(\) should return array\|object but returns#'
- '#Function get_debug_type invoked with 1 parameter, 0 required#'
- '#Call to an undefined method Hyperf\\Utils\\HigherOrderCollectionProxy::.*#'
- '#InfluxDB\\Point constructor expects float\|null, string given#'
- '#getSwooleTracker.* not found#'
- '#trackerHookMalloc not found#'
- '#separator of function explode expects non-empty-string, string given#'
- '#.*TKey.*TValue#'