Skip to content

Commit cd8d7c8

Browse files
authored
Merge pull request #19 from minasm/master
Fix return type of getApiUri() method
2 parents 5060a42 + abe6382 commit cd8d7c8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/Api/EodClient.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace RadicalLoop\Eod\Api;
44

5+
use GuzzleHttp\Exception\GuzzleException;
56
use RadicalLoop\Eod\Config;
67
use GuzzleHttp\Client as GuzzleHttpClient;
78

@@ -45,21 +46,22 @@ public function __construct(Config $config)
4546
/**
4647
* get api uri
4748
*
48-
* @return void
49+
* @return string
4950
*/
50-
public function getApiUri()
51+
public function getApiUri(): string
5152
{
5253
return rtrim($this->config->getApiUrl(), '/') . $this->urlSegment;
5354
}
5455

5556
/**
5657
* send request for api
5758
*
58-
* @param string $symbol
59-
* @param array $params
59+
* @param string $symbol
60+
* @param array $params
6061
* @return string|json
62+
* @throws GuzzleException
6163
*/
62-
public function get($symbol, $params = [])
64+
public function get(string $symbol, array $params = [])
6365
{
6466
$segment = $symbol ? ('/' . $symbol) : '';
6567
$httpQuery = http_build_query(array_merge($params, ['api_token' => $this->config->getApiToken()]));

0 commit comments

Comments
 (0)