| Total Complexity | 6 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 53.33% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class AssetExtension extends \Twig_Extension |
||
| 11 | { |
||
| 12 | |||
| 13 | private $kernel; |
||
| 14 | |||
| 15 | 14 | public function __construct(KernelInterface $kernel) |
|
| 18 | 14 | } |
|
| 19 | |||
| 20 | public function getFunctions() |
||
| 21 | { |
||
| 22 | return [new \Twig_SimpleFunction('asset_exists', [$this, 'assetExists'], ['is_safe' => ['html']])]; |
||
| 23 | } |
||
| 24 | |||
| 25 | 7 | public function assetExists($path) |
|
| 41 | } |
||
| 42 | |||
| 43 | public function getName() |
||
| 46 | } |
||
| 47 | } |
||
| 48 |
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.