| Conditions | 2 |
| Paths | 2 |
| Total Lines | 7 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 43 | 2 | protected function selectTemplate(string $key): self |
|
| 44 | { |
||
| 45 | 2 | if (!isset(static::$knownTemplates[$key])) { |
|
| 46 | 1 | throw new TemplateException(sprintf('Unknown template %s from group %s', $key, get_class($this))); |
|
| 47 | } |
||
| 48 | 1 | $this->setTemplate(static::$knownTemplates[$key]); |
|
| 49 | 1 | return $this; |
|
| 50 | } |
||
| 52 |