@@ -78,7 +78,7 @@ |
||
78 | 78 | $olderVersions = $ms->getMigratedVersions(); |
79 | 79 | $olderVersions[] = '0'; |
80 | 80 | $olderVersions[] = 'prev'; |
81 | - if (in_array($version, $olderVersions, true)) { |
|
81 | + if (in_array($version, $olderVersions, true)) { |
|
82 | 82 | $output->writeln('<error>Can not go back to previous migration without debug enabled</error>'); |
83 | 83 | return 1; |
84 | 84 | } |
@@ -304,9 +304,9 @@ |
||
304 | 304 | */ |
305 | 305 | public static function linkToRemote($service) { |
306 | 306 | $urlGenerator = \OC::$server->getURLGenerator(); |
307 | - $remoteBase = $urlGenerator->linkTo('', 'remote.php') . '/' . $service; |
|
307 | + $remoteBase = $urlGenerator->linkTo('', 'remote.php').'/'.$service; |
|
308 | 308 | return $urlGenerator->getAbsoluteURL( |
309 | - $remoteBase . (($service[strlen($service) - 1] != '/') ? '/' : '') |
|
309 | + $remoteBase.(($service[strlen($service) - 1] != '/') ? '/' : '') |
|
310 | 310 | ); |
311 | 311 | } |
312 | 312 |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | // default responders |
80 | 80 | $this->responders = [ |
81 | - 'json' => function ($data) { |
|
81 | + 'json' => function($data) { |
|
82 | 82 | if ($data instanceof DataResponse) { |
83 | 83 | $response = new JSONResponse( |
84 | 84 | $data->getData(), |
@@ -153,6 +153,6 @@ discard block |
||
153 | 153 | return $responder($response); |
154 | 154 | } |
155 | 155 | throw new \DomainException('No responder registered for format '. |
156 | - $format . '!'); |
|
156 | + $format.'!'); |
|
157 | 157 | } |
158 | 158 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $this->file = $file; |
52 | 52 | $this->setStatus($statusCode); |
53 | 53 | $this->setHeaders(array_merge($this->getHeaders(), $headers)); |
54 | - $this->addHeader('Content-Disposition', 'inline; filename="' . rawurldecode($file->getName()) . '"'); |
|
54 | + $this->addHeader('Content-Disposition', 'inline; filename="'.rawurldecode($file->getName()).'"'); |
|
55 | 55 | |
56 | 56 | $this->setETag($file->getEtag()); |
57 | 57 | $lastModified = new \DateTime(); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public function callback(IOutput $output) { |
67 | 67 | if ($output->getHttpResponseCode() !== Http::STATUS_NOT_MODIFIED) { |
68 | - $output->setHeader('Content-Length: ' . $this->file->getSize()); |
|
68 | + $output->setHeader('Content-Length: '.$this->file->getSize()); |
|
69 | 69 | $output->setOutput($this->file->getContent()); |
70 | 70 | } |
71 | 71 | } |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $this->filename = $filename; |
44 | 44 | $this->contentType = $contentType; |
45 | 45 | |
46 | - $this->addHeader('Content-Disposition', 'attachment; filename="' . $filename . '"'); |
|
46 | + $this->addHeader('Content-Disposition', 'attachment; filename="'.$filename.'"'); |
|
47 | 47 | $this->addHeader('Content-Type', $contentType); |
48 | 48 | } |
49 | 49 | } |
@@ -68,7 +68,7 @@ |
||
68 | 68 | public function render() { |
69 | 69 | $response = json_encode($this->data, JSON_HEX_TAG); |
70 | 70 | if ($response === false) { |
71 | - throw new \Exception(sprintf('Could not json_encode due to invalid ' . |
|
71 | + throw new \Exception(sprintf('Could not json_encode due to invalid '. |
|
72 | 72 | 'non UTF-8 characters in the array: %s', var_export($this->data, true))); |
73 | 73 | } |
74 | 74 |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $result = $this->zip->addFromString($path, $source); |
73 | 73 | } |
74 | 74 | if ($result) { |
75 | - $this->zip->close();//close and reopen to save the zip |
|
75 | + $this->zip->close(); //close and reopen to save the zip |
|
76 | 76 | $this->zip->open($this->path); |
77 | 77 | } |
78 | 78 | return $result; |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | public function getFiles() { |
131 | 131 | $fileCount = $this->zip->numFiles; |
132 | 132 | $files = []; |
133 | - for ($i = 0;$i < $fileCount;$i++) { |
|
133 | + for ($i = 0; $i < $fileCount; $i++) { |
|
134 | 134 | $files[] = $this->zip->getNameIndex($i); |
135 | 135 | } |
136 | 136 | return $files; |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | $this->extractFile($path, $tmpFile); |
205 | 205 | } |
206 | 206 | $handle = fopen($tmpFile, $mode); |
207 | - return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) { |
|
207 | + return CallbackWrapper::wrap($handle, null, null, function() use ($path, $tmpFile) { |
|
208 | 208 | $this->writeBack($tmpFile, $path); |
209 | 209 | }); |
210 | 210 | } |
@@ -35,17 +35,17 @@ |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | $excludedFolders = [ |
38 | - rtrim($root . '/data', '/'), |
|
39 | - rtrim($root . '/themes', '/'), |
|
40 | - rtrim($root . '/config', '/'), |
|
41 | - rtrim($root . '/apps', '/'), |
|
42 | - rtrim($root . '/assets', '/'), |
|
43 | - rtrim($root . '/lost+found', '/'), |
|
38 | + rtrim($root.'/data', '/'), |
|
39 | + rtrim($root.'/themes', '/'), |
|
40 | + rtrim($root.'/config', '/'), |
|
41 | + rtrim($root.'/apps', '/'), |
|
42 | + rtrim($root.'/assets', '/'), |
|
43 | + rtrim($root.'/lost+found', '/'), |
|
44 | 44 | // Ignore folders generated by updater since the updater is replaced |
45 | 45 | // after the integrity check is run. |
46 | 46 | // See https://github.com/owncloud/updater/issues/318#issuecomment-212497846 |
47 | - rtrim($root . '/updater', '/'), |
|
48 | - rtrim($root . '/_oc_upgrade', '/'), |
|
47 | + rtrim($root.'/updater', '/'), |
|
48 | + rtrim($root.'/_oc_upgrade', '/'), |
|
49 | 49 | ]; |
50 | 50 | $customDataDir = \OC::$server->getConfig()->getSystemValue('datadirectory', ''); |
51 | 51 | if ($customDataDir !== '') { |
@@ -32,7 +32,7 @@ |
||
32 | 32 | * @return bool |
33 | 33 | */ |
34 | 34 | private function isValidVersionString($versionString) { |
35 | - return (bool)preg_match('/^[0-9.]+$/', $versionString); |
|
35 | + return (bool) preg_match('/^[0-9.]+$/', $versionString); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |