Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public function get($templateName) |
||
22 | { |
||
23 | foreach ($this->types() as $key => $type) { |
||
24 | if ($key === $templateName) { |
||
25 | return $this->types()[$key]; |
||
26 | } |
||
27 | } |
||
28 | |||
29 | throw new \LogicException( |
||
30 | sprintf( |
||
31 | 'The given "%s" template name does not match with any form type', |
||
32 | $templateName |
||
33 | ) |
||
34 | ); |
||
35 | } |
||
36 | } |
||
37 |