Skip to content

Commit fd025f2

Browse files
committed
minor #1025 [Agent] Use static closures in array_map calls (OskarStark)
This PR was merged into the main branch. Discussion ---------- [Agent] Use static closures in array_map calls | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Docs? | no | Issues | -- | License | MIT Commits ------- 0b1e91d [Agent] Use static closures in array_map calls
2 parents 56689f0 + 0b1e91d commit fd025f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/agent/src/Agent.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function getName(): string
6969
public function call(MessageBag $messages, array $options = []): ResultInterface
7070
{
7171
$input = new Input($this->getModel(), $messages, $options);
72-
array_map(fn (InputProcessorInterface $processor) => $processor->processInput($input), $this->inputProcessors);
72+
array_map(static fn (InputProcessorInterface $processor) => $processor->processInput($input), $this->inputProcessors);
7373

7474
$model = $input->getModel();
7575
$messages = $input->getMessageBag();
@@ -78,7 +78,7 @@ public function call(MessageBag $messages, array $options = []): ResultInterface
7878
$result = $this->platform->invoke($model, $messages, $options)->getResult();
7979

8080
$output = new Output($model, $result, $messages, $options);
81-
array_map(fn (OutputProcessorInterface $processor) => $processor->processOutput($output), $this->outputProcessors);
81+
array_map(static fn (OutputProcessorInterface $processor) => $processor->processOutput($output), $this->outputProcessors);
8282

8383
return $output->getResult();
8484
}

0 commit comments

Comments
 (0)