-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.neon
73 lines (70 loc) · 3.11 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
parameters:
level: 8
fileExtensions:
- php
- phtml
- xml
paths:
- Api
#- Block
#- Controller
- etc
- Model
- Test
#- Plugin
#- Repository
#- Setup
#- Ui
#- Validator
#- view
checkExplicitMixedMissingReturn: true
checkPhpDocMissingReturn: true
reportUnmatchedIgnoredErrors: false
excludePaths:
- %rootDir%/../../../lib/internal/Magento/Framework/ObjectManager/Test/Unit/*
- %rootDir%/../../../*/_files/*
- %rootDir%/../../../dev/tests/*/Fixtures/*
- %rootDir%/../../../dev/tests/*/tmp/*
- %rootDir%/../../../dev/tests/*/_generated/*
- %rootDir%/../../../pub/*
scanDirectories:
- %rootDir%/../../../dev/tests/static/framework/tests/unit/testsuite/Magento
- %rootDir%/../../../dev/tests/integration/framework/tests/unit/testsuite/Magento
- %rootDir%/../../../dev/tests/api-functional/_files/Magento
bootstrapFiles:
- %rootDir%/../../../dev/tests/static/framework/autoload.php
- %rootDir%/../../../dev/tests/integration/framework/autoload.php
- %rootDir%/../../../dev/tests/api-functional/framework/autoload.php
- %rootDir%/../../../dev/tests/setup-integration/framework/autoload.php
- %rootDir%/../../../dev/tests/static/framework/Magento/PhpStan/autoload.php
stubFiles:
- stubs/Magento/Framework/DataObject.php.stub
- stubs/Magento/Framework/Data/Collection.php.stub
- stubs/Jonatanrdsantos/Email/Api/Data/DataTransferObjectInterface.php.stub
- stubs/Jonatanrdsantos/Email/Api/Data/ProviderInterface.php.stub
- stubs/Jonatanrdsantos/Email/Api/Data/ProviderInterfaceFactory.php.stub
ignoreErrors:
# Ignore PHPStan\Rules\Classes\UnusedConstructorParametersRule
- '#Constructor of class [a-zA-Z0-9\\_]+ has an unused parameter#'
# Ignore setCustomErrorHandler function not found in bootstrap files
- '#Function setCustomErrorHandler not found#'
# Ignore 'return statement is missing' error when 'void' is present in return type list
- '#Method (?:.*?) should return (?:.*?)void(?:.*?) but return statement is missing.#'
# Ignore constants, defined dynamically.
- '#Constant TESTS_WEB_API_ADAPTER not found.#'
- '#Constant TESTS_BASE_URL not found.#'
- '#Constant TESTS_XDEBUG_ENABLED not found.#'
- '#Constant TESTS_XDEBUG_SESSION not found.#'
- '#Constant INTEGRATION_TESTS_DIR not found.#'
- '#Constant MAGENTO_MODULES_PATH not found.#'
- '#Constant TESTS_MODULES_PATH not found.#'
- '#Constant TESTS_INSTALLATION_DB_CONFIG_FILE not found.#'
- '#Constant T_[A-Z_]+ not found.#'
services:
-
class: Magento\PhpStan\Reflection\Php\DataObjectClassReflectionExtension
tags: {phpstan.broker.methodsClassReflectionExtension: {priority: 100}}
errorFormatter.filtered:
class: Magento\PhpStan\Formatters\FilteredErrorFormatter
arguments:
tableErrorFormatter: @errorFormatter.table