Issues (28)

config/di/weather.php (1 issue)

1
<?php
2
/**
3
 * Configuration file for DI container.
4
 */
5
return [
6
    // Services to add to the container.
7
    "services" => [
8
        "weather" => [
9
            "shared" => true,
10
            "callback" => function () {
11
                $cfg = $this->configuration->load("weather.php");
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
12
                $apiKey = $cfg["config"]["apiKey"];
13
14
                $weather = new \Faxity\DI\Weather($apiKey);
15
                $weather->setDI($this);
16
17
                return $weather;
18
            },
19
        ],
20
    ],
21
];
22