1 | <?php |
||
2 | /** |
||
3 | * Configuration file for DI container. |
||
4 | */ |
||
5 | return [ |
||
6 | |||
7 | // Services to add to the container. |
||
8 | "services" => [ |
||
9 | "weather" => [ |
||
10 | "shared" => true, |
||
11 | "callback" => function () { |
||
12 | $curl = $this->get("curl"); |
||
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
![]() |
|||
13 | $cfg = $this->get("configuration"); |
||
14 | $locationProvider = $this->get("location"); |
||
15 | $weather = new \Anax\WeatherService\DarkSky($locationProvider, $curl, $cfg); |
||
16 | |||
17 | return $weather; |
||
18 | } |
||
19 | ], |
||
20 | ], |
||
21 | ]; |
||
22 |