Skip to content

Commit 8053559

Browse files
committed
Added UselessVariableSniff to phpcs.xml
1 parent 3d02356 commit 8053559

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

SlevomatCodingStandard/Sniffs/ControlStructures/EarlyExitSniff.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,7 @@ private function getNegativeLogicalCondition(File $phpcsFile, int $conditionBoun
461461

462462
} while (true);
463463

464-
$negativeCondition .= $this->getNegativeCondition($phpcsFile, $nestedConditionStartPointer, $conditionBoundaryEndPointer, true);
465-
466-
return $negativeCondition;
464+
return $negativeCondition . $this->getNegativeCondition($phpcsFile, $nestedConditionStartPointer, $conditionBoundaryEndPointer, true);
467465
}
468466

469467
private function getNegativeCondition(File $phpcsFile, int $conditionBoundaryStartPointer, int $conditionBoundaryEndPointer, bool $nested = false): string

build/phpcs.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,5 @@
9393
<rule ref="SlevomatCodingStandard.TypeHints.NullTypeHintOnLastPosition"/>
9494
<rule ref="SlevomatCodingStandard.TypeHints.UselessConstantTypeHint"/>
9595
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable"/>
96+
<rule ref="SlevomatCodingStandard.Variables.UselessVariable"/>
9697
</ruleset>

0 commit comments

Comments
 (0)