| @@ 157-168 (lines=12) @@ | ||
| 154 | * @param string $name |
|
| 155 | * @return ClassGenerator |
|
| 156 | */ |
|
| 157 | public function generateIsset(string $name): ClassGenerator |
|
| 158 | { |
|
| 159 | $this->class |
|
| 160 | ->addMethod(static::camelCase('isset_' . $name)) |
|
| 161 | ->addComment( |
|
| 162 | '@return bool' |
|
| 163 | )->setReturnType('bool') |
|
| 164 | ->setBody( |
|
| 165 | 'return isset($this->__' . $name . '__[0]);' |
|
| 166 | ); |
|
| 167 | return $this; |
|
| 168 | } |
|
| 169 | ||
| 170 | /** |
|
| 171 | * @param string $name |
|
| @@ 444-456 (lines=13) @@ | ||
| 441 | * @param string $name |
|
| 442 | * @return ClassGenerator |
|
| 443 | */ |
|
| 444 | public function generateConfigIsset(string $name): ClassGenerator |
|
| 445 | { |
|
| 446 | $this->class |
|
| 447 | ->addMethod(static::camelCase('isset_' . $name)) |
|
| 448 | ->addComment( |
|
| 449 | '@return bool' |
|
| 450 | )->setReturnType('bool') |
|
| 451 | ->setBody( |
|
| 452 | '// config is immutable' . PHP_EOL . |
|
| 453 | 'return true;' |
|
| 454 | ); |
|
| 455 | return $this; |
|
| 456 | } |
|
| 457 | ||
| 458 | /** |
|
| 459 | * @param string $name |
|