| Conditions | 4 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | protected function findTemplate(Request $request, $format, $code, $showException) |
||
| 10 | { |
||
| 11 | if (!$showException) { |
||
| 12 | $templates = [ |
||
| 13 | sprintf('%s.%s.twig', $code, $format), |
||
| 14 | sprintf('%sxx.%s.twig', substr($code, 0, 1), $format), |
||
| 15 | ]; |
||
| 16 | |||
| 17 | foreach ($templates as $template) { |
||
| 18 | $templateFile = '_error/'.$template; |
||
| 19 | if ($this->templateExists($templateFile)) { |
||
| 20 | return $templateFile; |
||
| 21 | } |
||
| 22 | } |
||
| 23 | } |
||
| 24 | |||
| 25 | return parent::findTemplate($request, $format, $code, $showException); |
||
| 26 | } |
||
| 27 | } |
||
| 28 |