-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpstan.neon
More file actions
29 lines (24 loc) · 1.13 KB
/
phpstan.neon
File metadata and controls
29 lines (24 loc) · 1.13 KB
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
parameters:
level: 5
paths:
- src
excludePaths:
- src/Console/stubs
ignoreErrors:
# Laravel 惯用的 new static() 模式
- '#Unsafe usage of new static#'
# Laravel Facade 和可选依赖(Intervention/Image, Flysystem, 阿里云 SDK 等)
- '#on an unknown class#'
- '#not found#'
- '#has invalid type#'
# Eloquent Model 魔术属性和方法
- '#Access to an undefined property#'
- '#Access to undefined constant#'
- '#Call to an undefined static method Dcat\\Admin\\Models\\[A-Za-z0-9_]+::(where|find|first|create|insert|truncate|pluck)\(\).#'
# 方法返回值缺失(部分方法依赖子类实现或条件返回)
- '#return statement is missing#'
# void 方法返回值被使用(链式调用等场景)
- '#Result of .* is used#'
# HasComplexHeaders::sortHeaders() 中对 $columns 的数组赋值,PHPDoc 已声明 Collection|array
- '#Property Dcat\\Admin\\Grid::\$columns \(Illuminate\\Support\\Collection\) does not accept array\.#'
reportUnmatchedIgnoredErrors: false