diff --git a/lib/Context/DefaultContextFactory.php b/lib/Context/DefaultContextFactory.php index fcaa2d6..3cff64f 100644 --- a/lib/Context/DefaultContextFactory.php +++ b/lib/Context/DefaultContextFactory.php @@ -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); } -} \ No newline at end of file +} diff --git a/test/Context/DefaultContextFactoryTest.php b/test/Context/DefaultContextFactoryTest.php index b234b6d..b0bda7e 100644 --- a/test/Context/DefaultContextFactoryTest.php +++ b/test/Context/DefaultContextFactoryTest.php @@ -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 {