-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract
MatrixInterface::lowestAndHighest
into static class Versions
- Loading branch information
Showing
233 changed files
with
9,356 additions
and
9,312 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
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,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace TypistTech\PhpMatrix; | ||
|
||
use Composer\Semver\Semver; | ||
use UnexpectedValueException; | ||
|
||
readonly class Versions | ||
{ | ||
public static function sort(string ...$versions): array | ||
{ | ||
if (empty($versions)) { | ||
throw new UnexpectedValueException('Argument #1 ($versions) must not be empty'); | ||
} | ||
|
||
return Semver::sort($versions); | ||
} | ||
|
||
public static function lowest(string ...$versions): string | ||
{ | ||
$sorted = self::sort(...$versions); | ||
|
||
return $sorted[0]; | ||
} | ||
|
||
public static function highest(string ...$versions): string | ||
{ | ||
$sorted = self::sort(...$versions); | ||
|
||
return $sorted[array_key_last($sorted)]; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...mand__→_it_fails_with_data_set_____4_______auto_______full_______4____auto____full__.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^4'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...ails_with_data_set_____4_______auto_______minor_only_______4____auto____minor_only__.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^4'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...ails_with_data_set_____4_______auto_______not_a_mode_______4____auto____not_a_mode__.snap
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
2 changes: 1 addition & 1 deletion
2
..._Command__→_it_fails_with_data_set_____4_______auto______null______4____auto___null_.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^4'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
..._with_data_set_____4_______not_a_source_______full_______4____not_a_source____full__.snap
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
2 changes: 1 addition & 1 deletion
2
...et_____4_______not_a_source_______minor_only_______4____not_a_source____minor_only__.snap
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
2 changes: 1 addition & 1 deletion
2
...et_____4_______not_a_source_______not_a_mode_______4____not_a_source____not_a_mode__.snap
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
2 changes: 1 addition & 1 deletion
2
...ails_with_data_set_____4_______not_a_source______null______4____not_a_source___null_.snap
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
2 changes: 1 addition & 1 deletion
2
...→_it_fails_with_data_set_____4_______offline_______full_______4____offline____full__.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^4'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...ith_data_set_____4_______offline_______minor_only_______4____offline____minor_only__.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^4'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...ith_data_set_____4_______offline_______not_a_mode_______4____offline____not_a_mode__.snap
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
2 changes: 1 addition & 1 deletion
2
...nd__→_it_fails_with_data_set_____4_______offline______null______4____offline___null_.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^4'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...→_it_fails_with_data_set_____4_______php_net_______full_______4____php_net____full__.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^4'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...ith_data_set_____4_______php_net_______minor_only_______4____php_net____minor_only__.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^4'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...ith_data_set_____4_______php_net_______not_a_mode_______4____php_net____not_a_mode__.snap
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
2 changes: 1 addition & 1 deletion
2
...nd__→_it_fails_with_data_set_____4_______php_net______null______4____php_net___null_.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^4'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
..._Command__→_it_fails_with_data_set_____4______null______full_______4___null___full__.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^4'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...it_fails_with_data_set_____4______null______minor_only_______4___null___minor_only__.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^4'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...it_fails_with_data_set_____4______null______not_a_mode_______4___null___not_a_mode__.snap
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
2 changes: 1 addition & 1 deletion
2
...sole_Command__→_it_fails_with_data_set_____4______null_____null______4___null__null_.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^4'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...it_fails_with_data_set_____7_999_______auto_______full_______7_999____auto____full__.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^7.999'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...h_data_set_____7_999_______auto_______minor_only_______7_999____auto____minor_only__.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^7.999'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...h_data_set_____7_999_______auto_______not_a_mode_______7_999____auto____not_a_mode__.snap
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
2 changes: 1 addition & 1 deletion
2
...__→_it_fails_with_data_set_____7_999_______auto______null______7_999____auto___null_.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^7.999'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...ta_set_____7_999_______not_a_source_______full_______7_999____not_a_source____full__.snap
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
2 changes: 1 addition & 1 deletion
2
..._999_______not_a_source_______minor_only_______7_999____not_a_source____minor_only__.snap
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
2 changes: 1 addition & 1 deletion
2
..._999_______not_a_source_______not_a_mode_______7_999____not_a_source____not_a_mode__.snap
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
2 changes: 1 addition & 1 deletion
2
...h_data_set_____7_999_______not_a_source______null______7_999____not_a_source___null_.snap
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
2 changes: 1 addition & 1 deletion
2
...ls_with_data_set_____7_999_______offline_______full_______7_999____offline____full__.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^7.999'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
..._set_____7_999_______offline_______minor_only_______7_999____offline____minor_only__.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^7.999'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
..._set_____7_999_______offline_______not_a_mode_______7_999____offline____not_a_mode__.snap
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
2 changes: 1 addition & 1 deletion
2
..._fails_with_data_set_____7_999_______offline______null______7_999____offline___null_.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^7.999'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...ls_with_data_set_____7_999_______php_net_______full_______7_999____php_net____full__.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^7.999'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
..._set_____7_999_______php_net_______minor_only_______7_999____php_net____minor_only__.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^7.999'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
..._set_____7_999_______php_net_______not_a_mode_______7_999____php_net____not_a_mode__.snap
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
2 changes: 1 addition & 1 deletion
2
..._fails_with_data_set_____7_999_______php_net______null______7_999____php_net___null_.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^7.999'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...__→_it_fails_with_data_set_____7_999______null______full_______7_999___null___full__.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^7.999'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
..._with_data_set_____7_999______null______minor_only_______7_999___null___minor_only__.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^7.999'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
..._with_data_set_____7_999______null______not_a_mode_______7_999___null___not_a_mode__.snap
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
2 changes: 1 addition & 1 deletion
2
...mand__→_it_fails_with_data_set_____7_999______null_____null______7_999___null__null_.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '^7.999'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...→_it_fails_with_data_set______999_______auto_______full________999____auto____full__.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '>=999'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...ith_data_set______999_______auto_______minor_only________999____auto____minor_only__.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '>=999'. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...ith_data_set______999_______auto_______not_a_mode________999____auto____not_a_mode__.snap
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
2 changes: 1 addition & 1 deletion
2
...nd__→_it_fails_with_data_set______999_______auto______null_______999____auto___null_.snap
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,5 +1,5 @@ | ||
|
||
In Command.php line 116: | ||
In Command.php line 117: | ||
|
||
Error! No PHP versions could satisfy the constraint '>=999'. | ||
|
||
|
Oops, something went wrong.