Small quality fixes in AbstractApi.
This commit is contained in:
parent
4e9c556320
commit
a84c2dcd3b
|
@ -144,9 +144,9 @@ class AbstractApi
|
||||||
*
|
*
|
||||||
* @return string Base URL of client
|
* @return string Base URL of client
|
||||||
*/
|
*/
|
||||||
public function getBaseUrl()
|
public function getBaseUrl(): string
|
||||||
{
|
{
|
||||||
return $this->client->getBaseUrl();
|
return (string) $this->client->getBaseUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -156,7 +156,7 @@ class AbstractApi
|
||||||
* @param bool $useProtocol Do not change URL scheme (http/https) defined in $baseUrl
|
* @param bool $useProtocol Do not change URL scheme (http/https) defined in $baseUrl
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setBaseUrl($baseUrl, $useProtocol = false)
|
public function setBaseUrl(string $baseUrl, bool $useProtocol = false): self
|
||||||
{
|
{
|
||||||
// Overriding protocol
|
// Overriding protocol
|
||||||
if (!$useProtocol) {
|
if (!$useProtocol) {
|
||||||
|
@ -177,7 +177,7 @@ class AbstractApi
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isHttps()
|
public function isHttps(): bool
|
||||||
{
|
{
|
||||||
return $this->useHttps;
|
return $this->useHttps;
|
||||||
}
|
}
|
||||||
|
@ -187,7 +187,7 @@ class AbstractApi
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function enableHttps()
|
public function enableHttps(): self
|
||||||
{
|
{
|
||||||
$this->useHttps = true;
|
$this->useHttps = true;
|
||||||
$this->setBaseUrl($this->getBaseUrl());
|
$this->setBaseUrl($this->getBaseUrl());
|
||||||
|
@ -200,7 +200,7 @@ class AbstractApi
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function disableHttps()
|
public function disableHttps(): self
|
||||||
{
|
{
|
||||||
$this->useHttps = false;
|
$this->useHttps = false;
|
||||||
$this->setBaseUrl($this->getBaseUrl());
|
$this->setBaseUrl($this->getBaseUrl());
|
||||||
|
|
Loading…
Reference in a new issue