mirror of https://github.com/rectorphp/rector.git
[TypeDeclaration] Handle UnitEnum not exists check on ParamTypeByParentCallTypeRector (#841)
This commit is contained in:
parent
ee95517c5d
commit
b8a6c976b4
|
@ -36,3 +36,16 @@ spl_autoload_register(function (string $class): void {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (! interface_exists('UnitEnum')) {
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
interface UnitEnum
|
||||
{
|
||||
/**
|
||||
* @return static[]
|
||||
*/
|
||||
public static function cases(): array;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
class SomeException extends \Exception
|
||||
{
|
||||
protected $message = '';
|
||||
|
||||
public function __construct($message = '', $code = 0, $previous = null)
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
$this->message = $message;
|
||||
$this->code = $code;
|
||||
}
|
||||
}
|
|
@ -11,8 +11,6 @@ if (interface_exists('UnitEnum')) {
|
|||
*/
|
||||
interface UnitEnum
|
||||
{
|
||||
public string $name;
|
||||
|
||||
/**
|
||||
* @return static[]
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue