mirror of
https://github.com/pestphp/pest.git
synced 2026-03-10 01:37:21 +01:00
style: plugin actions improvements
This commit is contained in:
@ -17,7 +17,7 @@ final class CallsAddsOutput
|
||||
*
|
||||
* Provides an opportunity for any plugins that want to provide additional output after test execution.
|
||||
*/
|
||||
public function __invoke(int $exitCode): int
|
||||
public static function execute(int $exitCode): int
|
||||
{
|
||||
$plugins = Loader::getPlugins(Plugins\AddsOutput::class);
|
||||
|
||||
|
||||
@ -15,9 +15,9 @@ final class CallsBoot
|
||||
/**
|
||||
* Executes the Plugin action.
|
||||
*
|
||||
* Provides an opportunity for any plugins to boot..
|
||||
* Provides an opportunity for any plugins to boot.
|
||||
*/
|
||||
public function __invoke(): void
|
||||
public static function execute(): void
|
||||
{
|
||||
$plugins = Loader::getPlugins(Plugins\Bootable::class);
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ final class CallsHandleArguments
|
||||
* @param array<int, string> $argv
|
||||
* @return array<int, string>
|
||||
*/
|
||||
public function __invoke(array $argv): array
|
||||
public static function execute(array $argv): array
|
||||
{
|
||||
$plugins = Loader::getPlugins(Plugins\HandlesArguments::class);
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ final class CallsShutdown
|
||||
*
|
||||
* Provides an opportunity for any plugins to shutdown.
|
||||
*/
|
||||
public function __invoke(): void
|
||||
public static function execute(): void
|
||||
{
|
||||
$plugins = Loader::getPlugins(Plugins\Shutdownable::class);
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace Pest\Plugins;
|
||||
|
||||
use ParaTest\ParaTestCommand;
|
||||
use Pest\Contracts\Plugins\AddsOutput;
|
||||
use Pest\Contracts\Plugins\HandlesArguments;
|
||||
use Pest\Plugins\Actions\CallsAddsOutput;
|
||||
use Pest\Plugins\Concerns\HandleArguments;
|
||||
@ -105,7 +106,7 @@ final class Parallel implements HandlesArguments
|
||||
|
||||
$exitCode = $this->paratestCommand()->run(new ArgvInput($filteredArguments), new CleanConsoleOutput());
|
||||
|
||||
return (new CallsAddsOutput())($exitCode);
|
||||
return CallsAddsOutput::execute($exitCode);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user