Completed
Pull Request — master (#3590)
by Individual IT
11:38
created
apps/dav/lib/CardDAV/CardDavBackend.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -745,7 +745,9 @@
 block discarded – undo
745 745
 		$stmt->execute([ $addressBookId ]);
746 746
 		$currentToken = $stmt->fetchColumn(0);
747 747
 
748
-		if (is_null($currentToken)) return null;
748
+		if (is_null($currentToken)) {
749
+		    return null;
750
+		}
749 751
 
750 752
 		$result = [
751 753
 			'syncToken' => $currentToken,
Please login to merge, or discard this patch.
apps/files_versions/ajax/rollbackVersion.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 
36 36
 if(OCA\Files_Versions\Storage::rollback( $file, $revision )) {
37 37
 	OCP\JSON::success(array("data" => array( "revision" => $revision, "file" => $file )));
38
-}else{
38
+} else{
39 39
 	$l = \OC::$server->getL10N('files_versions');
40 40
 	OCP\JSON::error(array("data" => array( "message" => $l->t("Could not revert: %s", array($file) ))));
41 41
 }
Please login to merge, or discard this patch.
lib/private/Installer.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -412,7 +412,7 @@
 block discarded – undo
412 412
 			$appDir = OC_App::getInstallPath() . '/' . $appId;
413 413
 			OC_Helper::rmdirr($appDir);
414 414
 			return true;
415
-		}else{
415
+		} else{
416 416
 			\OCP\Util::writeLog('core', 'can\'t remove app '.$appId.'. It is not installed.', \OCP\Util::ERROR);
417 417
 
418 418
 			return false;
Please login to merge, or discard this patch.
lib/private/Archive/ZIP.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 		$this->path=$source;
48 48
 		$this->zip=new \ZipArchive();
49 49
 		if($this->zip->open($source, \ZipArchive::CREATE)) {
50
-		}else{
50
+		} else{
51 51
 			\OCP\Util::writeLog('files_archive', 'Error while opening archive '.$source, \OCP\Util::WARN);
52 52
 		}
53 53
 	}
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	function addFile($path, $source='') {
69 69
 		if($source and $source[0]=='/' and file_exists($source)) {
70 70
 			$result=$this->zip->addFile($source, $path);
71
-		}else{
71
+		} else{
72 72
 			$result=$this->zip->addFromString($path, $source);
73 73
 		}
74 74
 		if($result) {
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 	function remove($path) {
178 178
 		if($this->fileExists($path.'/')) {
179 179
 			return $this->zip->deleteName($path.'/');
180
-		}else{
180
+		} else{
181 181
 			return $this->zip->deleteName($path);
182 182
 		}
183 183
 	}
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 			//in the archive when the stream is closed
197 197
 			if(strrpos($path, '.')!==false) {
198 198
 				$ext=substr($path, strrpos($path, '.'));
199
-			}else{
199
+			} else{
200 200
 				$ext='';
201 201
 			}
202 202
 			$tmpFile=\OCP\Files::tmpFile($ext);
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 	private function stripPath($path) {
226 226
 		if(!$path || $path[0]=='/') {
227 227
 			return substr($path, 1);
228
-		}else{
228
+		} else{
229 229
 			return $path;
230 230
 		}
231 231
 	}
Please login to merge, or discard this patch.
lib/private/Archive/Archive.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
 				}
135 135
 				if(is_dir($source.'/'.$file)) {
136 136
 					$this->addRecursive($path.'/'.$file, $source.'/'.$file);
137
-				}else{
137
+				} else{
138 138
 					$this->addFile($path.'/'.$file, $source.'/'.$file);
139 139
 				}
140 140
 			}
Please login to merge, or discard this patch.
lib/private/TemplateLayout.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 			parent::__construct( 'core', 'layout.user' );
62 62
 			if(in_array(\OC_App::getCurrentApp(), ['settings','admin', 'help']) !== false) {
63 63
 				$this->assign('bodyid', 'body-settings');
64
-			}else{
64
+			} else{
65 65
 				$this->assign('bodyid', 'body-user');
66 66
 			}
67 67
 
Please login to merge, or discard this patch.
lib/private/Template/Base.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -114,8 +114,7 @@  discard block
 block discarded – undo
114 114
 	public function append( $key, $value ) {
115 115
 		if( array_key_exists( $key, $this->vars )) {
116 116
 			$this->vars[$key][] = $value;
117
-		}
118
-		else{
117
+		} else{
119 118
 			$this->vars[$key] = array( $value );
120 119
 		}
121 120
 	}
@@ -130,8 +129,7 @@  discard block
 block discarded – undo
130 129
 		$data = $this->fetchPage();
131 130
 		if( $data === false ) {
132 131
 			return false;
133
-		}
134
-		else{
132
+		} else{
135 133
 			print $data;
136 134
 			return true;
137 135
 		}
Please login to merge, or discard this patch.
lib/private/legacy/response.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,13 +51,11 @@  discard block
 block discarded – undo
51 51
 			if ($cache_time > 0) {
52 52
 				self::setExpiresHeader('PT'.$cache_time.'S');
53 53
 				header('Cache-Control: max-age='.$cache_time.', must-revalidate');
54
-			}
55
-			else {
54
+			} else {
56 55
 				self::setExpiresHeader(0);
57 56
 				header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
58 57
 			}
59
-		}
60
-		else {
58
+		} else {
61 59
 			header('Cache-Control: cache');
62 60
 			header('Pragma: cache');
63 61
 		}
@@ -228,8 +226,7 @@  discard block
 block discarded – undo
228 226
 
229 227
 			self::setContentLengthHeader(filesize($filepath));
230 228
 			fpassthru($fp);
231
-		}
232
-		else {
229
+		} else {
233 230
 			self::setStatus(self::STATUS_NOT_FOUND);
234 231
 		}
235 232
 	}
Please login to merge, or discard this patch.
lib/private/legacy/image.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -224,8 +224,9 @@
 block discarded – undo
224 224
 	 */
225 225
 	private function _output($filePath = null, $mimeType = null) {
226 226
 		if ($filePath) {
227
-			if (!file_exists(dirname($filePath)))
228
-				mkdir(dirname($filePath), 0777, true);
227
+			if (!file_exists(dirname($filePath))) {
228
+							mkdir(dirname($filePath), 0777, true);
229
+			}
229 230
 			if (!is_writable(dirname($filePath))) {
230 231
 				$this->logger->error(__METHOD__ . '(): Directory \'' . dirname($filePath) . '\' is not writable.', array('app' => 'core'));
231 232
 				return false;
Please login to merge, or discard this patch.