Total Complexity | 7 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
9 | class TodoBarController extends Controller { |
||
10 | |||
11 | public function getScripts() { |
||
13 | } |
||
14 | |||
15 | public function getDrawer() { |
||
16 | return View::make("laravel-todobar::todobar"); |
||
17 | } |
||
18 | |||
19 | public function getStyles() { |
||
20 | $dark_mode = config("todobar.dark_mode", false); |
||
21 | $file = "todobar.css"; |
||
22 | if ($dark_mode) { |
||
23 | $file = "todobar-dark.css"; |
||
24 | } |
||
25 | $path = $this->assets_path($file); |
||
26 | return "<style>" . file_get_contents($path) . "</style>"; |
||
27 | } |
||
28 | |||
29 | public function getInjection() |
||
30 | { |
||
31 | return $this->getStyles() . $this->getDrawer() . $this->getScripts(); |
||
32 | } |
||
33 | |||
34 | public function inject(Response $response) { |
||
35 | $response->setContent(str_replace("</body>", "</body>" . $this->getInjection(), $response->getContent())); |
||
36 | } |
||
37 | |||
38 | public function assets_path($file) |
||
41 | } |
||
42 | } |
||
43 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths