Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
21 | public function __construct(IView $view) |
||
22 | { |
||
23 | if ($view->container->kernel->isDebug()) { |
||
|
|||
24 | $this->js[] = '/jquery.js'; |
||
25 | } else { |
||
26 | $this->js[] = '/jquery.min.js'; |
||
27 | } |
||
28 | |||
29 | $this->sourcePath = $view->container->kernel->getAppDir() . '/../vendor/components/jquery'; |
||
30 | |||
31 | parent::__construct($view); |
||
32 | } |
||
33 | } |
||
34 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: