diff --git a/src/Pool.php b/src/Pool.php index 5388fa54..95afc2ee 100644 --- a/src/Pool.php +++ b/src/Pool.php @@ -24,7 +24,7 @@ class Pool implements ArrayAccess /** @var \Spatie\Async\ParallelProcess[] */ protected $failed = []; - /** @var \Spatie\Async\ParallelProcess[] */ + /** @var \Spatie\Async\ParallelProcess[] */ protected $timeouts = []; protected $results = []; diff --git a/src/PoolDebugger.php b/src/PoolDebugger.php index f0ec13e7..07077178 100644 --- a/src/PoolDebugger.php +++ b/src/PoolDebugger.php @@ -8,8 +8,8 @@ class PoolDebugger { public static function statusForPool(Pool $pool): string { - return self::summaryForPool($pool) . "\n" - . self::statusForFailed($pool); + return self::summaryForPool($pool)."\n" + .self::statusForFailed($pool); } public static function summaryForPool(Pool $pool): string @@ -18,9 +18,9 @@ public static function summaryForPool(Pool $pool): string $failed = $pool->getFailed(); $timeouts = $pool->getTimeouts(); - return 'finished: ' . count($finished) - . ' - failed: ' . count($failed) - . ' - timeouts: ' . count($timeouts); + return 'finished: '.count($finished) + .' - failed: '.count($failed) + .' - timeouts: '.count($timeouts); } public static function statusForFailed(Pool $pool): string @@ -33,7 +33,7 @@ public static function statusForFailed(Pool $pool): string $output = $process->getErrorOutput(); if ($output instanceof SerializableException) { - $output = get_class($output->asThrowable()) . ' ' . $output->asThrowable()->getMessage(); + $output = get_class($output->asThrowable()).' '.$output->asThrowable()->getMessage(); } $status .= "{$process->getId()} failed with {$output}\n\n"; diff --git a/tests/PoolTest.php b/tests/PoolTest.php index 163f3cba..865a57ab 100644 --- a/tests/PoolTest.php +++ b/tests/PoolTest.php @@ -33,7 +33,7 @@ public function it_can_run_processes_in_parallel() $executionTime = $endTime - $startTime; - $this->assertLessThan(0.2, $executionTime, "Execution time was {$executionTime}, expected less than 0.2.\n" . PoolDebugger::statusForPool($pool)); + $this->assertLessThan(0.2, $executionTime, "Execution time was {$executionTime}, expected less than 0.2.\n".PoolDebugger::statusForPool($pool)); } /** @test */ @@ -115,7 +115,7 @@ public function it_can_handle_a_maximum_of_concurrent_processes() $executionTime = $endTime - $startTime; - $this->assertGreaterThanOrEqual(2, $executionTime, "Execution time was {$executionTime}, expected more than 2.\n" . PoolDebugger::statusForPool($pool)); + $this->assertGreaterThanOrEqual(2, $executionTime, "Execution time was {$executionTime}, expected more than 2.\n".PoolDebugger::statusForPool($pool)); $this->assertCount(3, $pool->getFinished(), PoolDebugger::statusForPool($pool)); }