-
Notifications
You must be signed in to change notification settings - Fork 1
/
phpstan.neon
45 lines (36 loc) · 2.04 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
includes:
- vendor/phpstan/phpstan-strict-rules/rules.neon
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
- vendor/ergebnis/phpstan-rules/rules.neon
- vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon
- vendor/ekino/phpstan-banned-code/extension.neon
parameters:
checkGenericClassInNonGenericObjectType: false
level: 8
paths:
- src
- tests
excludePaths:
- %currentWorkingDirectory%/src/Office/OfficeClient*
ignoreErrors:
# Extending classes.
- '#Class \"[a-zA-Z0-9\\_]+\" is not allowed to extend \"[a-zA-Z0-9\\_]+\".#'
# Using null as default parameter in a function.
- '#Method [a-zA-Z0-9\\_]+::[a-zA-Z0-9\\_]+\(\) has parameter \$[a-zA-Z0-9\\_]+ with null as default value.#'
# No switch rule.
- '#Control structures using switch should not be used.#'
- '#Constructor in [a-zA-Z0-9\\_]+ has parameter \$[a-zA-Z0-9\\_]+ with default value.#'
- '#Method [a-zA-Z0-9\\_]+::[a-zA-Z0-9\\_]+\(\) has a nullable return type declaration.#'
- '#Method [a-zA-Z0-9\\_]+::[a-zA-Z0-9\\_]+\(\) has parameter \$[a-zA-Z0-9\\_]+ with a nullable type declaration.#'
-
message: "#^Property SandwaveIo\\\\Office365\\\\Entity\\\\[a-zA-Z0-9\\]+:\\:\\$[a-zA-Z0-9]+ is never written, only read\\.$#"
path: src/Entity/*
-
message: "#^Property SandwaveIo\\\\Office365\\\\Response\\\\[a-zA-Z0-9\\]+:\\:\\$[a-zA-Z0-9]+ is never written, only read\\.$#"
path: src/Response/*
# Non type hinted property fetching
- '#Variable property access on SimpleXMLElement.#'
# Allow null as status parameter
- '#Method execute\(\) in anonymous class has parameter \$status with a nullable type declaration#'
# AbstractSubject implements the SplSubject
- '#Method SandwaveIo\\Office365\\Library\\Observer\\Subjects::getSubject\(\) should return SandwaveIo\\Office365\\Library\\Observer\\Subject\\AbstractSubject\|null but returns SplSubject.#'