Debian Codegraph @

lib/3rdParty/composer/facile-it/php-openid-client/src/Exception/RemoteException.php

raw symbols SCIP
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Facile\OpenIDClient\Exception;
6
7 use Psr\Http\Message\ResponseInterface;
8 use Throwable;
9
10 /**
11 * @psalm-api
12 */
13 final class RemoteException extends RuntimeException
14 {
15 private ResponseInterface $response;
16
17 public function __construct(ResponseInterface $response, ?string $message = null, ?Throwable $previous = null)
18 {
19 parent::__construct(
20 $message ?? $response->getReasonPhrase(),
21 $response->getStatusCode(),
22 $previous
23 );
24 $this->response = $response;
25 }
26
27 public function getResponse(): ResponseInterface
28 {
29 return $this->response;
30 }
31 }