Skip to content

Commit ad9a0b2

Browse files
committed
Filter/Filter: remove outdated code that is no longer needed
This commit removes an if condition to maintain backwards compatibility that is no longer needed. It was added via squizlabs/PHP_CodeSniffer@4982619 to preserve backwards compatibility back in a time when it was possible to programmatically set ignore patterns using `CodeSniffer::setIgnorePatterns()` (see https://pear.php.net/bugs/bug.php?id=19859). This method was removed a long time ago via f61025c#diff-c36ecedca179eab0b3cd245e872a96ab26fa08e567437e167f4eda1779c15c89L431-L435, and since then, there is no way for users to set the ignore pattern array with numeric indices.
1 parent ef0b6a6 commit ad9a0b2

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/Filters/Filter.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -247,13 +247,6 @@ protected function shouldIgnorePath($path)
247247
}
248248

249249
foreach ($ignorePatterns as $pattern => $type) {
250-
// Maintains backwards compatibility in case the ignore pattern does
251-
// not have a relative/absolute value.
252-
if (is_int($pattern) === true) {
253-
$pattern = $type;
254-
$type = 'absolute';
255-
}
256-
257250
$replacements = [
258251
'\\,' => ',',
259252
'*' => '.*',

0 commit comments

Comments
 (0)