@@ -119,8 +119,9 @@ |
||
119 | 119 | |
120 | 120 | // Only handling xml |
121 | 121 | $contentType = $request->getHeader('Content-Type'); |
122 | - if (strpos($contentType, 'application/xml') === false && strpos($contentType, 'text/xml') === false) |
|
123 | - return; |
|
122 | + if (strpos($contentType, 'application/xml') === false && strpos($contentType, 'text/xml') === false) { |
|
123 | + return; |
|
124 | + } |
|
124 | 125 | |
125 | 126 | // Making sure the node exists |
126 | 127 | try { |
@@ -245,7 +245,9 @@ |
||
245 | 245 | function httpGet(RequestInterface $request, ResponseInterface $response) { |
246 | 246 | // Only handle valid files |
247 | 247 | $node = $this->tree->getNodeForPath($request->getPath()); |
248 | - if (!($node instanceof IFile)) return; |
|
248 | + if (!($node instanceof IFile)) { |
|
249 | + return; |
|
250 | + } |
|
249 | 251 | |
250 | 252 | // adds a 'Content-Disposition: attachment' header in case no disposition |
251 | 253 | // header has been set before |
@@ -38,7 +38,9 @@ |
||
38 | 38 | public function getCurrentUserPrincipals() { |
39 | 39 | $principalV2 = $this->getCurrentUserPrincipal(); |
40 | 40 | |
41 | - if (is_null($principalV2)) return []; |
|
41 | + if (is_null($principalV2)) { |
|
42 | + return []; |
|
43 | + } |
|
42 | 44 | |
43 | 45 | $principalV1 = $this->convertPrincipal($principalV2, false); |
44 | 46 | return array_merge( |
@@ -808,7 +808,9 @@ |
||
808 | 808 | $stmt = $query->execute(); |
809 | 809 | $row = $stmt->fetch(\PDO::FETCH_ASSOC); |
810 | 810 | |
811 | - if(!$row) return null; |
|
811 | + if(!$row) { |
|
812 | + return null; |
|
813 | + } |
|
812 | 814 | |
813 | 815 | return [ |
814 | 816 | 'id' => $row['id'], |
@@ -745,7 +745,9 @@ |
||
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, |
@@ -35,7 +35,7 @@ |
||
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 | } |
@@ -412,7 +412,7 @@ |
||
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; |
@@ -47,7 +47,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -134,7 +134,7 @@ |
||
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 | } |