Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added return type to Client methods to suppress inheritance error in PHP 8.1 #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public function setVerbose( $verbose = true )
*
* Credits: https://forum.italia.it/u/cesco69
*/
public function __doRequest( $request, $location, $action, $version, $one_way = null )
public function __doRequest( $request, $location, $action, $version, $one_way = null ): string
{
// reset
$this->lastResponseBody = '';
Expand Down Expand Up @@ -327,22 +327,22 @@ public function __processResponse( $response )
return $xml_response;
}

public function __getLastRequestHeaders()
public function __getLastRequestHeaders(): string
{
return implode("\n", $this->lastRequestHeaders);
}

public function __getLastResponseHeaders()
public function __getLastResponseHeaders(): string
{
return implode("\n", $this->lastResponseHeaders);
}

public function __getLastRequest()
public function __getLastRequest(): string
{
return $this->lastRequestBody;
}

public function __getLastResponse()
public function __getLastResponse(): string
{
return $this->lastResponseBody;
}
Expand Down