Skip to content

Commit

Permalink
Merge pull request #67 from ruudk/patch-1
Browse files Browse the repository at this point in the history
Make compatible with PHP 8.4
  • Loading branch information
dbu authored Oct 31, 2024
2 parents e6d5d9b + 37e533b commit b3e9f57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public function addException(\Exception $exception)
*
* If both a default exception and a default response are set, the exception will be thrown.
*/
public function setDefaultException(\Exception $defaultException = null)
public function setDefaultException(?\Exception $defaultException = null)
{
if (null !== $defaultException && !$defaultException instanceof Exception) {
@trigger_error('Clients may only throw exceptions of type '.Exception::class.'. Setting an exception of class '.get_class($defaultException).' will not be possible anymore in the future', E_USER_DEPRECATED);
Expand All @@ -223,7 +223,7 @@ public function addResponse(ResponseInterface $response)
/**
* Sets the default response to be returned when the list of added exceptions and responses is exhausted.
*/
public function setDefaultResponse(ResponseInterface $defaultResponse = null)
public function setDefaultResponse(?ResponseInterface $defaultResponse = null)
{
$this->defaultResponse = $defaultResponse;
}
Expand Down

0 comments on commit b3e9f57

Please sign in to comment.