Skip to content

Commit

Permalink
Default value true is true when hydrating from keys
Browse files Browse the repository at this point in the history
  • Loading branch information
cerbero90 committed Oct 3, 2024
1 parent 637ed3c commit 8ee6742
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Concerns/Hydrates.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static function tryFrom(string $name): ?static
* @return CasesCollection<array-key, self>
* @throws ValueError
*/
public static function fromKey(callable|string $key, mixed $value): CasesCollection
public static function fromKey(callable|string $key, mixed $value = true): CasesCollection
{
if ($cases = self::tryFromKey($key, $value)) {
return $cases;
Expand All @@ -82,7 +82,7 @@ public static function fromKey(callable|string $key, mixed $value): CasesCollect
* @param (callable(self): mixed)|string $key
* @return ?CasesCollection<array-key, self>
*/
public static function tryFromKey(callable|string $key, mixed $value): ?CasesCollection
public static function tryFromKey(callable|string $key, mixed $value = true): ?CasesCollection
{
$cases = [];

Expand Down

0 comments on commit 8ee6742

Please sign in to comment.