@@ -97,19 +97,14 @@ public function __toString(): string
9797 }
9898
9999
100- /**
101- * Deprecated: an object can be in multiple namespaces.
102- * @deprecated
103- */
100+ /** @deprecated an object can be in multiple namespaces */
104101 public function getNamespace (): ?PhpNamespace
105102 {
106103 return $ this ->namespace ;
107104 }
108105
109106
110- /**
111- * @return static
112- */
107+ /** @return static */
113108 public function setName (?string $ name ): self
114109 {
115110 if ($ name !== null && !Helpers::isIdentifier ($ name )) {
@@ -126,9 +121,7 @@ public function getName(): ?string
126121 }
127122
128123
129- /**
130- * @return static
131- */
124+ /** @return static */
132125 public function setType (string $ type ): self
133126 {
134127 if (!in_array ($ type , [self ::TYPE_CLASS , self ::TYPE_INTERFACE , self ::TYPE_TRAIT ], true )) {
@@ -145,9 +138,7 @@ public function getType(): string
145138 }
146139
147140
148- /**
149- * @return static
150- */
141+ /** @return static */
151142 public function setFinal (bool $ state = true ): self
152143 {
153144 $ this ->final = $ state ;
@@ -161,9 +152,7 @@ public function isFinal(): bool
161152 }
162153
163154
164- /**
165- * @return static
166- */
155+ /** @return static */
167156 public function setAbstract (bool $ state = true ): self
168157 {
169158 $ this ->abstract = $ state ;
@@ -192,18 +181,14 @@ public function setExtends($names): self
192181 }
193182
194183
195- /**
196- * @return string|string[]
197- */
184+ /** @return string|string[] */
198185 public function getExtends ()
199186 {
200187 return $ this ->extends ;
201188 }
202189
203190
204- /**
205- * @return static
206- */
191+ /** @return static */
207192 public function addExtend (string $ name ): self
208193 {
209194 $ this ->validateNames ([$ name ]);
@@ -225,18 +210,14 @@ public function setImplements(array $names): self
225210 }
226211
227212
228- /**
229- * @return string[]
230- */
213+ /** @return string[] */
231214 public function getImplements (): array
232215 {
233216 return $ this ->implements ;
234217 }
235218
236219
237- /**
238- * @return static
239- */
220+ /** @return static */
240221 public function addImplement (string $ name ): self
241222 {
242223 $ this ->validateNames ([$ name ]);
@@ -257,27 +238,21 @@ public function setTraits(array $names): self
257238 }
258239
259240
260- /**
261- * @return string[]
262- */
241+ /** @return string[] */
263242 public function getTraits (): array
264243 {
265244 return array_keys ($ this ->traits );
266245 }
267246
268247
269- /**
270- * @internal
271- */
248+ /** @internal */
272249 public function getTraitResolutions (): array
273250 {
274251 return $ this ->traits ;
275252 }
276253
277254
278- /**
279- * @return static
280- */
255+ /** @return static */
281256 public function addTrait (string $ name , array $ resolutions = []): self
282257 {
283258 $ this ->validateNames ([$ name ]);
@@ -327,9 +302,7 @@ public function setConstants(array $consts): self
327302 }
328303
329304
330- /**
331- * @return Constant[]
332- */
305+ /** @return Constant[] */
333306 public function getConstants (): array
334307 {
335308 return $ this ->consts ;
@@ -342,9 +315,7 @@ public function addConstant(string $name, $value): Constant
342315 }
343316
344317
345- /**
346- * @return static
347- */
318+ /** @return static */
348319 public function removeConstant (string $ name ): self
349320 {
350321 unset($ this ->consts [$ name ]);
@@ -369,9 +340,7 @@ public function setProperties(array $props): self
369340 }
370341
371342
372- /**
373- * @return Property[]
374- */
343+ /** @return Property[] */
375344 public function getProperties (): array
376345 {
377346 return $ this ->properties ;
@@ -430,9 +399,7 @@ public function setMethods(array $methods): self
430399 }
431400
432401
433- /**
434- * @return Method[]
435- */
402+ /** @return Method[] */
436403 public function getMethods (): array
437404 {
438405 return $ this ->methods ;
@@ -460,9 +427,7 @@ public function addMethod(string $name): Method
460427 }
461428
462429
463- /**
464- * @return static
465- */
430+ /** @return static */
466431 public function removeMethod (string $ name ): self
467432 {
468433 unset($ this ->methods [$ name ]);
@@ -476,9 +441,7 @@ public function hasMethod(string $name): bool
476441 }
477442
478443
479- /**
480- * @throws Nette\InvalidStateException
481- */
444+ /** @throws Nette\InvalidStateException */
482445 public function validate (): void
483446 {
484447 if ($ this ->abstract && $ this ->final ) {
0 commit comments