Skip to content

Commit eaa0c35

Browse files
committed
EarlyExitSniff: Fixed internal error
1 parent 60eed5d commit eaa0c35

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

SlevomatCodingStandard/Sniffs/ControlStructures/EarlyExitSniff.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ private function processElseIf(File $phpcsFile, int $elseIfPointer): void
218218
if (
219219
$previousConditionEarlyExitPointer !== null
220220
&& $tokens[$previousConditionEarlyExitPointer]['code'] === T_YIELD
221+
&& $elseIfEarlyExitPointer !== null
221222
&& $tokens[$elseIfEarlyExitPointer]['code'] === T_YIELD
222223
) {
223224
return;

0 commit comments

Comments
 (0)