@@ -97,19 +97,14 @@ public function __toString(): string
97
97
}
98
98
99
99
100
- /**
101
- * Deprecated: an object can be in multiple namespaces.
102
- * @deprecated
103
- */
100
+ /** @deprecated an object can be in multiple namespaces */
104
101
public function getNamespace (): ?PhpNamespace
105
102
{
106
103
return $ this ->namespace ;
107
104
}
108
105
109
106
110
- /**
111
- * @return static
112
- */
107
+ /** @return static */
113
108
public function setName (?string $ name ): self
114
109
{
115
110
if ($ name !== null && !Helpers::isIdentifier ($ name )) {
@@ -126,9 +121,7 @@ public function getName(): ?string
126
121
}
127
122
128
123
129
- /**
130
- * @return static
131
- */
124
+ /** @return static */
132
125
public function setType (string $ type ): self
133
126
{
134
127
if (!in_array ($ type , [self ::TYPE_CLASS , self ::TYPE_INTERFACE , self ::TYPE_TRAIT ], true )) {
@@ -145,9 +138,7 @@ public function getType(): string
145
138
}
146
139
147
140
148
- /**
149
- * @return static
150
- */
141
+ /** @return static */
151
142
public function setFinal (bool $ state = true ): self
152
143
{
153
144
$ this ->final = $ state ;
@@ -161,9 +152,7 @@ public function isFinal(): bool
161
152
}
162
153
163
154
164
- /**
165
- * @return static
166
- */
155
+ /** @return static */
167
156
public function setAbstract (bool $ state = true ): self
168
157
{
169
158
$ this ->abstract = $ state ;
@@ -192,18 +181,14 @@ public function setExtends($names): self
192
181
}
193
182
194
183
195
- /**
196
- * @return string|string[]
197
- */
184
+ /** @return string|string[] */
198
185
public function getExtends ()
199
186
{
200
187
return $ this ->extends ;
201
188
}
202
189
203
190
204
- /**
205
- * @return static
206
- */
191
+ /** @return static */
207
192
public function addExtend (string $ name ): self
208
193
{
209
194
$ this ->validateNames ([$ name ]);
@@ -225,18 +210,14 @@ public function setImplements(array $names): self
225
210
}
226
211
227
212
228
- /**
229
- * @return string[]
230
- */
213
+ /** @return string[] */
231
214
public function getImplements (): array
232
215
{
233
216
return $ this ->implements ;
234
217
}
235
218
236
219
237
- /**
238
- * @return static
239
- */
220
+ /** @return static */
240
221
public function addImplement (string $ name ): self
241
222
{
242
223
$ this ->validateNames ([$ name ]);
@@ -257,27 +238,21 @@ public function setTraits(array $names): self
257
238
}
258
239
259
240
260
- /**
261
- * @return string[]
262
- */
241
+ /** @return string[] */
263
242
public function getTraits (): array
264
243
{
265
244
return array_keys ($ this ->traits );
266
245
}
267
246
268
247
269
- /**
270
- * @internal
271
- */
248
+ /** @internal */
272
249
public function getTraitResolutions (): array
273
250
{
274
251
return $ this ->traits ;
275
252
}
276
253
277
254
278
- /**
279
- * @return static
280
- */
255
+ /** @return static */
281
256
public function addTrait (string $ name , array $ resolutions = []): self
282
257
{
283
258
$ this ->validateNames ([$ name ]);
@@ -327,9 +302,7 @@ public function setConstants(array $consts): self
327
302
}
328
303
329
304
330
- /**
331
- * @return Constant[]
332
- */
305
+ /** @return Constant[] */
333
306
public function getConstants (): array
334
307
{
335
308
return $ this ->consts ;
@@ -342,9 +315,7 @@ public function addConstant(string $name, $value): Constant
342
315
}
343
316
344
317
345
- /**
346
- * @return static
347
- */
318
+ /** @return static */
348
319
public function removeConstant (string $ name ): self
349
320
{
350
321
unset($ this ->consts [$ name ]);
@@ -369,9 +340,7 @@ public function setProperties(array $props): self
369
340
}
370
341
371
342
372
- /**
373
- * @return Property[]
374
- */
343
+ /** @return Property[] */
375
344
public function getProperties (): array
376
345
{
377
346
return $ this ->properties ;
@@ -430,9 +399,7 @@ public function setMethods(array $methods): self
430
399
}
431
400
432
401
433
- /**
434
- * @return Method[]
435
- */
402
+ /** @return Method[] */
436
403
public function getMethods (): array
437
404
{
438
405
return $ this ->methods ;
@@ -460,9 +427,7 @@ public function addMethod(string $name): Method
460
427
}
461
428
462
429
463
- /**
464
- * @return static
465
- */
430
+ /** @return static */
466
431
public function removeMethod (string $ name ): self
467
432
{
468
433
unset($ this ->methods [$ name ]);
@@ -476,9 +441,7 @@ public function hasMethod(string $name): bool
476
441
}
477
442
478
443
479
- /**
480
- * @throws Nette\InvalidStateException
481
- */
444
+ /** @throws Nette\InvalidStateException */
482
445
public function validate (): void
483
446
{
484
447
if ($ this ->abstract && $ this ->final ) {
0 commit comments