Skip to content

Commit 3894d31

Browse files
committed
MAGETWO-58691: Refactor Module_Quote, Module_Sales
- simplified regexp for the static test
1 parent 11daa34 commit 3894d31

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

dev/tests/static/testsuite/Magento/Test/Legacy/UnsecureFunctionsUsageTest.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,6 @@ private function prepareRegexp(array $functions)
159159
if (empty($functions)) {
160160
return '';
161161
}
162-
$regexArray = [];
163-
foreach ($functions as $function) {
164-
$regexArray[] = '(?<!function |[^\s])\b' . $function . '\b\(';
165-
}
166-
return '/' . implode('|', $regexArray) . '/i';
162+
return '/(?<!function |[^\s])\b(' . join('|', $functions) . ')\s*\(/i';
167163
}
168164
}

0 commit comments

Comments
 (0)