mirror of
https://github.com/danog/parallel.git
synced 2024-12-02 09:37:57 +01:00
CS Fix
This commit is contained in:
parent
8b74bb33f8
commit
26f869734a
@ -6,7 +6,7 @@ use Amp\Promise;
|
||||
|
||||
class DefaultContextFactory implements ContextFactory
|
||||
{
|
||||
function create($script): Context
|
||||
public function create($script): Context
|
||||
{
|
||||
/**
|
||||
* Creates a thread if ext-parallel is installed, otherwise creates a child process.
|
||||
@ -25,7 +25,7 @@ class DefaultContextFactory implements ContextFactory
|
||||
*
|
||||
* @inheritdoc
|
||||
*/
|
||||
function run($script): Promise
|
||||
public function run($script): Promise
|
||||
{
|
||||
if (Parallel::isSupported()) {
|
||||
return Parallel::run($script);
|
||||
@ -33,4 +33,4 @@ class DefaultContextFactory implements ContextFactory
|
||||
|
||||
return Process::run($script);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ use Amp\Parallel\Context\DefaultContextFactory;
|
||||
use Amp\Parallel\Sync\ContextPanicError;
|
||||
use Amp\PHPUnit\AsyncTestCase;
|
||||
|
||||
class DefaultWorkerFactoryTest extends AsyncTestCase
|
||||
class DefaultContextFactoryTest extends AsyncTestCase
|
||||
{
|
||||
public function testCreate(): void
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user