Skip to content

Commit c88bf4f

Browse files
committed
Generic/DisallowYodaConditions: add comment documenting uncovered line
This commits adds a code comment to documment that the line below it cannot be covered by tests and cannot be removed as external sniffs may call `DisallowYodaConditionsSniff::isArrayStatic()` directly.
1 parent 9c47bd0 commit c88bf4f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Standards/Generic/Sniffs/ControlStructures/DisallowYodaConditionsSniff.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ public function isArrayStatic(File $phpcsFile, $arrayToken)
146146
$start = $tokens[$arrayToken]['parenthesis_opener'];
147147
$end = $tokens[$arrayToken]['parenthesis_closer'];
148148
} else {
149+
// Shouldn't be possible but may happen if external sniffs are using this method.
149150
return true;
150151
}
151152

0 commit comments

Comments
 (0)