@@ -147,7 +147,7 @@ |
||
147 | 147 | public function getFolder(Path $p) |
148 | 148 | { |
149 | 149 | $folderPath = $this->baseDir.$p->getPath(); |
150 | - $entries = glob($folderPath.'*', GLOB_ERR | GLOB_MARK); |
|
150 | + $entries = glob($folderPath.'*', GLOB_ERR|GLOB_MARK); |
|
151 | 151 | if (false === $entries) { |
152 | 152 | // directory does not exist, return empty list |
153 | 153 | return array(); |
@@ -94,6 +94,9 @@ |
||
94 | 94 | return $output; |
95 | 95 | } |
96 | 96 | |
97 | + /** |
|
98 | + * @param string $fileName |
|
99 | + */ |
|
97 | 100 | public function setFile($fileName) |
98 | 101 | { |
99 | 102 | $this->addHeader('X-SENDFILE', $fileName); |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | return false; |
419 | 419 | } |
420 | 420 | |
421 | - private function addCors(Response &$response) |
|
421 | + private function addCors(Response&$response) |
|
422 | 422 | { |
423 | 423 | $response->addHeader('Access-Control-Allow-Origin', '*'); |
424 | 424 | $response->addHeader( |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | ); |
428 | 428 | } |
429 | 429 | |
430 | - private function addNoCache(Response &$response) |
|
430 | + private function addNoCache(Response&$response) |
|
431 | 431 | { |
432 | 432 | $response->addHeader('Expires', '0'); |
433 | 433 | $response->addHeader('Cache-Control', 'no-cache'); |
@@ -32,6 +32,9 @@ |
||
32 | 32 | /** @var string */ |
33 | 33 | private $serverMode; |
34 | 34 | |
35 | + /** |
|
36 | + * @param string $serverMode |
|
37 | + */ |
|
35 | 38 | public function __construct(RemoteStorage $remoteStorage, $serverMode) |
36 | 39 | { |
37 | 40 | $this->remoteStorage = $remoteStorage; |
@@ -144,7 +144,7 @@ |
||
144 | 144 | |
145 | 145 | // XXX we also should enforce HTTPS |
146 | 146 | $redirectUri = $request->getQueryParameter('redirect_uri'); |
147 | - if (false === filter_var($redirectUri, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED | FILTER_FLAG_HOST_REQUIRED | FILTER_FLAG_PATH_REQUIRED)) { |
|
147 | + if (false === filter_var($redirectUri, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED|FILTER_FLAG_HOST_REQUIRED|FILTER_FLAG_PATH_REQUIRED)) { |
|
148 | 148 | throw new HttpException('invalid redirect_uri', 400); |
149 | 149 | } |
150 | 150 | if (false !== strpos($redirectUri, '?')) { |
@@ -79,7 +79,7 @@ |
||
79 | 79 | $redirectTo = $request->getPostParameter('_form_auth_redirect_to'); |
80 | 80 | |
81 | 81 | // validate the URL |
82 | - if (false === filter_var($redirectTo, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED | FILTER_FLAG_HOST_REQUIRED | FILTER_FLAG_PATH_REQUIRED)) { |
|
82 | + if (false === filter_var($redirectTo, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED|FILTER_FLAG_HOST_REQUIRED|FILTER_FLAG_PATH_REQUIRED)) { |
|
83 | 83 | throw new HttpException('invalid redirect_to URL', 400); |
84 | 84 | } |
85 | 85 | // extract the "host" part of the URL |
@@ -59,7 +59,7 @@ |
||
59 | 59 | return $this->apiModule->head($request, $tokenInfo); |
60 | 60 | default: |
61 | 61 | throw new HttpException('', 405); |
62 | - } |
|
62 | + } |
|
63 | 63 | } catch (HttpException $e) { |
64 | 64 | if ($request->isBrowser()) { |
65 | 65 | $response = new Response($e->getCode(), 'text/html'); |