Skip to content

Commit dfab545

Browse files
fix(Enums): Removed return type enforcement
Return type enforcement in contract and trait would prevent type return enforcement in implementation
1 parent 48b4837 commit dfab545

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/Utils/Contracts/Enums/EnumToStringLowerTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function __toString(): string
3535
*
3636
* @return Enum
3737
*/
38-
public static function byNameInsensitive(string $name): Enum
38+
public static function byNameInsensitive(string $name)
3939
{
4040
return self::byName(Str::upper($name));
4141
}
@@ -47,7 +47,7 @@ public static function byNameInsensitive(string $name): Enum
4747
*
4848
* @return Enum
4949
*/
50-
public static function byValueInsensitive(string $value): Enum
50+
public static function byValueInsensitive(string $value)
5151
{
5252
return self::byValue(Str::lower($value));
5353
}

src/Utils/Contracts/Enums/IEnumInsensitive.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ interface IEnumInsensitive
2424
*
2525
* @return Enum
2626
*/
27-
public static function byValueInsensitive(string $value): Enum;
27+
public static function byValueInsensitive(string $value);
2828

2929
/**
3030
* Retrieve enumeration instance by name, case insensitive
@@ -33,7 +33,7 @@ public static function byValueInsensitive(string $value): Enum;
3333
*
3434
* @return Enum
3535
*/
36-
public static function byNameInsensitive(string $name): Enum;
36+
public static function byNameInsensitive(string $name);
3737

3838
/**
3939
* String representing the different values of enumeration

0 commit comments

Comments
 (0)