Skip to content

Commit c7a02e0

Browse files
author
oleksandrkravchuk
committed
PHPStan add support of magic methods of Data Object.
Expand blacklist, add exceptions, fix integrity tests.
1 parent f4b6d5e commit c7a02e0

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

dev/tests/static/framework/tests/unit/testsuite/Magento/PhpStan/Reflection/DataObject/MagicMethodsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\PhpStan\Reflection\DataObject\Fixtures;
8+
namespace Magento\PhpStan\Reflection\DataObject;
99

1010
use PHPStan\Rules\Methods\CallMethodsRule;
1111
use PHPStan\Rules\Rule;

dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/blacklist/common.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ dev/tests/api-functional/testsuite/Magento/Customer/Api/AddressRepositoryTest.ph
1515
dev/tests/api-functional/testsuite/Magento/Framework/Model/Entity/HydratorTest.php
1616
dev/tests/api-functional/testsuite/Magento/Integration/Model/AdminTokenServiceTest.php
1717
dev/tests/api-functional/testsuite/Magento/Integration/Model/CustomerTokenServiceTest.php
18+
dev/tools/UpgradeScripts/pre_composer_update_2.3.php

dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ parameters:
2727
- '#Function setCustomErrorHandler not found#'
2828
# Ignore 'return statement is missing' error when 'void' is present in return type list
2929
- '#Method (?:.*?) should return (?:.*?)void(?:.*?) but return statement is missing.#'
30+
# Ignore constants, defined dynamically.
31+
- '#Constant TESTS_WEB_API_ADAPTER not found.#'
32+
- '#Constant TESTS_BASE_URL not found.#'
33+
- '#Constant TESTS_XDEBUG_ENABLED not found.#'
34+
- '#Constant TESTS_XDEBUG_SESSION not found.#'
35+
- '#Constant INTEGRATION_TESTS_DIR not found.#'
36+
- '#Constant MAGENTO_MODULES_PATH not found.#'
37+
- '#Constant TESTS_MODULES_PATH not found.#'
38+
- '#Constant TESTS_INSTALLATION_DB_CONFIG_FILE not found.#'
39+
- '#Constant T_[A-Z_]+ not found.#'
40+
3041

3142
services:
3243
-

0 commit comments

Comments
 (0)