| Total Complexity | 7 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class WebhookFailed extends Exception |
||
| 15 | { |
||
| 16 | public static function missingSignature() |
||
| 19 | } |
||
| 20 | |||
| 21 | public static function invalidSignature($signature) |
||
| 22 | { |
||
| 23 | return new static("The signature: {$signature} found in the header is invalid."); |
||
| 24 | } |
||
| 25 | |||
| 26 | public static function noSecretKeyProvided() |
||
| 27 | { |
||
| 28 | return new static('The webhook secret key is not set.'); |
||
| 29 | } |
||
| 30 | |||
| 31 | public static function jobClassDoesNotExist(string $jobClass, GocardlessWebhookCall $webhookCall) |
||
| 32 | { |
||
| 33 | return new static("Could not process webhook id `{$webhookCall->id}` of type `{$webhookCall->type} because the configured jobclass `$jobClass` does not exist."); |
||
| 34 | } |
||
| 35 | |||
| 36 | public static function missingResource(GocardlessWebhookCall $webhookCall) |
||
| 37 | { |
||
| 38 | return new static("Webhook call id `{$webhookCall->id}` did not contain a resource type. Valid Gocardless webhook calls should always contain a resource type."); |
||
| 39 | } |
||
| 40 | |||
| 41 | public static function missingAction(GocardlessWebhookCall $webhookCall) |
||
| 42 | { |
||
| 43 | return new static("Webhook call id `{$webhookCall->id}` did not contain an action. Valid Gocardless webhook calls should always contain an action."); |
||
| 44 | } |
||
| 45 | |||
| 46 | public function render($request) |
||
| 49 | } |
||
| 50 | |||
| 51 | } |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.