@@ -64,7 +64,7 @@ |
||
| 64 | 64 | ResponseInterface $response, |
| 65 | 65 | ServerRequestInterface $request |
| 66 | 66 | ): ResponseInterface { |
| 67 | - $origin = (string) ($request->getHeaderLine('Origin') ?: '*'); |
|
| 67 | + $origin = (string) ($request->getHeaderLine('Origin') ? : '*'); |
|
| 68 | 68 | |
| 69 | 69 | return $response |
| 70 | 70 | ->withHeader('Access-Control-Allow-Methods', 'GET, OPTIONS') |
@@ -34,8 +34,7 @@ discard block |
||
| 34 | 34 | * @subpackage dlf |
| 35 | 35 | * @access public |
| 36 | 36 | */ |
| 37 | -class PageViewProxy |
|
| 38 | -{ |
|
| 37 | +class PageViewProxy { |
|
| 39 | 38 | /** |
| 40 | 39 | * @var RequestFactory |
| 41 | 40 | */ |
@@ -46,8 +45,7 @@ discard block |
||
| 46 | 45 | */ |
| 47 | 46 | protected $extConf; |
| 48 | 47 | |
| 49 | - public function __construct() |
|
| 50 | - { |
|
| 48 | + public function __construct() { |
|
| 51 | 49 | $this->requestFactory = GeneralUtility::makeInstance(RequestFactory::class); |
| 52 | 50 | $this->extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('dlf'); |
| 53 | 51 | } |
@@ -173,8 +171,7 @@ discard block |
||
| 173 | 171 | * @param ServerRequestInterface $request |
| 174 | 172 | * @return ResponseInterface |
| 175 | 173 | */ |
| 176 | - public function main(ServerRequestInterface $request) |
|
| 177 | - { |
|
| 174 | + public function main(ServerRequestInterface $request) { |
|
| 178 | 175 | switch ($request->getMethod()) { |
| 179 | 176 | case 'OPTIONS': |
| 180 | 177 | return $this->handleOptions($request); |
@@ -140,11 +140,11 @@ |
||
| 140 | 140 | // For performance, don't download content up-front. Rather, we'll |
| 141 | 141 | // download and upload simultaneously. |
| 142 | 142 | // https://docs.guzzlephp.org/en/6.5/request-options.html#stream |
| 143 | - 'stream' => true, |
|
| 143 | + 'stream' => TRUE, |
|
| 144 | 144 | |
| 145 | 145 | // Don't throw exceptions when a non-success status code is |
| 146 | 146 | // received. We handle these manually. |
| 147 | - 'http_errors' => false, |
|
| 147 | + 'http_errors' => FALSE, |
|
| 148 | 148 | ]); |
| 149 | 149 | } catch (\Exception $e) { |
| 150 | 150 | return new JsonResponse(['message' => 'Could not fetch resource of given URL.'], 500); |
@@ -23,8 +23,7 @@ |
||
| 23 | 23 | { |
| 24 | 24 | use StreamDecoratorTrait; |
| 25 | 25 | |
| 26 | - public function emit() |
|
| 27 | - { |
|
| 26 | + public function emit() { |
|
| 28 | 27 | // Disable output buffering |
| 29 | 28 | ob_end_flush(); |
| 30 | 29 | |