diff --git a/MO4/Sniffs/Arrays/ArrayDoubleArrowAlignmentSniff.php b/MO4/Sniffs/Arrays/ArrayDoubleArrowAlignmentSniff.php index 50f17c2..1ccf49c 100644 --- a/MO4/Sniffs/Arrays/ArrayDoubleArrowAlignmentSniff.php +++ b/MO4/Sniffs/Arrays/ArrayDoubleArrowAlignmentSniff.php @@ -98,7 +98,7 @@ public function process(File $phpcsFile, $stackPtr): void $previous = $tokens[($i - 1)]; // Skip nested arrays. - if (true === \in_array($current['code'], $this->arrayTokens, true)) { + if (\in_array($current['code'], $this->arrayTokens, true)) { $i = T_ARRAY === $current['code'] ? ($current['parenthesis_closer'] + 1) : ($current['bracket_closer'] + 1); continue; @@ -147,7 +147,7 @@ public function process(File $phpcsFile, $stackPtr): void $j = ($i - 1); while (($j >= 0) && ($tokens[$j]['line'] === $current['line'])) { - if (false === \in_array($tokens[$j]['code'], PHP_CodeSniffer_Tokens::$emptyTokens, true)) { + if (!\in_array($tokens[$j]['code'], PHP_CodeSniffer_Tokens::$emptyTokens, true)) { $hasKeyInLine = true; } diff --git a/MO4/Sniffs/Formatting/AlphabeticalUseStatementsSniff.php b/MO4/Sniffs/Formatting/AlphabeticalUseStatementsSniff.php index 58f47ad..43fe70e 100644 --- a/MO4/Sniffs/Formatting/AlphabeticalUseStatementsSniff.php +++ b/MO4/Sniffs/Formatting/AlphabeticalUseStatementsSniff.php @@ -91,7 +91,7 @@ class AlphabeticalUseStatementsSniff extends UseDeclarationSniff */ public function process(File $phpcsFile, $stackPtr): void { - if (false === \in_array($this->order, self::SUPPORTED_ORDERING_METHODS, true)) { + if (!\in_array($this->order, self::SUPPORTED_ORDERING_METHODS, true)) { $error = \sprintf( "'%s' is not a valid order function for %s! Pick one of: %s", $this->order, diff --git a/MO4/Sniffs/Formatting/UnnecessaryNamespaceUsageSniff.php b/MO4/Sniffs/Formatting/UnnecessaryNamespaceUsageSniff.php index 8d0297d..c755491 100644 --- a/MO4/Sniffs/Formatting/UnnecessaryNamespaceUsageSniff.php +++ b/MO4/Sniffs/Formatting/UnnecessaryNamespaceUsageSniff.php @@ -127,7 +127,7 @@ public function process(File $phpcsFile, $stackPtr): void foreach ($tokens[$nsSep]['comment_tags'] as $tag) { $content = $tokens[$tag]['content']; - if (false === \array_key_exists($content, $docCommentTags)) { + if (!\array_key_exists($content, $docCommentTags)) { continue; } @@ -181,7 +181,7 @@ public function process(File $phpcsFile, $stackPtr): void // phpcs:enable foreach ($typeTokens as $typeToken) { - if (true === \in_array($typeToken, $useStatements, true)) { + if (\in_array($typeToken, $useStatements, true)) { continue; } @@ -343,7 +343,7 @@ private function checkShorthandPossible(File $phpcsFile, array $useStatements, s $fullClassName = $this->getFullyQualifiedClassName($className); - if (true === \array_key_exists($fullClassName, $useStatements)) { + if (\array_key_exists($fullClassName, $useStatements)) { $replacement = $useStatements[$fullClassName]; $data = [