Passed
Push — master ( abb116...45058a )
by Georgi
05:11
created
src/Seeds/FileView.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,9 @@
 block discarded – undo
90 90
 		$container->js(true, new jsExpression('new ClipboardJS(".copy-button")'));
91 91
 		
92 92
 		$container->on('click', '.delete-link', $this->add(['jsCallback', 'postTrigger' => 'link'])->set(function($j, $linkId) {
93
-			if (! $link = FileRemoteAccess::create()->load($linkId)) return;
93
+			if (! $link = FileRemoteAccess::create()->load($linkId)) {
94
+				return;
95
+			}
94 96
 			
95 97
 			$link->delete();
96 98
 			
Please login to merge, or discard this patch.
src/Models/File.php 1 patch
Braces   +14 added lines, -7 removed lines patch added patch discarded remove patch
@@ -81,9 +81,13 @@  discard block
 block discarded – undo
81 81
     {
82 82
     	static $cache = [];
83 83
     	
84
-    	if (is_numeric($link) || is_null($link)) return $link;
84
+    	if (is_numeric($link) || is_null($link)) {
85
+    		return $link;
86
+    	}
85 87
     	
86
-    	if (is_object($link)) return $link['id'];
88
+    	if (is_object($link)) {
89
+    		return $link['id'];
90
+    	}
87 91
     	
88 92
     	if (!$useCache || !isset($cache[$link])) {
89 93
     		$file = self::create()->tryLoadBy('link', $link);
@@ -128,10 +132,11 @@  discard block
 block discarded – undo
128 132
     			throw new FileNotFound('Exception - file not found: ' . $file->ref('content')['path']);
129 133
     		}
130 134
     	} catch (\Exception $exception) {
131
-    		if ($throwException)
132
-    			throw $exception;
133
-    		else
134
-    			return false;
135
+    		if ($throwException) {
136
+    		    			throw $exception;
137
+    		} else {
138
+    		    			return false;
139
+    		}
135 140
     	}
136 141
     	
137 142
     	return true;
@@ -221,7 +226,9 @@  discard block
 block discarded – undo
221 226
     
222 227
     public static function getThumbnailField($model)
223 228
     {
224
-    	if (! $model->thumbnailPossible()) return false;
229
+    	if (! $model->thumbnailPossible()) {
230
+    		return false;
231
+    	}
225 232
     	
226 233
     	$image = new \Imagick($model->ref('content')['path']  . '[0]');
227 234
     	
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
@@ -33,8 +33,7 @@
 block discarded – undo
33 33
     		$mime = $thumbnail['mime'];
34 34
     		$filename = $thumbnail['name'];
35 35
     		$contents = $thumbnail['contents'];
36
-    	}
37
-    	else {
36
+    	} else {
38 37
     		$content = $file->ref('content');
39 38
     		
40 39
     		$mime = $content['type'];
Please login to merge, or discard this patch.