diff --git a/src/Psalm/Internal/Fork/Pool.php b/src/Psalm/Internal/Fork/Pool.php index fcb130e53..1d499bba5 100644 --- a/src/Psalm/Internal/Fork/Pool.php +++ b/src/Psalm/Internal/Fork/Pool.php @@ -42,6 +42,7 @@ class Pool * A closure to execute when a task is done * * @psalm-suppress MixedAssignment + * @psalm-suppress MixedArgument */ public function __construct( array $process_task_data_iterator, @@ -133,7 +134,7 @@ class Pool $task_done_buffer = ''; foreach ($task_data_iterator as $i => $task_data) { - $task_result = self::runTaskClosure($task_closure, $i, $task_data); + $task_result = $task_closure($i, $task_data); $task_done_message = new ForkTaskDoneMessage($task_result); $serialized_message = $task_done_buffer . base64_encode(serialize($task_done_message)) . PHP_EOL; @@ -177,16 +178,6 @@ class Pool exit(self::EXIT_SUCCESS); } - /** - * @param \Closure(int, mixed):mixed $task_closure - * @param mixed $task_data - * @return mixed - */ - private static function runTaskClosure(\Closure $task_closure, int $i, $task_data) - { - return $task_closure($i, $task_data); - } - /** * Prepare the socket pair to be used in a parent process and * return the stream the parent will use to read results.