anonymous()
last analyzed

Size

Total Lines 7
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 6
nc 1
nop 0
dl 0
loc 7
c 0
b 0
f 0
1
<?php
2
/**
3
 * Configuration file for DI container.
4
 */
5
return [
6
7
    // Services to add to the container.
8
    "services" => [
9
        "darksky" => [
10
            "shared" => true,
11
            "callback" => function () {
12
                $darksky = new \Anax\Controller\WeatherCurl();
13
                $cfg = $this->get("configuration");
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
14
                $config = $cfg->load("api_keys.php");
15
                $darksky->setKey($config['config']['key']);
16
17
                return $darksky;
18
            }
19
        ],
20
    ],
21
];
22