Skip to content

Commit

Permalink
drop dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
michalbundyra committed Oct 15, 2024
1 parent c11a31d commit 2769931
Showing 1 changed file with 0 additions and 47 deletions.
47 changes: 0 additions & 47 deletions src/WebimpressCodingStandard/Sniffs/PHP/DisallowFqnSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,42 +38,29 @@
use const GLOB_NOSORT;
use const T_BITWISE_AND;
use const T_BITWISE_OR;
use const T_CASE;
use const T_CATCH;
use const T_CLOSE_PARENTHESIS;
use const T_CLOSURE;
use const T_COLON;
use const T_COMMA;
use const T_DOC_COMMENT_STRING;
use const T_DOC_COMMENT_TAG;
use const T_DOC_COMMENT_WHITESPACE;
use const T_DOUBLE_COLON;
use const T_ECHO;
use const T_ELLIPSIS;
use const T_EXTENDS;
use const T_FN;
use const T_FUNCTION;
use const T_IMPLEMENTS;
use const T_INCLUDE;
use const T_INCLUDE_ONCE;
use const T_INSTANCEOF;
use const T_INSTEADOF;
use const T_LOGICAL_AND;
use const T_LOGICAL_OR;
use const T_LOGICAL_XOR;
use const T_NAMESPACE;
use const T_NEW;
use const T_NS_SEPARATOR;
use const T_NULLABLE;
use const T_OPEN_CURLY_BRACKET;
use const T_OPEN_PARENTHESIS;
use const T_PRINT;
use const T_REQUIRE;
use const T_REQUIRE_ONCE;
use const T_RETURN;
use const T_SEMICOLON;
use const T_STRING;
use const T_THROW;
use const T_TYPE_CLOSE_PARENTHESIS;
use const T_TYPE_INTERSECTION;
use const T_TYPE_OPEN_PARENTHESIS;
Expand Down Expand Up @@ -381,17 +368,6 @@ private function processString(
) {
$type = 'class';
}
} elseif ($tokens[$prev]['code'] === T_COMMA) {
$before = $phpcsFile->findPrevious(
Tokens::$emptyTokens + [T_STRING => T_STRING, T_NS_SEPARATOR => T_NS_SEPARATOR],
$prev - 1,
null,
true
);

if ($tokens[$before]['code'] === T_IMPLEMENTS) {
$type = 'class';
}
} elseif ($tokens[$next]['code'] === T_SEMICOLON) {
$before = $phpcsFile->findPrevious(Tokens::$emptyTokens, $prev, null, true);

Expand Down Expand Up @@ -578,29 +554,6 @@ private function fixError(File $phpcsFile, int $stackPtr, string $expected) : vo
return;
}

if (in_array($tokens[$stackPtr - 1]['code'], [
T_NEW,
T_USE,
T_EXTENDS,
T_IMPLEMENTS,
T_INSTANCEOF,
T_INSTEADOF,
T_CASE,
T_PRINT,
T_ECHO,
T_REQUIRE,
T_REQUIRE_ONCE,
T_INCLUDE,
T_INCLUDE_ONCE,
T_RETURN,
T_LOGICAL_AND,
T_LOGICAL_OR,
T_LOGICAL_XOR,
T_THROW,
], true)) {
$expected = ' ' . $expected;
}

$phpcsFile->fixer->replaceToken($stackPtr, $expected);
$i = $stackPtr;
while (isset($tokens[++$i])) {
Expand Down

0 comments on commit 2769931

Please sign in to comment.