Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
28 | 2 | public function render(Template $template) |
|
29 | { |
||
30 | // Otherwise, we look for a compile method |
||
31 | 2 | $method = 'render'.ucfirst($template->getName()); |
|
32 | 2 | if (!method_exists($this, $method)) { |
|
33 | 1 | return null; |
|
34 | } |
||
35 | |||
36 | /** @var Type $type */ |
||
37 | 1 | $type = $this->$method($template); |
|
38 | |||
39 | 1 | return $type->toNative() ?? $type; |
|
40 | } |
||
41 | } |
||
42 |