Issues (12)

config/di/weather.php (1 issue)

1
<?php
2
/**
3
 * Configuration file for DI container.
4
 */
5
return [
6
7
    // Services to add to the container.
8
    "services" => [
9
        "weather-module" => [
10
            // Is the service shared, true or false
11
            // Optional, default is true
12
            "shared" => true,
13
14
            // Callback executed when service is activated
15
            // Create the service, load its configuration (if any)
16
            // and set it up.
17
            "callback" => function () {
18
                $cfg = $this->get("configuration");
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
19
                $config = $cfg->load("api.php");
20
                $res = new \Anax\Model\GeoTag($config["config"]["darksky"]["key"]);
21
                return $res;
22
            }
23
        ],
24
    ],
25
];
26