| @@ 183-194 (lines=12) @@ | ||
| 180 | * @param string $name |
|
| 181 | * @return ClassGenerator |
|
| 182 | */ |
|
| 183 | public function generateIsset(string $name): ClassGenerator |
|
| 184 | { |
|
| 185 | $this->class |
|
| 186 | ->addMethod(static::camelCase('isset_' . $name)) |
|
| 187 | ->addComment( |
|
| 188 | '@return bool' |
|
| 189 | )->setReturnType('bool') |
|
| 190 | ->setBody( |
|
| 191 | 'return isset($this->__' . $name . '__[0]);' |
|
| 192 | ); |
|
| 193 | return $this; |
|
| 194 | } |
|
| 195 | ||
| 196 | /** |
|
| 197 | * @param string $name |
|
| @@ 470-482 (lines=13) @@ | ||
| 467 | * @param string $name |
|
| 468 | * @return ClassGenerator |
|
| 469 | */ |
|
| 470 | public function generateConfigIsset(string $name): ClassGenerator |
|
| 471 | { |
|
| 472 | $this->class |
|
| 473 | ->addMethod(static::camelCase('isset_' . $name)) |
|
| 474 | ->addComment( |
|
| 475 | '@return bool' |
|
| 476 | )->setReturnType('bool') |
|
| 477 | ->setBody( |
|
| 478 | '// config is immutable' . PHP_EOL . |
|
| 479 | 'return true;' |
|
| 480 | ); |
|
| 481 | return $this; |
|
| 482 | } |
|
| 483 | ||
| 484 | /** |
|
| 485 | * @param string $name |
|