File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
dev/tests/static/framework/Magento/CodeMessDetector/Rule/Design Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -82,10 +82,12 @@ private function isControllerPlugin(\ReflectionClass $class): bool
82
82
//Non-existing class (autogenerated perhaps) or doesn't have an argument.
83
83
continue ;
84
84
}
85
- $ isAction = $ argument ->isSubclassOf (\Magento \Framework \App \ActionInterface::class)
86
- || $ argument ->getName () === \Magento \Framework \App \ActionInterface::class;
87
- if ($ isAction ) {
88
- return true ;
85
+ if ($ argument ) {
86
+ $ isAction = $ argument ->isSubclassOf (\Magento \Framework \App \ActionInterface::class)
87
+ || $ argument ->getName () === \Magento \Framework \App \ActionInterface::class;
88
+ if ($ isAction ) {
89
+ return true ;
90
+ }
89
91
}
90
92
}
91
93
}
@@ -109,10 +111,12 @@ private function isBlockPlugin(\ReflectionClass $class): bool
109
111
//Non-existing class (autogenerated perhaps) or doesn't have an argument.
110
112
continue ;
111
113
}
112
- $ isBlock = $ argument ->isSubclassOf (\Magento \Framework \View \Element \BlockInterface::class)
113
- || $ argument ->getName () === \Magento \Framework \View \Element \BlockInterface::class;
114
- if ($ isBlock ) {
115
- return true ;
114
+ if ($ argument ) {
115
+ $ isBlock = $ argument ->isSubclassOf (\Magento \Framework \View \Element \BlockInterface::class)
116
+ || $ argument ->getName () === \Magento \Framework \View \Element \BlockInterface::class;
117
+ if ($ isBlock ) {
118
+ return true ;
119
+ }
116
120
}
117
121
}
118
122
}
You can’t perform that action at this time.
0 commit comments