3 declare(strict_types=1);
5 namespace CuyZ\Valinor\Type\Parser\Exception\Generic;
7 use CuyZ\Valinor\Type\Parser\Exception\InvalidType;
8 use CuyZ\Valinor\Type\Type;
13 final class InvalidExtendTagType extends RuntimeException implements InvalidType
16 * @param ReflectionClass<object> $reflection
18 public function __construct(ReflectionClass $reflection, Type $invalidExtendTag)
20 /** @var ReflectionClass<object> $parentClass */
21 $parentClass = $reflection->getParentClass();
24 "The `@extends` tag of the class `$reflection->name` has invalid type `{$invalidExtendTag->toString()}`, it should be `{$parentClass->name}`.",