| Total Complexity | 5 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 76.92% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class AssetExtension extends \Twig_Extension |
||
| 6 | { |
||
| 7 | private $projectpath; |
||
| 8 | |||
| 9 | 26 | public function __construct($projectpath) |
|
| 12 | 26 | } |
|
| 13 | |||
| 14 | 1 | public function getFunctions() |
|
| 15 | { |
||
| 16 | 1 | return [new \Twig_SimpleFunction('asset_exists', [$this, 'assetExists'], ['is_safe' => ['html']])]; |
|
| 17 | } |
||
| 18 | |||
| 19 | 11 | public function assetExists($path) |
|
| 35 | } |
||
| 36 | } |
||
| 37 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.