Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
38 | 1 | public static function castException (\Exception $e, $filePath) |
|
|
|||
39 | { |
||
40 | 1 | $lineNumber = ($e instanceof \Twig_Error_Syntax) ? $e->getTemplateLine() : -1; |
|
41 | |||
42 | 1 | $exception = new self( |
|
43 | 1 | $e->getMessage(), |
|
44 | 1 | $e->getCode(), |
|
45 | $e, |
||
46 | $filePath, |
||
47 | $lineNumber |
||
48 | ); |
||
49 | |||
50 | 1 | return $exception; |
|
51 | } |
||
52 | } |
Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.