-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enum support in query type inference
- Loading branch information
Showing
10 changed files
with
1,389 additions
and
1,079 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,22 @@ | ||
<?php | ||
|
||
if (\PHP_VERSION_ID < 80100) { | ||
if (interface_exists('BackedEnum', false)) { | ||
return; | ||
} | ||
|
||
interface BackedEnum extends UnitEnum | ||
{ | ||
/** | ||
* @param int|string $value | ||
* @return static | ||
*/ | ||
public static function from($value); | ||
|
||
/** | ||
* @param int|string $value | ||
* @return ?static | ||
*/ | ||
public static function tryFrom($value); | ||
} | ||
} |
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,15 @@ | ||
<?php | ||
|
||
if (\PHP_VERSION_ID < 80100) { | ||
if (interface_exists('UnitEnum', false)) { | ||
return; | ||
} | ||
|
||
interface UnitEnum | ||
{ | ||
/** | ||
* @return static[] | ||
*/ | ||
public static function cases(): array; | ||
} | ||
} |
Oops, something went wrong.