generated from pestphp/pest-plugin-template
-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds
--arch
and --exclude-arch
CLI args.
- Loading branch information
1 parent
7cc2579
commit 28519b7
Showing
4 changed files
with
16 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,29 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Pest\Arch; | ||
|
||
use Pest\Arch\Support\CommandArgumentMode; | ||
use Pest\Contracts\Plugins\Bootable; | ||
use Pest\Contracts\Plugins\HandlesArguments; | ||
use Pest\Plugins\Concerns\HandleArguments; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
final class Plugin implements HandlesArguments, Bootable | ||
final class Plugin implements HandlesArguments | ||
{ | ||
use HandleArguments; | ||
|
||
private CommandArgumentMode $mode; | ||
|
||
public function handleArguments(array $arguments): array | ||
{ | ||
if (! $this->hasArgument('--arch', $arguments)) { | ||
return $arguments; | ||
if ($this->hasArgument('--arch', $arguments)) { | ||
return $this->pushArgument('--group=arch', $this->popArgument('--arch', $arguments)); | ||
} | ||
|
||
return $this->popArgument('--arch', $arguments); | ||
} | ||
if ($this->hasArgument('--exclude-arch', $arguments)) { | ||
return $this->pushArgument('--exclude-group=arch', $this->popArgument('--exclude-arch', $arguments)); | ||
} | ||
|
||
public function boot(): void | ||
{ | ||
return $arguments; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.