GeoService   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getTopTracks() 0 10 1
A getTopArtists() 0 10 1
1
<?php
2
namespace Sourceout\LastFm\Services;
3
4
class GeoService extends AbstractService
5
{
6
    /**
7
     * Get the most popular artists by country
8
     *
9
     * @param string $country
10
     * @param integer $page
11
     * @param integer $limit
12
     */
13 1
    public function getTopArtists(
14
        string $country,
15
        int $page = 1,
16
        int $limit = 50
17
    )
18
    {
0 ignored issues
show
Coding Style introduced by
The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line
Loading history...
19 1
        return $this->provider
20 1
            ->getResource($this->http)
21 1
            ->geo()
22 1
            ->getTopArtists($country, $page, $limit);
23
    }
24
25
    /**
26
     * Get the most popular tracks by country
27
     *
28
     * @param string $country
29
     * @param string $location
30
     * @param integer $limit
31
     * @param integer $page
32
     * @return \Tightenco\Collect\Support\Collection
33
     */
34 1
    public function getTopTracks(
35
        string $country,
36
        string $location = null,
37
        int $limit = 50,
38
        int $page = 1
39
    ) {
40 1
        return $this->provider
41 1
            ->getResource($this->http)
42 1
            ->geo()
43 1
            ->getTopTracks($country, $location, $limit, $page);
44
    }
45
}