Skip to content

Commit e1a9833

Browse files
committed
Fixes #33430
1 parent bf4cdad commit e1a9833

File tree

5 files changed

+194
-24
lines changed

5 files changed

+194
-24
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"lusitanian/oauth": "~0.8.10",
8888
"magento/magento-coding-standard": "*",
8989
"magento/magento2-functional-testing-framework": "^3.0",
90-
"pdepend/pdepend": "~2.7.1",
90+
"pdepend/pdepend": "~2.9.1",
9191
"phpcompatibility/php-compatibility": "^9.3",
9292
"phpmd/phpmd": "^2.8.0",
9393
"phpstan/phpstan": "^0.12.77",

composer.lock

Lines changed: 180 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/static/framework/Magento/CodeMessDetector/Rule/Design/AllPurposeAction.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ public function apply(AbstractNode $node)
3232
return;
3333
}
3434
try {
35+
if (!class_exists($node->getFullQualifiedName(), true)) {
36+
return;
37+
}
3538
$impl = class_implements($node->getFullQualifiedName(), true);
3639
} catch (\Throwable $exception) {
3740
//Couldn't load a class.

dev/tests/static/framework/Magento/CodeMessDetector/Rule/Design/CookieAndSessionMisuse.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ private function isControllerPlugin(\ReflectionClass $class): bool
110110
foreach ($class->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) {
111111
if (preg_match('/^(after|around|before).+/i', $method->getName())) {
112112
try {
113-
$argument = $this->getParameterClass($method->getParameters()[0]);
113+
$parameters = $method->getParameters();
114+
if (count($parameters) === 0) {
115+
continue;
116+
}
117+
$argument = $this->getParameterClass($parameters[0]);
114118
} catch (\Throwable $exception) {
115119
//Non-existing class (autogenerated perhaps) or doesn't have an argument.
116120
continue;
@@ -139,7 +143,11 @@ private function isBlockPlugin(\ReflectionClass $class): bool
139143
foreach ($class->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) {
140144
if (preg_match('/^(after|around|before).+/i', $method->getName())) {
141145
try {
142-
$argument = $this->getParameterClass($method->getParameters()[0]);
146+
$parameters = $method->getParameters();
147+
if (count($parameters) === 0) {
148+
continue;
149+
}
150+
$argument = $this->getParameterClass($parameters[0]);
143151
} catch (\Throwable $exception) {
144152
//Non-existing class (autogenerated perhaps) or doesn't have an argument.
145153
continue;

vendor/.htaccess

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)