Skip to content

Commit fc1599e

Browse files
committed
MC-24057: Implement static dependency analysis for wildcard and API urls
- Cylomatic complexity fix
1 parent b6b180e commit fc1599e

File tree

1 file changed

+2
-4
lines changed
  • dev/tests/static/framework/Magento/TestFramework/Dependency

1 file changed

+2
-4
lines changed

dev/tests/static/framework/Magento/TestFramework/Dependency/PhpRule.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,8 @@ private function processWildcardUrl(string $urlPath, string $filePath)
377377
) {
378378
return [];
379379
}
380-
$fileControllerIndex = array_search('adminhtml', $filePathPieces);
381-
if (!$fileControllerIndex) {
382-
$fileControllerIndex = array_search('controller', $filePathPieces);
383-
}
380+
$fileControllerIndex = array_search('adminhtml', $filePathPieces) ?:
381+
array_search('controller', $filePathPieces);
384382

385383
$controllerName = array_shift($urlRoutePieces);
386384
if ('*' === $controllerName) {

0 commit comments

Comments
 (0)