Skip to content

Commit e81cea0

Browse files
committed
AC-669: Fixed directory name checking too lax
1 parent cbe4ffa commit e81cea0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Magento2/Sniffs/Legacy/InstallUpgradeSniff.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ public function process(File $phpcsFile, $stackPtr)
6464
}
6565
}
6666

67-
$folderName = basename($fileInfo->getPath());
67+
$folders = array_filter(explode('/', $fileInfo->getPath()));
68+
$folderName = array_pop($folders);
6869

6970
if ($folderName === 'data' || $folderName === 'sql') {
7071
$phpcsFile->addError(

0 commit comments

Comments
 (0)