Total Complexity | 5 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class WebhookFailed extends Exception |
||
8 | { |
||
9 | public static function missingSignature() |
||
12 | } |
||
13 | |||
14 | public static function invalidSignature(string $signature) |
||
15 | { |
||
16 | return new static("The signature `{$signature}` found in the header named `X-Shopify-Hmac-Sha256` is invalid."); |
||
17 | } |
||
18 | |||
19 | public static function missingSigningSecret() |
||
20 | { |
||
21 | return new static('The webhook signing secret is not set.'); |
||
22 | } |
||
23 | |||
24 | public static function missingTopic() |
||
25 | { |
||
26 | return new static('The webhook call did not contain a topic. Valid webhook calls should always contain a topic.'); |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * Render the exception into an HTTP response. |
||
31 | * |
||
32 | * NOTE: https://laravel.com/docs/5.5/errors#renderable-exceptions |
||
33 | * |
||
34 | * @param \Illuminate\Http\Request $request |
||
35 | * @return \Illuminate\Http\Response |
||
36 | */ |
||
37 | public function render($request) |
||
40 | } |
||
41 | } |
||
42 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.