@@ -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 !== '') { |
@@ -214,28 +214,28 @@ discard block |
||
214 | 214 | $alias = strtolower($alias); |
215 | 215 | |
216 | 216 | foreach ($this->blackListedClassNames as $blackListedAlias => $blackListedClassName) { |
217 | - if (strpos($blackListedClassName, $name . '\\') === 0) { |
|
217 | + if (strpos($blackListedClassName, $name.'\\') === 0) { |
|
218 | 218 | $aliasedClassName = str_replace($name, $alias, $blackListedClassName); |
219 | 219 | $this->blackListedClassNames[$aliasedClassName] = $blackListedClassName; |
220 | 220 | } |
221 | 221 | } |
222 | 222 | |
223 | 223 | foreach ($this->blackListedConstants as $blackListedAlias => $blackListedConstant) { |
224 | - if (strpos($blackListedConstant, $name . '\\') === 0 || strpos($blackListedConstant, $name . '::') === 0) { |
|
224 | + if (strpos($blackListedConstant, $name.'\\') === 0 || strpos($blackListedConstant, $name.'::') === 0) { |
|
225 | 225 | $aliasedConstantName = str_replace($name, $alias, $blackListedConstant); |
226 | 226 | $this->blackListedConstants[$aliasedConstantName] = $blackListedConstant; |
227 | 227 | } |
228 | 228 | } |
229 | 229 | |
230 | 230 | foreach ($this->blackListedFunctions as $blackListedAlias => $blackListedFunction) { |
231 | - if (strpos($blackListedFunction, $name . '\\') === 0 || strpos($blackListedFunction, $name . '::') === 0) { |
|
231 | + if (strpos($blackListedFunction, $name.'\\') === 0 || strpos($blackListedFunction, $name.'::') === 0) { |
|
232 | 232 | $aliasedFunctionName = str_replace($name, $alias, $blackListedFunction); |
233 | 233 | $this->blackListedFunctions[$aliasedFunctionName] = $blackListedFunction; |
234 | 234 | } |
235 | 235 | } |
236 | 236 | |
237 | 237 | foreach ($this->blackListedMethods as $blackListedAlias => $blackListedMethod) { |
238 | - if (strpos($blackListedMethod, $name . '\\') === 0 || strpos($blackListedMethod, $name . '::') === 0) { |
|
238 | + if (strpos($blackListedMethod, $name.'\\') === 0 || strpos($blackListedMethod, $name.'::') === 0) { |
|
239 | 239 | $aliasedMethodName = str_replace($name, $alias, $blackListedMethod); |
240 | 240 | $this->blackListedMethods[$aliasedMethodName] = $blackListedMethod; |
241 | 241 | } |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | } |
257 | 257 | |
258 | 258 | private function checkBlackListConstant($class, $constantName, Node $node) { |
259 | - $name = $class . '::' . $constantName; |
|
259 | + $name = $class.'::'.$constantName; |
|
260 | 260 | $lowerName = strtolower($name); |
261 | 261 | |
262 | 262 | if (isset($this->blackListedConstants[$lowerName])) { |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | } |
271 | 271 | |
272 | 272 | private function checkBlackListFunction($class, $functionName, Node $node) { |
273 | - $name = $class . '::' . $functionName; |
|
273 | + $name = $class.'::'.$functionName; |
|
274 | 274 | $lowerName = strtolower($name); |
275 | 275 | |
276 | 276 | if (isset($this->blackListedFunctions[$lowerName])) { |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | } |
285 | 285 | |
286 | 286 | private function checkBlackListMethod($class, $functionName, Node $node) { |
287 | - $name = $class . '::' . $functionName; |
|
287 | + $name = $class.'::'.$functionName; |
|
288 | 288 | $lowerName = strtolower($name); |
289 | 289 | |
290 | 290 | if (isset($this->blackListedMethods[$lowerName])) { |
@@ -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 | /** |
@@ -66,7 +66,7 @@ |
||
66 | 66 | /** @var IShare[] $deletedShares */ |
67 | 67 | $deletedShares = $e->getArgument('deletedShares'); |
68 | 68 | |
69 | - $formattedDeletedShares = array_map(function ($share) { |
|
69 | + $formattedDeletedShares = array_map(function($share) { |
|
70 | 70 | return $this->formatHookParams($share); |
71 | 71 | }, $deletedShares); |
72 | 72 |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | public function setId($id) { |
88 | 88 | if (is_int($id)) { |
89 | - $id = (string)$id; |
|
89 | + $id = (string) $id; |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | if (!is_string($id)) { |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | if ($this->providerId === null || $this->id === null) { |
116 | 116 | throw new \UnexpectedValueException; |
117 | 117 | } |
118 | - return $this->providerId . ':' . $this->id; |
|
118 | + return $this->providerId.':'.$this->id; |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | /** |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | |
164 | 164 | $nodes = $userFolder->getById($this->fileId); |
165 | 165 | if (empty($nodes)) { |
166 | - throw new NotFoundException('Node for share not found, fileid: ' . $this->fileId); |
|
166 | + throw new NotFoundException('Node for share not found, fileid: '.$this->fileId); |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | $this->node = $nodes[0]; |
@@ -275,7 +275,7 @@ |
||
275 | 275 | return $this->getAppValues($app); |
276 | 276 | } else { |
277 | 277 | $appIds = $this->getApps(); |
278 | - $values = array_map(function ($appId) use ($key) { |
|
278 | + $values = array_map(function($appId) use ($key) { |
|
279 | 279 | return isset($this->cache[$appId][$key]) ? $this->cache[$appId][$key] : null; |
280 | 280 | }, $appIds); |
281 | 281 | $result = array_combine($appIds, $values); |
@@ -43,19 +43,19 @@ |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | public function run(IOutput $output) { |
46 | - $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data'); |
|
46 | + $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data'); |
|
47 | 47 | $instanceId = $this->config->getSystemValue('instanceid', null); |
48 | 48 | |
49 | 49 | if (!is_string($instanceId) || empty($instanceId)) { |
50 | 50 | return; |
51 | 51 | } |
52 | 52 | |
53 | - $updaterFolderPath = $dataDir . '/updater-' . $instanceId; |
|
54 | - $stepFile = $updaterFolderPath . '/.step'; |
|
53 | + $updaterFolderPath = $dataDir.'/updater-'.$instanceId; |
|
54 | + $stepFile = $updaterFolderPath.'/.step'; |
|
55 | 55 | if (file_exists($stepFile)) { |
56 | 56 | $output->info('.step file exists'); |
57 | 57 | |
58 | - $previousStepFile = $updaterFolderPath . '/.step-previous-update'; |
|
58 | + $previousStepFile = $updaterFolderPath.'/.step-previous-update'; |
|
59 | 59 | |
60 | 60 | // cleanup |
61 | 61 | if (file_exists($previousStepFile)) { |
@@ -53,7 +53,7 @@ |
||
53 | 53 | public function sort($a, $b) { |
54 | 54 | if (!isset($a[$this->key]) || !isset($b[$this->key])) { |
55 | 55 | if (!is_null($this->log)) { |
56 | - $this->log->error('Sharing dialogue: cannot sort due to ' . |
|
56 | + $this->log->error('Sharing dialogue: cannot sort due to '. |
|
57 | 57 | 'missing array key', ['app' => 'core']); |
58 | 58 | } |
59 | 59 | return 0; |