| Conditions | 3 |
| Paths | 6 |
| Total Lines | 16 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | public function handle($request, Closure $next) |
||
| 20 | { |
||
| 21 | try { |
||
| 22 | // Create a message from the post data and validate its signature |
||
| 23 | $message = Message::fromRawPostData(); |
||
| 24 | // Validate the message |
||
| 25 | $validator = new MessageValidator(); |
||
| 26 | |||
| 27 | if ($validator->isValid($message)) { |
||
| 28 | return $next($request); |
||
| 29 | } |
||
| 30 | } catch (\Exception $e) { |
||
|
|
|||
| 31 | } |
||
| 32 | |||
| 33 | // If you get this far it means the request is not found |
||
| 34 | throw new NotFoundHttpException(); |
||
| 35 | } |
||
| 37 |