| @@ 194-205 (lines=12) @@ | ||
| 191 | * @param string $name |
|
| 192 | * @return ClassGenerator |
|
| 193 | */ |
|
| 194 | public function generateIsset(string $name): ClassGenerator |
|
| 195 | { |
|
| 196 | $this->class |
|
| 197 | ->addMethod(static::camelCase('isset_' . $name)) |
|
| 198 | ->addComment( |
|
| 199 | '@return bool' |
|
| 200 | )->setReturnType('bool') |
|
| 201 | ->setBody( |
|
| 202 | 'return isset($this->__' . $name . '__[0]);' |
|
| 203 | ); |
|
| 204 | return $this; |
|
| 205 | } |
|
| 206 | ||
| 207 | /** |
|
| 208 | * @param string $name |
|
| @@ 534-546 (lines=13) @@ | ||
| 531 | * @param string $name |
|
| 532 | * @return ClassGenerator |
|
| 533 | */ |
|
| 534 | public function generateConfigIsset(string $name): ClassGenerator |
|
| 535 | { |
|
| 536 | $this->class |
|
| 537 | ->addMethod(static::camelCase('isset_' . $name)) |
|
| 538 | ->addComment( |
|
| 539 | '@return bool' |
|
| 540 | )->setReturnType('bool') |
|
| 541 | ->setBody( |
|
| 542 | '// config is immutable' . PHP_EOL . |
|
| 543 | 'return true;' |
|
| 544 | ); |
|
| 545 | return $this; |
|
| 546 | } |
|
| 547 | ||
| 548 | /** |
|
| 549 | * @param string $name |
|