| Total Complexity | 3 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class Download implements Endpoint |
||
| 13 | { |
||
| 14 | private string $baseUrl; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var HttpClientHandler |
||
| 18 | */ |
||
| 19 | private HttpClientHandler $clientHandler; |
||
| 20 | |||
| 21 | public function __construct(ClientInterface $client, string $baseUrl, string $apiKey = null) |
||
| 22 | { |
||
| 23 | $this->baseUrl = $baseUrl; |
||
| 24 | |||
| 25 | $this->clientHandler = new HttpClientHandler($client); |
||
| 26 | if ($apiKey) { |
||
| 27 | $this->clientHandler->setApiKey($apiKey); |
||
| 28 | } |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Request a download url for a subtitle. |
||
| 33 | * |
||
| 34 | * @param string $accessToken |
||
| 35 | * @param int $fileId |
||
| 36 | * @param array $params |
||
| 37 | * @return mixed |
||
| 38 | * @throws GuzzleException |
||
| 39 | */ |
||
| 40 | public function download(string $accessToken, int $fileId, array $params = []) |
||
| 52 | ] |
||
| 53 | ) |
||
| 57 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.