| 1 | <?php |
||
| 23 | class GuzzleClient extends BaseClient implements ClientInterface |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * @var string |
||
| 27 | */ |
||
| 28 | protected $bearerToken = ''; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @var ApiExceptionTransformerInterface |
||
| 32 | */ |
||
| 33 | protected $apiExceptionTransformer; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Client constructor. |
||
| 37 | * |
||
| 38 | * @param ApiExceptionTransformerInterface $apiExceptionTransformer |
||
| 39 | * @param array $config |
||
| 40 | */ |
||
| 41 | 4 | public function __construct(ApiExceptionTransformerInterface $apiExceptionTransformer, array $config = []) |
|
| 46 | |||
| 47 | /** |
||
| 48 | * @return string |
||
| 49 | */ |
||
| 50 | 2 | public function getBearerToken() |
|
| 54 | |||
| 55 | /** |
||
| 56 | * @param string $bearerToken |
||
| 57 | * |
||
| 58 | * @return $this |
||
| 59 | * @throws \InvalidArgumentException |
||
| 60 | */ |
||
| 61 | 2 | public function setBearerToken($bearerToken) |
|
| 70 | |||
| 71 | /** |
||
| 72 | * @param string $requestMethod |
||
| 73 | * @param string $path |
||
| 74 | * @param array $params |
||
| 75 | * |
||
| 76 | * @return ResponseInterface |
||
| 77 | * @throws \InvalidArgumentException |
||
| 78 | * @throws \Exception|ApiException |
||
| 79 | */ |
||
| 80 | public function executeRequestForParams($requestMethod, $path, array $params) |
||
| 86 | |||
| 87 | /** |
||
| 88 | * @param string $requestMethod |
||
| 89 | * @param array $params |
||
| 90 | * |
||
| 91 | * @return array |
||
|
1 ignored issue
–
show
|
|||
| 92 | * @throws \InvalidArgumentException |
||
| 93 | */ |
||
| 94 | protected function calculateOptionsForParams($requestMethod, array $params) |
||
| 123 | |||
| 124 | /** |
||
| 125 | * @param \Exception $exception |
||
| 126 | * |
||
| 127 | * @return \Exception|ApiException |
||
| 128 | */ |
||
| 129 | 1 | public function transformApiException(\Exception $exception) |
|
| 133 | } |
||
| 134 |
This check looks for the generic type
arrayas a return type and suggests a more specific type. This type is inferred from the actual code.