-
-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Introduce a
--diff=diffMode
option (#1044)
- Introduce a new option `--diff=list|git|gnu`. - Deprecate `--list-diff`, `--git-diff` and `--gnu-diff` in favour of the `--diff` option.
- Loading branch information
Showing
4 changed files
with
235 additions
and
73 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the box project. | ||
* | ||
* (c) Kevin Herrera <[email protected]> | ||
* Théo Fidry <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace KevinGH\Box\Phar; | ||
|
||
use function array_map; | ||
|
||
enum DiffMode: string | ||
{ | ||
case LIST = 'list'; | ||
case GIT = 'git'; | ||
case GNU = 'gnu'; | ||
|
||
/** | ||
* @return list<string> | ||
*/ | ||
public static function values(): array | ||
{ | ||
return array_map( | ||
static fn (self $enum) => $enum->value, | ||
self::cases(), | ||
); | ||
} | ||
} |
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
Oops, something went wrong.