1 | <?php |
||
21 | abstract class AbstractTypeDefinition extends AbstractDefinition implements TypeDefinition |
||
22 | { |
||
23 | use HasDirectives; |
||
24 | use HasDeprecation; |
||
25 | use HasInheritance; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $name; |
||
31 | |||
32 | /** |
||
33 | * @var string|null |
||
34 | */ |
||
35 | protected $description; |
||
36 | |||
37 | /** |
||
38 | * AbstractTypeDefinition constructor. |
||
39 | * @param Document|\Railt\Reflection\Contracts\Document $document |
||
40 | * @param string $name |
||
41 | */ |
||
42 | 9 | public function __construct(Document $document, string $name) |
|
48 | |||
49 | /** |
||
50 | * @return string |
||
51 | */ |
||
52 | public function getDescription(): string |
||
56 | |||
57 | /** |
||
58 | * @param null|string $description |
||
59 | * @return TypeDefinition|$this |
||
60 | */ |
||
61 | 9 | public function withDescription(?string $description): TypeDefinition |
|
67 | |||
68 | /** |
||
69 | * @param string $name |
||
70 | * @return TypeDefinition|$this |
||
71 | */ |
||
72 | 8 | public function renameTo(string $name): TypeDefinition |
|
78 | |||
79 | /** |
||
80 | * @return string |
||
81 | */ |
||
82 | 25 | public function getName(): string |
|
86 | |||
87 | /** |
||
88 | * @return string |
||
89 | */ |
||
90 | public function __toString(): string |
||
94 | } |
||
95 |