Passed
Push — master ( d52ee8...0e6e80 )
by Joas
52:59 queued 30:23
created
apps/contactsinteraction/composer/composer/ClassLoader.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -370,18 +370,18 @@  discard block
 block discarded – undo
370 370
     private function findFileWithExtension($class, $ext)
371 371
     {
372 372
         // PSR-4 lookup
373
-        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
373
+        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR).$ext;
374 374
 
375 375
         $first = $class[0];
376 376
         if (isset($this->prefixLengthsPsr4[$first])) {
377 377
             $subPath = $class;
378 378
             while (false !== $lastPos = strrpos($subPath, '\\')) {
379 379
                 $subPath = substr($subPath, 0, $lastPos);
380
-                $search = $subPath . '\\';
380
+                $search = $subPath.'\\';
381 381
                 if (isset($this->prefixDirsPsr4[$search])) {
382
-                    $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
382
+                    $pathEnd = DIRECTORY_SEPARATOR.substr($logicalPathPsr4, $lastPos + 1);
383 383
                     foreach ($this->prefixDirsPsr4[$search] as $dir) {
384
-                        if (file_exists($file = $dir . $pathEnd)) {
384
+                        if (file_exists($file = $dir.$pathEnd)) {
385 385
                             return $file;
386 386
                         }
387 387
                     }
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
 
392 392
         // PSR-4 fallback dirs
393 393
         foreach ($this->fallbackDirsPsr4 as $dir) {
394
-            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
394
+            if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr4)) {
395 395
                 return $file;
396 396
             }
397 397
         }
@@ -403,14 +403,14 @@  discard block
 block discarded – undo
403 403
                 . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
404 404
         } else {
405 405
             // PEAR-like class name
406
-            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
406
+            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR).$ext;
407 407
         }
408 408
 
409 409
         if (isset($this->prefixesPsr0[$first])) {
410 410
             foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
411 411
                 if (0 === strpos($class, $prefix)) {
412 412
                     foreach ($dirs as $dir) {
413
-                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
413
+                        if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) {
414 414
                             return $file;
415 415
                         }
416 416
                     }
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 
421 421
         // PSR-0 fallback dirs
422 422
         foreach ($this->fallbackDirsPsr0 as $dir) {
423
-            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
423
+            if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) {
424 424
                 return $file;
425 425
             }
426 426
         }
Please login to merge, or discard this patch.
apps/files/ajax/list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 $l = \OC::$server->getL10N('files');
34 34
 
35 35
 // Load the files
36
-$dir = isset($_GET['dir']) ? (string)$_GET['dir'] : '';
36
+$dir = isset($_GET['dir']) ? (string) $_GET['dir'] : '';
37 37
 $dir = \OC\Files\Filesystem::normalizePath($dir);
38 38
 
39 39
 try {
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
 	}
45 45
 
46 46
 	$data = [];
47
-	$baseUrl = \OC::$server->getURLGenerator()->linkTo('files', 'index.php') . '?dir=';
47
+	$baseUrl = \OC::$server->getURLGenerator()->linkTo('files', 'index.php').'?dir=';
48 48
 
49 49
 	$permissions = $dirInfo->getPermissions();
50 50
 
51
-	$sortAttribute = isset($_GET['sort']) ? (string)$_GET['sort'] : 'name';
51
+	$sortAttribute = isset($_GET['sort']) ? (string) $_GET['sort'] : 'name';
52 52
 	$sortDirection = isset($_GET['sortdirection']) ? ($_GET['sortdirection'] === 'desc') : false;
53 53
 	$mimetypeFilters = isset($_GET['mimetypes']) ? json_decode($_GET['mimetypes']) : '';
54 54
 
Please login to merge, or discard this patch.
apps/files_sharing/public.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 	} else {
35 35
 		http_response_code(307);
36 36
 	}
37
-	header('Location: ' . $urlGenerator->linkToRoute($route, ['token' => $token]));
37
+	header('Location: '.$urlGenerator->linkToRoute($route, ['token' => $token]));
38 38
 } else {
39 39
 	http_response_code(404);
40 40
 	$tmpl = new OCP\Template('', '404', 'guest');
Please login to merge, or discard this patch.
config/config.sample.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
  *
235 235
  * Defaults to ``60*60*24*15`` seconds (15 days)
236 236
  */
237
-'remember_login_cookie_lifetime' => 60*60*24*15,
237
+'remember_login_cookie_lifetime' => 60 * 60 * 24 * 15,
238 238
 
239 239
 /**
240 240
  * The lifetime of a session after inactivity.
@@ -1184,7 +1184,7 @@  discard block
 block discarded – undo
1184 1184
  * https://github.com/phpredis/phpredis/commit/c5994f2a42b8a348af92d3acb4edff1328ad8ce1
1185 1185
  */
1186 1186
 'redis.cluster' => [
1187
-	'seeds' => [ // provide some/all of the cluster servers to bootstrap discovery, port required
1187
+	'seeds' => [// provide some/all of the cluster servers to bootstrap discovery, port required
1188 1188
 		'localhost:7000',
1189 1189
 		'localhost:7001',
1190 1190
 	],
@@ -1249,7 +1249,7 @@  discard block
 block discarded – undo
1249 1249
  *
1250 1250
  * Defaults to ``60*60*24`` (1 day)
1251 1251
  */
1252
-'cache_chunk_gc_ttl' => 60*60*24,
1252
+'cache_chunk_gc_ttl' => 60 * 60 * 24,
1253 1253
 
1254 1254
 /**
1255 1255
  * Using Object Store with Nextcloud
@@ -1682,7 +1682,7 @@  discard block
 block discarded – undo
1682 1682
  * Defaults to ``60*60`` seconds (1 hour) or the php
1683 1683
  *             max_execution_time, whichever is higher.
1684 1684
  */
1685
-'filelocking.ttl' => 60*60,
1685
+'filelocking.ttl' => 60 * 60,
1686 1686
 
1687 1687
 /**
1688 1688
  * Memory caching backend for file locking
Please login to merge, or discard this patch.
lib/private/Files/Utils/Scanner.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -130,21 +130,21 @@  discard block
 block discarded – undo
130 130
 	 */
131 131
 	protected function attachListener($mount) {
132 132
 		$scanner = $mount->getStorage()->getScanner();
133
-		$scanner->listen('\OC\Files\Cache\Scanner', 'scanFile', function ($path) use ($mount) {
134
-			$this->emit('\OC\Files\Utils\Scanner', 'scanFile', [$mount->getMountPoint() . $path]);
135
-			$this->dispatcher->dispatchTyped(new BeforeFileScannedEvent($mount->getMountPoint() . $path));
133
+		$scanner->listen('\OC\Files\Cache\Scanner', 'scanFile', function($path) use ($mount) {
134
+			$this->emit('\OC\Files\Utils\Scanner', 'scanFile', [$mount->getMountPoint().$path]);
135
+			$this->dispatcher->dispatchTyped(new BeforeFileScannedEvent($mount->getMountPoint().$path));
136 136
 		});
137
-		$scanner->listen('\OC\Files\Cache\Scanner', 'scanFolder', function ($path) use ($mount) {
138
-			$this->emit('\OC\Files\Utils\Scanner', 'scanFolder', [$mount->getMountPoint() . $path]);
139
-			$this->dispatcher->dispatchTyped(new BeforeFolderScannedEvent($mount->getMountPoint() . $path));
137
+		$scanner->listen('\OC\Files\Cache\Scanner', 'scanFolder', function($path) use ($mount) {
138
+			$this->emit('\OC\Files\Utils\Scanner', 'scanFolder', [$mount->getMountPoint().$path]);
139
+			$this->dispatcher->dispatchTyped(new BeforeFolderScannedEvent($mount->getMountPoint().$path));
140 140
 		});
141
-		$scanner->listen('\OC\Files\Cache\Scanner', 'postScanFile', function ($path) use ($mount) {
142
-			$this->emit('\OC\Files\Utils\Scanner', 'postScanFile', [$mount->getMountPoint() . $path]);
143
-			$this->dispatcher->dispatchTyped(new FileScannedEvent($mount->getMountPoint() . $path));
141
+		$scanner->listen('\OC\Files\Cache\Scanner', 'postScanFile', function($path) use ($mount) {
142
+			$this->emit('\OC\Files\Utils\Scanner', 'postScanFile', [$mount->getMountPoint().$path]);
143
+			$this->dispatcher->dispatchTyped(new FileScannedEvent($mount->getMountPoint().$path));
144 144
 		});
145
-		$scanner->listen('\OC\Files\Cache\Scanner', 'postScanFolder', function ($path) use ($mount) {
146
-			$this->emit('\OC\Files\Utils\Scanner', 'postScanFolder', [$mount->getMountPoint() . $path]);
147
-			$this->dispatcher->dispatchTyped(new FolderScannedEvent($mount->getMountPoint() . $path));
145
+		$scanner->listen('\OC\Files\Cache\Scanner', 'postScanFolder', function($path) use ($mount) {
146
+			$this->emit('\OC\Files\Utils\Scanner', 'postScanFolder', [$mount->getMountPoint().$path]);
147
+			$this->dispatcher->dispatchTyped(new FolderScannedEvent($mount->getMountPoint().$path));
148 148
 		});
149 149
 	}
150 150
 
@@ -171,13 +171,13 @@  discard block
 block discarded – undo
171 171
 			$scanner = $storage->getScanner();
172 172
 			$this->attachListener($mount);
173 173
 
174
-			$scanner->listen('\OC\Files\Cache\Scanner', 'removeFromCache', function ($path) use ($storage) {
174
+			$scanner->listen('\OC\Files\Cache\Scanner', 'removeFromCache', function($path) use ($storage) {
175 175
 				$this->triggerPropagator($storage, $path);
176 176
 			});
177
-			$scanner->listen('\OC\Files\Cache\Scanner', 'updateCache', function ($path) use ($storage) {
177
+			$scanner->listen('\OC\Files\Cache\Scanner', 'updateCache', function($path) use ($storage) {
178 178
 				$this->triggerPropagator($storage, $path);
179 179
 			});
180
-			$scanner->listen('\OC\Files\Cache\Scanner', 'addToCache', function ($path) use ($storage) {
180
+			$scanner->listen('\OC\Files\Cache\Scanner', 'addToCache', function($path) use ($storage) {
181 181
 				$this->triggerPropagator($storage, $path);
182 182
 			});
183 183
 
@@ -235,15 +235,15 @@  discard block
 block discarded – undo
235 235
 			$scanner->setUseTransactions(false);
236 236
 			$this->attachListener($mount);
237 237
 
238
-			$scanner->listen('\OC\Files\Cache\Scanner', 'removeFromCache', function ($path) use ($storage) {
238
+			$scanner->listen('\OC\Files\Cache\Scanner', 'removeFromCache', function($path) use ($storage) {
239 239
 				$this->postProcessEntry($storage, $path);
240 240
 				$this->dispatcher->dispatchTyped(new NodeRemovedFromCache($storage, $path));
241 241
 			});
242
-			$scanner->listen('\OC\Files\Cache\Scanner', 'updateCache', function ($path) use ($storage) {
242
+			$scanner->listen('\OC\Files\Cache\Scanner', 'updateCache', function($path) use ($storage) {
243 243
 				$this->postProcessEntry($storage, $path);
244 244
 				$this->dispatcher->dispatchTyped(new FileCacheUpdated($storage, $path));
245 245
 			});
246
-			$scanner->listen('\OC\Files\Cache\Scanner', 'addToCache', function ($path) use ($storage) {
246
+			$scanner->listen('\OC\Files\Cache\Scanner', 'addToCache', function($path) use ($storage) {
247 247
 				$this->postProcessEntry($storage, $path);
248 248
 				$this->dispatcher->dispatchTyped(new NodeAddedToCache($storage, $path));
249 249
 			});
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 				}
267 267
 				$propagator->commitBatch();
268 268
 			} catch (StorageNotAvailableException $e) {
269
-				$this->logger->error('Storage ' . $storage->getId() . ' not available');
269
+				$this->logger->error('Storage '.$storage->getId().' not available');
270 270
 				$this->logger->logException($e);
271 271
 				$this->emit('\OC\Files\Utils\Scanner', 'StorageNotAvailable', [$e]);
272 272
 			}
Please login to merge, or discard this patch.
lib/private/Cache/File.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
 			$rootView = new View();
56 56
 			$user = \OC::$server->getUserSession()->getUser();
57 57
 			Filesystem::initMountPoints($user->getUID());
58
-			if (!$rootView->file_exists('/' . $user->getUID() . '/cache')) {
59
-				$rootView->mkdir('/' . $user->getUID() . '/cache');
58
+			if (!$rootView->file_exists('/'.$user->getUID().'/cache')) {
59
+				$rootView->mkdir('/'.$user->getUID().'/cache');
60 60
 			}
61
-			$this->storage = new View('/' . $user->getUID() . '/cache');
61
+			$this->storage = new View('/'.$user->getUID().'/cache');
62 62
 			return $this->storage;
63 63
 		} else {
64 64
 			\OCP\Util::writeLog('core', 'Can\'t get cache storage, user not logged in', ILogger::ERROR);
@@ -108,12 +108,12 @@  discard block
 block discarded – undo
108 108
 		// unique id to avoid chunk collision, just in case
109 109
 		$uniqueId = \OC::$server->getSecureRandom()->generate(
110 110
 			16,
111
-			ISecureRandom::CHAR_DIGITS . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER
111
+			ISecureRandom::CHAR_DIGITS.ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_UPPER
112 112
 		);
113 113
 
114 114
 		// use part file to prevent hasKey() to find the key
115 115
 		// while it is being written
116
-		$keyPart = $key . '.' . $uniqueId . '.part';
116
+		$keyPart = $key.'.'.$uniqueId.'.part';
117 117
 		if ($storage and $storage->file_put_contents($keyPart, $value)) {
118 118
 			if ($ttl === 0) {
119 119
 				$ttl = 86400; // 60*60*24
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 			if (is_resource($dh)) {
163 163
 				while (($file = readdir($dh)) !== false) {
164 164
 					if ($file != '.' and $file != '..' and ($prefix === '' || strpos($file, $prefix) === 0)) {
165
-						$storage->unlink('/' . $file);
165
+						$storage->unlink('/'.$file);
166 166
 					}
167 167
 				}
168 168
 			}
@@ -187,17 +187,17 @@  discard block
 block discarded – undo
187 187
 			while (($file = readdir($dh)) !== false) {
188 188
 				if ($file != '.' and $file != '..') {
189 189
 					try {
190
-						$mtime = $storage->filemtime('/' . $file);
190
+						$mtime = $storage->filemtime('/'.$file);
191 191
 						if ($mtime < $now) {
192
-							$storage->unlink('/' . $file);
192
+							$storage->unlink('/'.$file);
193 193
 						}
194 194
 					} catch (\OCP\Lock\LockedException $e) {
195 195
 						// ignore locked chunks
196
-						\OC::$server->getLogger()->debug('Could not cleanup locked chunk "' . $file . '"', ['app' => 'core']);
196
+						\OC::$server->getLogger()->debug('Could not cleanup locked chunk "'.$file.'"', ['app' => 'core']);
197 197
 					} catch (\OCP\Files\ForbiddenException $e) {
198
-						\OC::$server->getLogger()->debug('Could not cleanup forbidden chunk "' . $file . '"', ['app' => 'core']);
198
+						\OC::$server->getLogger()->debug('Could not cleanup forbidden chunk "'.$file.'"', ['app' => 'core']);
199 199
 					} catch (\OCP\Files\LockNotAcquiredException $e) {
200
-						\OC::$server->getLogger()->debug('Could not cleanup locked chunk "' . $file . '"', ['app' => 'core']);
200
+						\OC::$server->getLogger()->debug('Could not cleanup locked chunk "'.$file.'"', ['app' => 'core']);
201 201
 					}
202 202
 				}
203 203
 			}
Please login to merge, or discard this patch.
lib/private/Route/CachingRouter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 	 */
52 52
 	public function generate($name, $parameters = [], $absolute = false) {
53 53
 		asort($parameters);
54
-		$key = $this->context->getHost() . '#' . $this->context->getBaseUrl() . $name . sha1(json_encode($parameters)) . (int)$absolute;
54
+		$key = $this->context->getHost().'#'.$this->context->getBaseUrl().$name.sha1(json_encode($parameters)).(int) $absolute;
55 55
 		$cachedKey = $this->cache->get($key);
56 56
 		if ($cachedKey) {
57 57
 			return $cachedKey;
Please login to merge, or discard this patch.
lib/private/Repair/Collation.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 		$tables = $this->getAllNonUTF8BinTables($this->connection);
79 79
 		foreach ($tables as $table) {
80 80
 			$output->info("Change row format for $table ...");
81
-			$query = $this->connection->prepare('ALTER TABLE `' . $table . '` ROW_FORMAT = DYNAMIC;');
81
+			$query = $this->connection->prepare('ALTER TABLE `'.$table.'` ROW_FORMAT = DYNAMIC;');
82 82
 			try {
83 83
 				$query->execute();
84 84
 			} catch (DriverException $e) {
@@ -92,10 +92,10 @@  discard block
 block discarded – undo
92 92
 			$output->info("Change collation for $table ...");
93 93
 			if ($characterSet === 'utf8mb4') {
94 94
 				// need to set row compression first
95
-				$query = $this->connection->prepare('ALTER TABLE `' . $table . '` ROW_FORMAT=COMPRESSED;');
95
+				$query = $this->connection->prepare('ALTER TABLE `'.$table.'` ROW_FORMAT=COMPRESSED;');
96 96
 				$query->execute();
97 97
 			}
98
-			$query = $this->connection->prepare('ALTER TABLE `' . $table . '` CONVERT TO CHARACTER SET ' . $characterSet . ' COLLATE ' . $characterSet . '_bin;');
98
+			$query = $this->connection->prepare('ALTER TABLE `'.$table.'` CONVERT TO CHARACTER SET '.$characterSet.' COLLATE '.$characterSet.'_bin;');
99 99
 			try {
100 100
 				$query->execute();
101 101
 			} catch (DriverException $e) {
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
 
122 122
 		// fetch tables by columns
123 123
 		$statement = $connection->executeQuery(
124
-			"SELECT DISTINCT(TABLE_NAME) AS `table`" .
125
-			"	FROM INFORMATION_SCHEMA . COLUMNS" .
126
-			"	WHERE TABLE_SCHEMA = ?" .
127
-			"	AND (COLLATION_NAME <> '" . $characterSet . "_bin' OR CHARACTER_SET_NAME <> '" . $characterSet . "')" .
124
+			"SELECT DISTINCT(TABLE_NAME) AS `table`".
125
+			"	FROM INFORMATION_SCHEMA . COLUMNS".
126
+			"	WHERE TABLE_SCHEMA = ?".
127
+			"	AND (COLLATION_NAME <> '".$characterSet."_bin' OR CHARACTER_SET_NAME <> '".$characterSet."')".
128 128
 			"	AND TABLE_NAME LIKE '*PREFIX*%'",
129 129
 			[$dbName]
130 130
 		);
@@ -136,10 +136,10 @@  discard block
 block discarded – undo
136 136
 
137 137
 		// fetch tables by collation
138 138
 		$statement = $connection->executeQuery(
139
-			"SELECT DISTINCT(TABLE_NAME) AS `table`" .
140
-			"	FROM INFORMATION_SCHEMA . TABLES" .
141
-			"	WHERE TABLE_SCHEMA = ?" .
142
-			"	AND TABLE_COLLATION <> '" . $characterSet . "_bin'" .
139
+			"SELECT DISTINCT(TABLE_NAME) AS `table`".
140
+			"	FROM INFORMATION_SCHEMA . TABLES".
141
+			"	WHERE TABLE_SCHEMA = ?".
142
+			"	AND TABLE_COLLATION <> '".$characterSet."_bin'".
143 143
 			"	AND TABLE_NAME LIKE '*PREFIX*%'",
144 144
 			[$dbName]
145 145
 		);
Please login to merge, or discard this patch.
lib/private/Archive/TAR.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -91,20 +91,20 @@  discard block
 block discarded – undo
91 91
 	 */
92 92
 	public function addFolder($path) {
93 93
 		$tmpBase = \OC::$server->getTempManager()->getTemporaryFolder();
94
-		$path = rtrim($path, '/') . '/';
94
+		$path = rtrim($path, '/').'/';
95 95
 		if ($this->fileExists($path)) {
96 96
 			return false;
97 97
 		}
98 98
 		$parts = explode('/', $path);
99 99
 		$folder = $tmpBase;
100 100
 		foreach ($parts as $part) {
101
-			$folder .= '/' . $part;
101
+			$folder .= '/'.$part;
102 102
 			if (!is_dir($folder)) {
103 103
 				mkdir($folder);
104 104
 			}
105 105
 		}
106
-		$result = $this->tar->addModify([$tmpBase . $path], '', $tmpBase);
107
-		rmdir($tmpBase . $path);
106
+		$result = $this->tar->addModify([$tmpBase.$path], '', $tmpBase);
107
+		rmdir($tmpBase.$path);
108 108
 		$this->fileList = false;
109 109
 		$this->cachedHeaders = false;
110 110
 		return $result;
@@ -141,12 +141,12 @@  discard block
 block discarded – undo
141 141
 		//no proper way to delete, rename entire archive, rename file and remake archive
142 142
 		$tmp = \OC::$server->getTempManager()->getTemporaryFolder();
143 143
 		$this->tar->extract($tmp);
144
-		rename($tmp . $source, $tmp . $dest);
144
+		rename($tmp.$source, $tmp.$dest);
145 145
 		$this->tar = null;
146 146
 		unlink($this->path);
147 147
 		$types = [null, 'gz', 'bz'];
148 148
 		$this->tar = new \Archive_Tar($this->path, $types[self::getTarType($this->path)]);
149
-		$this->tar->createModify([$tmp], '', $tmp . '/');
149
+		$this->tar->createModify([$tmp], '', $tmp.'/');
150 150
 		$this->fileList = false;
151 151
 		$this->cachedHeaders = false;
152 152
 		return true;
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
 		}
162 162
 		foreach ($this->cachedHeaders as $header) {
163 163
 			if ($file == $header['filename']
164
-				or $file . '/' == $header['filename']
165
-				or '/' . $file . '/' == $header['filename']
166
-				or '/' . $file == $header['filename']
164
+				or $file.'/' == $header['filename']
165
+				or '/'.$file.'/' == $header['filename']
166
+				or '/'.$file == $header['filename']
167 167
 			) {
168 168
 				return $header;
169 169
 			}
@@ -262,13 +262,13 @@  discard block
 block discarded – undo
262 262
 		if (!$this->fileExists($path)) {
263 263
 			return false;
264 264
 		}
265
-		if ($this->fileExists('/' . $path)) {
266
-			$success = $this->tar->extractList(['/' . $path], $tmp);
265
+		if ($this->fileExists('/'.$path)) {
266
+			$success = $this->tar->extractList(['/'.$path], $tmp);
267 267
 		} else {
268 268
 			$success = $this->tar->extractList([$path], $tmp);
269 269
 		}
270 270
 		if ($success) {
271
-			rename($tmp . $path, $dest);
271
+			rename($tmp.$path, $dest);
272 272
 		}
273 273
 		\OCP\Files::rmdirr($tmp);
274 274
 		return $success;
@@ -292,10 +292,10 @@  discard block
 block discarded – undo
292 292
 	 */
293 293
 	public function fileExists($path) {
294 294
 		$files = $this->getFiles();
295
-		if ((array_search($path, $files) !== false) or (array_search($path . '/', $files) !== false)) {
295
+		if ((array_search($path, $files) !== false) or (array_search($path.'/', $files) !== false)) {
296 296
 			return true;
297 297
 		} else {
298
-			$folderPath = rtrim($path, '/') . '/';
298
+			$folderPath = rtrim($path, '/').'/';
299 299
 			$pathLength = strlen($folderPath);
300 300
 			foreach ($files as $file) {
301 301
 				if (strlen($file) > $pathLength and substr($file, 0, $pathLength) == $folderPath) {
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
 			}
305 305
 		}
306 306
 		if ($path[0] != '/') { //not all programs agree on the use of a leading /
307
-			return $this->fileExists('/' . $path);
307
+			return $this->fileExists('/'.$path);
308 308
 		} else {
309 309
 			return false;
310 310
 		}
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 		//no proper way to delete, extract entire archive, delete file and remake archive
326 326
 		$tmp = \OC::$server->getTempManager()->getTemporaryFolder();
327 327
 		$this->tar->extract($tmp);
328
-		\OCP\Files::rmdirr($tmp . $path);
328
+		\OCP\Files::rmdirr($tmp.$path);
329 329
 		$this->tar = null;
330 330
 		unlink($this->path);
331 331
 		$this->reopen();
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
 			return fopen($tmpFile, $mode);
357 357
 		} else {
358 358
 			$handle = fopen($tmpFile, $mode);
359
-			return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) {
359
+			return CallbackWrapper::wrap($handle, null, null, function() use ($path, $tmpFile) {
360 360
 				$this->writeBack($tmpFile, $path);
361 361
 			});
362 362
 		}
Please login to merge, or discard this patch.