style: plugin actions improvements

This commit is contained in:
Nuno Maduro
2023-02-17 21:36:04 +00:00
parent 49619ff2b5
commit b4b4bf3685
7 changed files with 13 additions and 11 deletions

View File

@ -8,6 +8,7 @@ use Pest\Contracts\Bootstrapper;
use Pest\Exceptions\NoDirtyTestsFound;
use Pest\Plugins\Actions\CallsAddsOutput;
use Pest\Plugins\Actions\CallsBoot;
use Pest\Plugins\Actions\CallsHandleArguments;
use Pest\Plugins\Actions\CallsShutdown;
use Pest\Support\Container;
use PHPUnit\TextUI\Application;
@ -68,7 +69,7 @@ final class Kernel
$bootstrapper->boot();
}
(new CallsBoot())->__invoke();
CallsBoot::execute();
return new self(
new Application(),
@ -83,7 +84,7 @@ final class Kernel
*/
public function handle(array $args): int
{
$args = (new Plugins\Actions\CallsHandleArguments())->__invoke($args);
$args = CallsHandleArguments::execute($args);
try {
$this->application->run($args);
@ -95,7 +96,7 @@ final class Kernel
]);
}
return (new CallsAddsOutput())->__invoke(
return CallsAddsOutput::execute(
Result::exitCode(),
);
}
@ -105,6 +106,6 @@ final class Kernel
*/
public function shutdown(): void
{
(new CallsShutdown())->__invoke();
CallsShutdown::execute();
}
}