@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | public function onKernelResponse(mixed $event): bool |
| 48 | 48 | { |
| 49 | - if (!$this->allowRender($event)) { |
|
| 49 | + if ( ! $this->allowRender($event)) { |
|
| 50 | 50 | return false; |
| 51 | 51 | } |
| 52 | 52 | |
@@ -86,22 +86,22 @@ discard block |
||
| 86 | 86 | private function allowRender(mixed $event): bool |
| 87 | 87 | { |
| 88 | 88 | // not configured to append automatically |
| 89 | - if (!$this->autoAppend) { |
|
| 89 | + if ( ! $this->autoAppend) { |
|
| 90 | 90 | return false; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | // only append to HTML responses |
| 94 | - if (!in_array($event->getResponse()->headers->get('content-type'), array('text/html', null))) { |
|
| 94 | + if ( ! in_array($event->getResponse()->headers->get('content-type'), array('text/html', null))) { |
|
| 95 | 95 | return false; |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | // only append to main request (symfony >= 5) |
| 99 | - if ($event instanceof \Symfony\Component\HttpKernel\Event\ResponseEvent && !$event->isMainRequest()) { |
|
| 99 | + if ($event instanceof \Symfony\Component\HttpKernel\Event\ResponseEvent && ! $event->isMainRequest()) { |
|
| 100 | 100 | return false; |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | // only append to master request (symfony < 5) |
| 104 | - if ($event instanceof \Symfony\Component\HttpKernel\Event\FilterResponseEvent && !$event->isMasterRequest()) { |
|
| 104 | + if ($event instanceof \Symfony\Component\HttpKernel\Event\FilterResponseEvent && ! $event->isMasterRequest()) { |
|
| 105 | 105 | return false; |
| 106 | 106 | } |
| 107 | 107 | |