Resource   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 30
c 0
b 0
f 0
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A geo() 0 3 1
1
<?php
2
namespace Sourceout\LastFm\Providers\LastFm\Resources;
3
4
use Sourceout\LastFm\Http\HttpInterface;
5
use Sourceout\LastFm\Providers\GeoInterface;
6
use Sourceout\LastFm\Providers\ProviderInterface;
7
use Sourceout\LastFm\Providers\ResourceInterface;
8
9
class Resource implements ResourceInterface
10
{
11
    /** @var ProviderInterface */
12
    private $provider;
13
14
    /** @var HttpInterface */
15
    private $http;
16
17
    /**
18
     * Constructor
19
     *
20
     * @param ProviderInterface $provider
21
     * @param HttpInterface $http
22
     */
23 2
    public function __construct(
24
        ProviderInterface $provider,
25
        HttpInterface $http
26
    ) {
27 2
        $this->provider = $provider;
28 2
        $this->http = $http;
29 2
    }
30
31
    /**
32
     * Returns back an instance of LastFM Geo Resource
33
     *
34
     * @return GeoInterface
35
     */
36 1
    public function geo() : GeoInterface
37
    {
38 1
        return new Geo($this->provider, $this->http);
39
    }
40
}