Skip to content

Commit f839abc

Browse files
Dukeczsamsonasik
andauthored
Added break to avoid unnecessary foreach iteration
Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
1 parent c0ef6a5 commit f839abc

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

rules/CodeQuality/Rector/ClassMethod/ReplaceTestAnnotationWithPrefixedFunctionRector.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public function refactor(Node $node): ?Node
9090
foreach(NewLineSplitter::split($docComment->getText()) as $row) {
9191
if (in_array(trim($row), ['*@test', '* @test'])) {
9292
$hasAnnotation = true;
93+
break;
9394
}
9495
}
9596

0 commit comments

Comments
 (0)