Completed
Pull Request — master (#37)
by Andreas
01:34
created

ServiceContainer   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 33
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getTimezoneService() 0 4 1
A getGeolocationService() 0 4 1
A getClient() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * Copyright Andrea Heigl <[email protected]>
7
 *
8
 * Licenses under the MIT-license. For details see the included file LICENSE.md
9
 */
10
11
namespace Callingallpapers\Service;
12
13
use GuzzleHttp\Client;
14
15
class ServiceContainer
16
{
17
    private $timezone;
18
19
    private $geolocation;
20
21
    private $client;
22
23
    public function __construct(
24
        TimezoneService $timezone,
25
        GeolocationService $geolocation,
26
        Client $client
27
    ) {
28
        $this->timezone = $timezone;
29
        $this->geolocation = $geolocation;
30
        $this->client = $client;
31
    }
32
33
    public function getTimezoneService() : TimezoneService
34
    {
35
        return $this->timezone;
36
    }
37
38
    public function getGeolocationService() : GeolocationService
39
    {
40
        return $this->geolocation;
41
    }
42
43
    public function getClient() : Client
44
    {
45
        return $this->client;
46
    }
47
}
48