Conditions | 1 |
Paths | 1 |
Total Lines | 8 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
40 | 7 | protected function addCssJs(array &$params) |
|
41 | { |
||
42 | 7 | $params['css'] = $this->container->getParameter('dtc_grid.theme.css'); |
|
43 | 7 | $params['js'] = $this->container->getParameter('dtc_grid.theme.js'); |
|
44 | 7 | $jQuery = $this->container->getParameter('dtc_grid.jquery'); |
|
45 | 7 | array_unshift($params['js'], $jQuery['url']); |
|
46 | 7 | $params['chartjs'] = $this->container->getParameter('dtc_queue.admin.chartjs'); |
|
47 | 7 | } |
|
48 | } |
||
49 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: