mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-02 15:08:45 +02:00
Re-dump autoloader and composer.lock
This commit is contained in:
@@ -26,7 +26,7 @@ final class EnumRequirement implements \Stringable
|
||||
{
|
||||
if (\is_string($cases)) {
|
||||
if (!is_subclass_of($cases, \BackedEnum::class, true)) {
|
||||
throw new InvalidArgumentException(sprintf('"%s" is not a "BackedEnum" class.', $cases));
|
||||
throw new InvalidArgumentException(\sprintf('"%s" is not a "BackedEnum" class.', $cases));
|
||||
}
|
||||
|
||||
$cases = $cases::cases();
|
||||
@@ -35,13 +35,13 @@ final class EnumRequirement implements \Stringable
|
||||
|
||||
foreach ($cases as $case) {
|
||||
if (!$case instanceof \BackedEnum) {
|
||||
throw new InvalidArgumentException(sprintf('Case must be a "BackedEnum" instance, "%s" given.', get_debug_type($case)));
|
||||
throw new InvalidArgumentException(\sprintf('Case must be a "BackedEnum" instance, "%s" given.', get_debug_type($case)));
|
||||
}
|
||||
|
||||
$class ??= $case::class;
|
||||
|
||||
if (!$case instanceof $class) {
|
||||
throw new InvalidArgumentException(sprintf('"%s::%s" is not a case of "%s".', get_debug_type($case), $case->name, $class));
|
||||
throw new InvalidArgumentException(\sprintf('"%s::%s" is not a case of "%s".', get_debug_type($case), $case->name, $class));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user