File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
dev/tests/static/testsuite/Magento/Test/Integrity Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -127,12 +127,9 @@ private function getPluginBlacklist(): array
127
127
);
128
128
$ blacklistItems = [];
129
129
foreach (glob ($ blacklistFiles ) as $ fileName ) {
130
- // phpcs:ignore Magento2.Performance.ForeachArrayMerge
131
- $ blacklistItems = array_merge (
132
- $ blacklistItems ,
133
- file ($ fileName , FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES )
134
- );
130
+ $ blacklistItems [] = file ($ fileName , FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES );
135
131
}
132
+ $ blacklistItems = array_merge ([], ...$ blacklistItems );
136
133
$ this ->pluginBlacklist = $ blacklistItems ;
137
134
}
138
135
return $ this ->pluginBlacklist ;
@@ -244,11 +241,10 @@ protected function _phpClassesDataProvider()
244
241
$ allowedFiles = array_keys ($ classes );
245
242
foreach ($ classes as $ class ) {
246
243
if (!in_array ($ class , $ output )) {
247
- // phpcs:ignore Magento2.Performance.ForeachArrayMerge
248
- $ output = array_merge ($ output , $ this ->_buildInheritanceHierarchyTree ($ class , $ allowedFiles ));
249
- $ output = array_unique ($ output );
244
+ $ output [] = $ this ->_buildInheritanceHierarchyTree ($ class , $ allowedFiles );
250
245
}
251
246
}
247
+ $ output = array_unique (array_merge ([], ...$ output ));
252
248
253
249
/** Convert data into data provider format */
254
250
$ outputClasses = [];
Original file line number Diff line number Diff line change @@ -135,9 +135,10 @@ private function checkSetExtensionAttributes(
135
135
} else {
136
136
// Get the parameter name via a regular expression capture because the class may
137
137
// not exist which causes a fatal error
138
- preg_match ('/\[\s\<\w+?>\s([?]?[\w]+)/s ' , $ methodParameters [0 ]->__toString (), $ matches );
138
+ preg_match ('/\[\s\<\w+?>\s([?]?[\w \\ \ ]+)/s ' , $ methodParameters [0 ]->__toString (), $ matches );
139
139
$ isCorrectParameter = false ;
140
- if (isset ($ matches [1 ]) && '\\' . $ matches [1 ] != $ extensionInterfaceName ) {
140
+ if (isset ($ matches [1 ])
141
+ && ('\\' . ltrim ($ matches [1 ], '? ' )) === $ extensionInterfaceName ) {
141
142
$ isCorrectParameter = true ;
142
143
}
143
144
You can’t perform that action at this time.
0 commit comments