mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 12:24:49 +01:00
Suppress extra thing
This commit is contained in:
parent
38cee39c22
commit
d7f5fa29df
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user