Skip to content

Commit d768453

Browse files
committed
Short closure
1 parent 0c866ad commit d768453

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Exercise/HaveTheLastSay.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,10 @@ public function check(Input $input): ResultInterface
116116
return $result;
117117
}
118118

119-
$funcCall = (new NodeFinder())->findFirst($statements, function ($node) {
120-
return $node instanceof FuncCall && $node->name->toString() === 'fgetcsv';
121-
});
119+
$funcCall = (new NodeFinder())->findFirst(
120+
$statements,
121+
fn ($node) => $node instanceof FuncCall && $node->name->toString() === 'fgetcsv'
122+
);
122123

123124
if ($funcCall->args[0]->name !== null) {
124125
return Failure::fromNameAndReason(

0 commit comments

Comments
 (0)