| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 52 | final public function resolve(string $name, string $email): array |
||
| 53 | { |
||
| 54 | $method = 'get' . ucfirst($name) . 'Variable'; |
||
| 55 | |||
| 56 | if (!method_exists($this, $method)) { |
||
| 57 | throw new Exception('Method ' . $method . ' should be defined.'); |
||
| 58 | } |
||
| 59 | |||
| 60 | return [ |
||
| 61 | 'name' => $name, |
||
| 62 | 'content' => call_user_func([$this, $method], $email) |
||
| 63 | ]; |
||
| 78 | } |