mirror of
https://github.com/pestphp/pest.git
synced 2026-03-09 09:17:23 +01:00
feat: adds --retry option
This commit is contained in:
30
src/Plugins/Retry.php
Normal file
30
src/Plugins/Retry.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Pest\Plugins;
|
||||
|
||||
use Pest\Contracts\Plugins\HandlesArguments;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class Retry implements HandlesArguments
|
||||
{
|
||||
use Concerns\HandleArguments;
|
||||
|
||||
/**
|
||||
* Whether it should show retry or not.
|
||||
*/
|
||||
public static bool $retrying = false;
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function handleArguments(array $arguments): array
|
||||
{
|
||||
self::$retrying = $this->hasArgument('--retry', $arguments);
|
||||
|
||||
return $this->popArgument('--retry', $arguments);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user