| Conditions | 5 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function onKernelRequest(GetResponseEvent $event) |
||
| 27 | { |
||
| 28 | $request = $event->getRequest(); |
||
| 29 | |||
| 30 | if (!$event->isMasterRequest() || !$this->requestMatcher->matches($request)) { |
||
| 31 | return; |
||
| 32 | } |
||
| 33 | |||
| 34 | try { |
||
| 35 | $this->processor->processRequest($request); |
||
| 36 | } catch (InsufficientFunds $e) { |
||
| 37 | $event->setResponse(Response::create('', Response::HTTP_PAYMENT_REQUIRED)); |
||
| 38 | } catch (Throwable $e) { |
||
| 39 | throw new ServiceUnavailableHttpException(null, null, $e); |
||
| 40 | } |
||
| 43 |