| Total Complexity | 8 |
| Total Lines | 60 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class LastFm implements ProviderInterface |
||
| 13 | { |
||
| 14 | /** @var array */ |
||
| 15 | protected $config; |
||
| 16 | |||
| 17 | /** @inheritDoc */ |
||
| 18 | 12 | public function __construct(array $config) |
|
| 19 | { |
||
| 20 | 12 | $this->config = $config; |
|
| 21 | 12 | } |
|
| 22 | |||
| 23 | /** @inheritDoc */ |
||
| 24 | 6 | public function getConfig() : array |
|
| 25 | { |
||
| 26 | 6 | return $this->config; |
|
| 27 | } |
||
| 28 | |||
| 29 | /** @inheritDoc */ |
||
| 30 | 1 | public function setConfig(array $config) : void |
|
| 31 | { |
||
| 32 | 1 | $this->config = $config; |
|
| 33 | 1 | } |
|
| 34 | |||
| 35 | /** |
||
| 36 | * Setter for API Key (Provider Specific Method) |
||
| 37 | * |
||
| 38 | * @param string $apiKey |
||
| 39 | * @return void |
||
| 40 | */ |
||
| 41 | 1 | public function setApiKey(string $apiKey) : void |
|
| 42 | { |
||
| 43 | 1 | $this->config['api_key'] = $apiKey; |
|
| 44 | 1 | } |
|
| 45 | |||
| 46 | /** |
||
| 47 | * Getter for API Key (Provider Specific Method) |
||
| 48 | * |
||
| 49 | * @return string |
||
| 50 | */ |
||
| 51 | 1 | public function getApiKey() : string |
|
| 52 | { |
||
| 53 | 1 | return $this->config['api_key']; |
|
| 54 | } |
||
| 55 | |||
| 56 | /** @inheritDoc */ |
||
| 57 | 1 | public function getVersion() : string |
|
| 60 | } |
||
| 61 | |||
| 62 | /** @inheritDoc */ |
||
| 63 | 1 | public function getProviderName() : string |
|
| 66 | } |
||
| 67 | |||
| 68 | /** @inheritDoc */ |
||
| 69 | 1 | public function getResource(HttpInterface $http) |
|
| 72 | } |
||
| 73 | } |