diff options
author | Olivier Paroz <github@oparoz.com> | 2015-09-07 15:25:46 +0300 |
---|---|---|
committer | Olivier Paroz <github@oparoz.com> | 2015-09-07 15:25:46 +0300 |
commit | 739d503730f08c979fa10b46a93e5e8b6fb7aed4 (patch) | |
tree | d3fef275896368a993e695adf8db27ec73aef495 /controller | |
parent | 73fc4d6dae1bbc8c03debd64e091be515643e08b (diff) |
Minor changes to please analysers
Diffstat (limited to 'controller')
-rw-r--r-- | controller/preview.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/controller/preview.php b/controller/preview.php index 12e346ef..e4ebf8a5 100644 --- a/controller/preview.php +++ b/controller/preview.php @@ -134,7 +134,7 @@ trait Preview { * * @param $fileId * - * @return File + * @return File|null */ private function getFile($fileId) { try { @@ -171,8 +171,7 @@ trait Preview { $preview = $this->downloadService->downloadFile($file, $base64Encode); } if (!$preview) { - list($preview, $status, $type) = - $this->getErrorData(Http::STATUS_INTERNAL_SERVER_ERROR); + list($preview, $status, $type) = $this->getErrorData(); } return [$preview, $status, $type]; @@ -185,7 +184,7 @@ trait Preview { * * @return array<null|int|string> */ - private function getErrorData($status) { + private function getErrorData($status = Http::STATUS_INTERNAL_SERVER_ERROR) { return [null, $status, 'error']; } |