| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 9 |
| 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[] = '/js/bootstrap.js'; |
||
| 25 | $this->css[] = '/css/bootstrap.css'; |
||
| 26 | } else { |
||
| 27 | $this->js[] = '/js/bootstrap.min.js'; |
||
| 28 | $this->css[] = '/css/bootstrap.min.css'; |
||
| 29 | } |
||
| 30 | |||
| 31 | $this->sourcePath = $view->container->kernel->getAppDir() . '/../vendor/twbs/bootstrap/dist'; |
||
| 32 | |||
| 33 | parent::__construct($view); |
||
| 34 | } |
||
| 35 | } |
||
| 36 |
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: