Skip to content

Commit d775713

Browse files
committed
AC-682: Create phpcs static check for RestrictedCodeTest
1 parent cd9083c commit d775713

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Magento2/Sniffs/Legacy/RestrictedCodeSniff.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public function register()
5656
*/
5757
public function process(File $phpcsFile, $stackPtr)
5858
{
59+
// phpcs:ignore
5960
if (array_key_exists(basename($phpcsFile->getFilename()), $this->fixtureFiles)) {
6061
return;
6162
}
@@ -107,6 +108,7 @@ private function isExcluded(string $token, File $phpcsFile): bool
107108
*/
108109
private function loadData(string $filePattern)
109110
{
111+
// phpcs:ignore
110112
foreach (glob(__DIR__ . '/_files/' . $filePattern) as $file) {
111113
$relativePath = str_replace(
112114
'\\',
@@ -126,6 +128,7 @@ private function loadData(string $filePattern)
126128
*/
127129
private function readList($file)
128130
{
131+
// phpcs:ignore
129132
return include $file;
130133
}
131134
}

Magento2/Sniffs/Legacy/_files/restricted_classes_ee.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@
2929
'Magento/Rma/Test/Unit/Model/Status/HistoryRepositoryTest.php'
3030
]
3131
]
32-
];
32+
];

0 commit comments

Comments
 (0)