Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
36 | 1 | public static function castException(\Exception $e, $filePath) |
|
37 | { |
||
38 | 1 | $lineNumber = ($e instanceof \Twig_Error_Syntax) ? $e->getTemplateLine() : -1; |
|
39 | |||
40 | 1 | $exception = new self( |
|
41 | 1 | $e->getMessage(), |
|
42 | 1 | $e->getCode(), |
|
43 | 1 | $e, |
|
44 | 1 | $filePath, |
|
45 | 1 | $lineNumber |
|
46 | ); |
||
47 | |||
48 | 1 | return $exception; |
|
49 | } |
||
50 | } |
||
51 |