@@ 200-212 (lines=13) @@ | ||
197 | * @param string $name |
|
198 | * @return ClassGenerator |
|
199 | */ |
|
200 | public function generateUnset(string $name): ClassGenerator |
|
201 | { |
|
202 | $this->class |
|
203 | ->addMethod(static::camelCase('unset_' . $name)) |
|
204 | ->addComment( |
|
205 | '@return ' . $this->class->getName() |
|
206 | )->setReturnType($this->getCanonicalClassName()) |
|
207 | ->setBody( |
|
208 | 'unset($this->__' . $name . '__[0]);' . PHP_EOL . |
|
209 | 'return $this;' |
|
210 | ); |
|
211 | return $this; |
|
212 | } |
|
213 | ||
214 | /** |
|
215 | * @param string $name |
|
@@ 320-332 (lines=13) @@ | ||
317 | * @param string $name |
|
318 | * @return ClassGenerator |
|
319 | */ |
|
320 | public function generateArrayClear(string $name): ClassGenerator |
|
321 | { |
|
322 | $this->class |
|
323 | ->addMethod(static::camelCase('clear_' . $name)) |
|
324 | ->addComment( |
|
325 | '@return ' . $this->class->getName() |
|
326 | )->setReturnType($this->getCanonicalClassName()) |
|
327 | ->setBody( |
|
328 | 'unset($this->__' . $name . '__[0]);' . PHP_EOL . |
|
329 | 'return $this;' |
|
330 | ); |
|
331 | return $this; |
|
332 | } |
|
333 | ||
334 | /** |
|
335 | * @param string $name |