mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-03 09:50:49 +00:00
755d463439
1f6c7a6a20
[Scoper] Clean up bootstrap.php: move enum definitions to dedicated file and require in BootstrapFilesIncluder (#2248)
34 lines
611 B
PHP
34 lines
611 B
PHP
<?php
|
|
|
|
if (! interface_exists('UnitEnum')) {
|
|
/**
|
|
* @since 8.1
|
|
*/
|
|
interface UnitEnum
|
|
{
|
|
/**
|
|
* @return static[]
|
|
*/
|
|
public static function cases(): array;
|
|
}
|
|
}
|
|
|
|
if (! interface_exists('BackedEnum')) {
|
|
/**
|
|
* @since 8.1
|
|
*/
|
|
interface BackedEnum extends UnitEnum {
|
|
/**
|
|
* @param int|string $value
|
|
* @return $this
|
|
*/
|
|
public static function from($value);
|
|
|
|
/**
|
|
* @param int|string $value
|
|
* @return $this|null
|
|
*/
|
|
public static function tryFrom($value);
|
|
}
|
|
}
|