Issues (35)

config/di/remserver.php (2 issues)

1
<?php
2
/**
3
 * Configuration file for DI container.
4
 */
5
return [
6
    "services" => [
7
        "remserver" => [
8
            "shared" => true,
9
            "callback" => function () {
10
                $rem = new \Anax\RemServer\RemServer();
0 ignored issues
show
The type Anax\RemServer\RemServer 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...
11
                $rem->injectSession($this->get("session"));
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
12
13
                // Load the configuration file
14
                $cfg = $this->get("configuration");
15
                $config = $cfg->load("remserver/config.php");
16
                $configFile = $config["file"] ?? null;
17
18
                $dataset = $config["config"]["dataset"] ?? null;
19
                if (!$dataset) {
20
                    throw new Exception("Configuration file '$configFile' is missing an entry 'dataset'.");
21
                }
22
23
                $rem->setDefaultDataset($dataset);
24
                return $rem;
25
            }
26
        ],
27
    ],
28
];
29