| 1 | <?php |
||
| 9 | class Request implements RequestInterface |
||
| 10 | { |
||
| 11 | const BASE_URL = 'https://api.hh.ru'; |
||
| 12 | private $client; |
||
| 13 | private $token; |
||
| 14 | |||
| 15 | public function __construct(HttpInterface $http, $token = null) |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param string $uri |
||
| 24 | * @param array $params |
||
| 25 | * @return array|null |
||
| 26 | */ |
||
| 27 | public function get($uri, $params = []) |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @return array|null |
||
| 35 | */ |
||
| 36 | protected function createHeaders() |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param string $uri |
||
| 46 | * @param array $params |
||
| 47 | * @return array |
||
| 48 | */ |
||
| 49 | public function post($uri, $params = []) |
||
| 54 | } |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.