Issues (24)

config/di/content.php (3 issues)

1
<?php
2
/**
3
 * Configuration file for DI container.
4
 */
5
return [
6
7
    // Services to add to the container.
8
    "services" => [
9
        "content" => [
10
            "shared" => true,
11
            "callback" => function () {
12
                $content = new \Anax\Content\FileBasedContent();
0 ignored issues
show
The type Anax\Content\FileBasedContent was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
                $content->setDI($this);
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
14
15
                // Load the configuration files
16
                $cfg = $this->get("configuration");
17
                $config = $cfg->load("content.php");
18
                $config = $config["config"] ?? null;
19
                $file = $config["file"] ?? null;
0 ignored issues
show
The assignment to $file is dead and can be removed.
Loading history...
20
21
                $content->configure($config);
22
23
                return $content;
24
            }
25
        ],
26
    ],
27
];
28