| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| 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 | $e, |
||
| 44 | $filePath, |
||
| 45 | $lineNumber |
||
| 46 | ); |
||
| 47 | |||
| 48 | 1 | return $exception; |
|
| 49 | } |
||
| 50 | } |
||
| 51 |
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.