Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/gallery.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2015-09-07 15:25:46 +0300
committerOlivier Paroz <github@oparoz.com>2015-09-07 15:25:46 +0300
commit739d503730f08c979fa10b46a93e5e8b6fb7aed4 (patch)
treed3fef275896368a993e695adf8db27ec73aef495 /controller
parent73fc4d6dae1bbc8c03debd64e091be515643e08b (diff)
Minor changes to please analysers
Diffstat (limited to 'controller')
-rw-r--r--controller/preview.php7
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'];
}