[Scoper] Fix bootstrap BackedEnum code (#877)

This commit is contained in:
Abdul Malik Ikhsan 2021-09-13 23:03:36 +07:00 committed by GitHub
parent fa63510c6f
commit 474024f9bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 2 deletions

View File

@ -55,7 +55,16 @@ if (! interface_exists('BackedEnum')) {
* @since 8.1
*/
interface BackedEnum extends UnitEnum {
public static function from(int|string $value): static;
public static function tryFrom(int|string $value): ?static;
/**
* @param int|string $value
* @return $this
*/
public static function from($value);
/**
* @param int|string $value
* @return $this|null
*/
public static function tryFrom($value);
}
}