-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathphpstan.neon
More file actions
58 lines (55 loc) · 3.1 KB
/
phpstan.neon
File metadata and controls
58 lines (55 loc) · 3.1 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
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
parameters:
level: 5
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
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.#'
- '#but return statement is missing#'
# Ignore Adobe Commerce classes that may not exist in Magento Open Source
- '#Class Magento\\GiftCardAccount\\Api\\GiftCardAccountRepositoryInterface not found#'
- '#Class Magento\\GiftCardAccount\\Model\\HistoryFactory not found#'
- '#Access to constant ACTION_CREATED on an unknown class Buckaroo\\Magento2\\Model\\Service\\History#'
# Ignore all Adobe Commerce gift card related classes in our service
- '#.*GiftCardRefundService\.php.*Class Magento\\GiftCardAccount\\.*not found#'
- '#.*Magento\\GiftCardAccount\\.*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