File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
dev/tests/static/framework/Magento/CodeMessDetector/Rule/Design Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -78,8 +78,8 @@ private function isControllerPlugin(\ReflectionClass $class): bool
78
78
if (preg_match ('/^(after|around|before).+/i ' , $ method ->getName ())) {
79
79
try {
80
80
$ argument = $ method ->getParameters ()[0 ]->getClass ();
81
- } catch (\ReflectionException $ exception ) {
82
- //Non-existing class (autogenerated perhaps)
81
+ } catch (\Throwable $ exception ) {
82
+ //Non-existing class (autogenerated perhaps) or doesn't have an argument.
83
83
continue ;
84
84
}
85
85
$ isAction = $ argument ->isSubclassOf (\Magento \Framework \App \ActionInterface::class)
@@ -105,8 +105,8 @@ private function isBlockPlugin(\ReflectionClass $class): bool
105
105
if (preg_match ('/^(after|around|before).+/i ' , $ method ->getName ())) {
106
106
try {
107
107
$ argument = $ method ->getParameters ()[0 ]->getClass ();
108
- } catch (\ReflectionException $ exception ) {
109
- //Non-existing class (autogenerated perhaps)
108
+ } catch (\Throwable $ exception ) {
109
+ //Non-existing class (autogenerated perhaps) or doesn't have an argument.
110
110
continue ;
111
111
}
112
112
$ isBlock = $ argument ->isSubclassOf (\Magento \Framework \View \Element \BlockInterface::class)
You can’t perform that action at this time.
0 commit comments