Passed
Push — master ( 3256e3...60c4f2 )
by Georgi
03:14
created
src/Database/Models/File.php 1 patch
Braces   +11 added lines, -6 removed lines patch added patch discarded remove patch
@@ -66,7 +66,9 @@  discard block
 block discarded – undo
66 66
     {
67 67
     	static $cache = [];
68 68
     	
69
-    	if (is_numeric($link)) return $link;
69
+    	if (is_numeric($link)) {
70
+    		return $link;
71
+    	}
70 72
     	
71 73
     	if (!$useCache || !isset($cache[$link])) {
72 74
     		$cache[$link] = self::where('link', $link)->value('id');
@@ -109,10 +111,11 @@  discard block
 block discarded – undo
109 111
     			throw new FileNotFound('Exception - file not found: ' . $file->content->path);
110 112
     		}
111 113
     	} catch (\Exception $exception) {
112
-    		if ($throwException)
113
-    			throw $exception;
114
-    		else
115
-    			return false;
114
+    		if ($throwException) {
115
+    		    			throw $exception;
116
+    		} else {
117
+    		    			return false;
118
+    		}
116 119
     	}
117 120
     	
118 121
     	return true;
@@ -196,7 +199,9 @@  discard block
 block discarded – undo
196 199
     
197 200
     public function getThumbnailAttribute()
198 201
     {
199
-    	if (! $this->thumbnailPossible()) return false;
202
+    	if (! $this->thumbnailPossible()) {
203
+    		return false;
204
+    	}
200 205
     	
201 206
     	$image = new \Imagick($this->content->path . '[0]');
202 207
     	
Please login to merge, or discard this patch.
src/FileStorageController.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
32 32
     		$mime = $thumbnail['mime'];
33 33
     		$filename = $thumbnail['name'];
34 34
     		$contents = $thumbnail['contents'];
35
-    	}
36
-    	else {
35
+    	} else {
37 36
     		$mime = $file->content->type;
38 37
     		$filename = $file->name;
39 38
     		$contents = $file->content->data;
Please login to merge, or discard this patch.