| Total Complexity | 4 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 14 | final class SpotifyApiConnectFactory implements SpotifyApiConnectFactoryInterface |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @param string $accessToken |
||
| 18 | * @return SpotifyWebApiInterface |
||
| 19 | */ |
||
| 20 | public function createSpotifyWebApi(string $accessToken) : SpotifyWebApiInterface |
||
| 25 | ); |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @return SpotifyApiAuthInterface |
||
| 30 | */ |
||
| 31 | public function createSpotifyApiAuth(): SpotifyApiAuthInterface |
||
| 32 | { |
||
| 33 | return new SpotifyApiAuth( |
||
| 34 | $this->createSpotifyWebApiPhpSession() |
||
| 35 | ); |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return SessionInterface |
||
| 40 | */ |
||
| 41 | private function createSpotifyWebApiPhpSession(): SessionInterface |
||
| 42 | { |
||
| 43 | return new Session( |
||
| 44 | $this->createConfig() |
||
| 45 | ); |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return ConfigInterface |
||
| 50 | */ |
||
| 51 | private function createConfig(): ConfigInterface |
||
| 54 | } |
||
| 55 | |||
| 56 | } |