| Total Complexity | 5 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 8 | class WebhookFailed extends Exception |
||
| 9 | { |
||
| 10 | public static function invalidSignature($signature) |
||
| 11 | { |
||
| 12 | return new static("The signature `{$signature}` found in the header named `X-Multicoin-Signature` is invalid. |
||
|
|
|||
| 13 | Make sure that the `multicoin.api_key` config key is set to the value you found on the multicoin account."); |
||
| 14 | } |
||
| 15 | |||
| 16 | public static function missingSignature() |
||
| 17 | { |
||
| 18 | return new static('The request did not contain a header named `X-Multicoin-Signature`.'); |
||
| 19 | } |
||
| 20 | |||
| 21 | public static function missingType(Request $request) |
||
| 24 | } |
||
| 25 | |||
| 26 | public function render($request) |
||
| 27 | { |
||
| 28 | return response(['error' => $this->getMessage()], 400); |
||
| 29 | } |
||
| 30 | |||
| 31 | public static function signingSecretNotSet() |
||
| 34 | Make sure that the `multicoin.api_key` config key is set.'); |
||
| 35 | } |
||
| 37 |
It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.