Total Complexity | 4 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | class PorpaginasMissingParameterException extends Exception implements ClientAware, CannotMapTypeExceptionInterface |
||
11 | { |
||
12 | public static function missingLimit(): self |
||
13 | { |
||
14 | return new self('In the items field of a result set, you cannot add a "offset" without also adding a "limit"'); |
||
15 | } |
||
16 | |||
17 | public static function noSubType() |
||
18 | { |
||
19 | return new self('Result sets implementing Porpaginas need to have a subtype. Please define it using @return annotation. For instance: "@return User[]"'); |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * Returns true when exception message is safe to be displayed to a client. |
||
24 | * |
||
25 | * @return bool |
||
26 | * |
||
27 | * @api |
||
28 | */ |
||
29 | public function isClientSafe() |
||
30 | { |
||
31 | return true; |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * Returns string describing a category of the error. |
||
36 | * |
||
37 | * Value "graphql" is reserved for errors produced by query parsing or validation, do not use it. |
||
38 | * |
||
39 | * @return string |
||
40 | * |
||
41 | * @api |
||
42 | */ |
||
43 | public function getCategory() |
||
46 | } |
||
47 | } |