@@ 211-223 (lines=13) @@ | ||
208 | * @param string $name |
|
209 | * @return ClassGenerator |
|
210 | */ |
|
211 | public function generateUnset(string $name): ClassGenerator |
|
212 | { |
|
213 | $this->class |
|
214 | ->addMethod(static::camelCase('unset_' . $name)) |
|
215 | ->addComment( |
|
216 | '@return ' . $this->class->getName() |
|
217 | )->setReturnType($this->getCanonicalClassName()) |
|
218 | ->setBody( |
|
219 | 'unset($this->__' . $name . '__[0]);' . PHP_EOL . |
|
220 | 'return $this;' |
|
221 | ); |
|
222 | return $this; |
|
223 | } |
|
224 | ||
225 | /** |
|
226 | * @param string $name |
|
@@ 401-413 (lines=13) @@ | ||
398 | * @param string $name |
|
399 | * @return ClassGenerator |
|
400 | */ |
|
401 | public function generateArrayClear(string $name): ClassGenerator |
|
402 | { |
|
403 | $this->class |
|
404 | ->addMethod(static::camelCase('clear_' . $name)) |
|
405 | ->addComment( |
|
406 | '@return ' . $this->class->getName() |
|
407 | )->setReturnType($this->getCanonicalClassName()) |
|
408 | ->setBody( |
|
409 | 'unset($this->__' . $name . '__[0]);' . PHP_EOL . |
|
410 | 'return $this;' |
|
411 | ); |
|
412 | return $this; |
|
413 | } |
|
414 | ||
415 | /** |
|
416 | * @param string $name |