Total Complexity | 3 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class ShopifyError extends RuntimeException |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * Messages for codes with garbage response bodies. |
||
19 | * |
||
20 | * @see https://help.shopify.com/en/api/getting-started/response-status-codes |
||
21 | */ |
||
22 | const NO_DATA = [ |
||
23 | 400 => 'Bad Request', |
||
24 | 401 => 'Unauthorized', |
||
25 | 403 => 'Forbidden', |
||
26 | 423 => 'Locked', |
||
27 | 406 => 'Not Acceptable', |
||
28 | 500 => 'Internal Server Error', |
||
29 | 501 => 'Not Implemented', |
||
30 | 503 => 'Service Unavailable', |
||
31 | 504 => 'Gateway Timeout' |
||
32 | ]; |
||
33 | |||
34 | /** |
||
35 | * @var array |
||
36 | */ |
||
37 | protected $curlInfo = []; |
||
38 | |||
39 | /** |
||
40 | * @param int $code |
||
41 | * @param string $message |
||
42 | * @param array $curlInfo |
||
43 | */ |
||
44 | public function __construct(int $code, string $message, array $curlInfo) |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @return array |
||
52 | */ |
||
53 | public function getCurlInfo(): array |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * @return bool |
||
60 | */ |
||
61 | final public function isCurl(): bool |
||
64 | } |
||
65 | } |