Total Complexity | 3 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class SePayIdentityProviderException extends IdentityProviderException |
||
11 | { |
||
12 | public static function clientException(ResponseInterface $response, $data): self |
||
13 | { |
||
14 | return static::fromResponse( |
||
15 | $response, |
||
16 | $data['message'] ?? $response->getReasonPhrase() |
||
17 | ); |
||
18 | } |
||
19 | |||
20 | public static function oauthException(ResponseInterface $response, $data): self |
||
21 | { |
||
22 | return static::fromResponse( |
||
23 | $response, |
||
24 | $data['error'] ?? $response->getReasonPhrase() |
||
25 | ); |
||
26 | } |
||
27 | |||
28 | protected static function fromResponse(ResponseInterface $response, $message = null): self |
||
31 | } |
||
32 | } |
||
33 |