Completed
Pull Request — master (#9222)
by Joas
71:57 queued 42:38
created
lib/private/Files/Cache/Propagator.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	 * @suppress SqlInjectionChecker
62 62
 	 */
63 63
 	public function propagateChange($internalPath, $time, $sizeDifference = 0) {
64
-		$storageId = (int)$this->storage->getStorageCache()->getNumericId();
64
+		$storageId = (int) $this->storage->getStorageCache()->getNumericId();
65 65
 
66 66
 		$parents = $this->getParents($internalPath);
67 67
 
@@ -76,12 +76,12 @@  discard block
 block discarded – undo
76 76
 		$etag = uniqid(); // since we give all folders the same etag we don't ask the storage for the etag
77 77
 
78 78
 		$builder = $this->connection->getQueryBuilder();
79
-		$hashParams = array_map(function ($hash) use ($builder) {
79
+		$hashParams = array_map(function($hash) use ($builder) {
80 80
 			return $builder->expr()->literal($hash);
81 81
 		}, $parentHashes);
82 82
 
83 83
 		$builder->update('filecache')
84
-			->set('mtime', $builder->createFunction('GREATEST(`mtime`, ' . $builder->createNamedParameter((int)$time, IQueryBuilder::PARAM_INT) . ')'))
84
+			->set('mtime', $builder->createFunction('GREATEST(`mtime`, '.$builder->createNamedParameter((int) $time, IQueryBuilder::PARAM_INT).')'))
85 85
 			->set('etag', $builder->createNamedParameter($etag, IQueryBuilder::PARAM_STR))
86 86
 			->where($builder->expr()->eq('storage', $builder->createNamedParameter($storageId, IQueryBuilder::PARAM_INT)))
87 87
 			->andWhere($builder->expr()->in('path_hash', $hashParams));
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 			// we need to do size separably so we can ignore entries with uncalculated size
93 93
 			$builder = $this->connection->getQueryBuilder();
94 94
 			$builder->update('filecache')
95
-				->set('size', $builder->createFunction('`size` + ' . $builder->createNamedParameter($sizeDifference)))
95
+				->set('size', $builder->createFunction('`size` + '.$builder->createNamedParameter($sizeDifference)))
96 96
 				->where($builder->expr()->eq('storage', $builder->createNamedParameter($storageId, IQueryBuilder::PARAM_INT)))
97 97
 				->andWhere($builder->expr()->in('path_hash', $hashParams))
98 98
 				->andWhere($builder->expr()->gt('size', $builder->expr()->literal(-1, IQueryBuilder::PARAM_INT)));
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 		$parents = [];
108 108
 		foreach ($parts as $part) {
109 109
 			$parents[] = $parent;
110
-			$parent = trim($parent . '/' . $part, '/');
110
+			$parent = trim($parent.'/'.$part, '/');
111 111
 		}
112 112
 		return $parents;
113 113
 	}
@@ -152,17 +152,17 @@  discard block
 block discarded – undo
152 152
 		$this->connection->beginTransaction();
153 153
 
154 154
 		$query = $this->connection->getQueryBuilder();
155
-		$storageId = (int)$this->storage->getStorageCache()->getNumericId();
155
+		$storageId = (int) $this->storage->getStorageCache()->getNumericId();
156 156
 
157 157
 		$query->update('filecache')
158
-			->set('mtime', $query->createFunction('GREATEST(`mtime`, ' . $query->createParameter('time') . ')'))
158
+			->set('mtime', $query->createFunction('GREATEST(`mtime`, '.$query->createParameter('time').')'))
159 159
 			->set('etag', $query->expr()->literal(uniqid()))
160 160
 			->where($query->expr()->eq('storage', $query->expr()->literal($storageId, IQueryBuilder::PARAM_INT)))
161 161
 			->andWhere($query->expr()->eq('path_hash', $query->createParameter('hash')));
162 162
 
163 163
 		$sizeQuery = $this->connection->getQueryBuilder();
164 164
 		$sizeQuery->update('filecache')
165
-			->set('size', $sizeQuery->createFunction('`size` + ' . $sizeQuery->createParameter('size')))
165
+			->set('size', $sizeQuery->createFunction('`size` + '.$sizeQuery->createParameter('size')))
166 166
 			->where($query->expr()->eq('storage', $query->expr()->literal($storageId, IQueryBuilder::PARAM_INT)))
167 167
 			->andWhere($query->expr()->eq('path_hash', $query->createParameter('hash')))
168 168
 			->andWhere($sizeQuery->expr()->gt('size', $sizeQuery->expr()->literal(-1, IQueryBuilder::PARAM_INT)));
Please login to merge, or discard this patch.
lib/private/Route/Router.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	public function __construct(ILogger $logger) {
73 73
 		$this->logger = $logger;
74 74
 		$baseUrl = \OC::$WEBROOT;
75
-		if(!(\OC::$server->getConfig()->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true')) {
75
+		if (!(\OC::$server->getConfig()->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true')) {
76 76
 			$baseUrl = \OC::$server->getURLGenerator()->linkTo('', 'index.php');
77 77
 		}
78 78
 		if (!\OC::$CLI && isset($_SERVER['REQUEST_METHOD'])) {
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
 			$this->routingFiles = [];
99 99
 			foreach (\OC_APP::getEnabledApps() as $app) {
100 100
 				$appPath = \OC_App::getAppPath($app);
101
-				if($appPath !== false) {
102
-					$file = $appPath . '/appinfo/routes.php';
101
+				if ($appPath !== false) {
102
+					$file = $appPath.'/appinfo/routes.php';
103 103
 					if (file_exists($file)) {
104 104
 						$this->routingFiles[$app] = $file;
105 105
 					}
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 * @param null|string $app
116 116
 	 */
117 117
 	public function loadRoutes($app = null) {
118
-		if(is_string($app)) {
118
+		if (is_string($app)) {
119 119
 			$app = \OC_App::cleanAppId($app);
120 120
 		}
121 121
 
@@ -130,14 +130,14 @@  discard block
 block discarded – undo
130 130
 			if (isset($this->loadedApps[$app])) {
131 131
 				return;
132 132
 			}
133
-			$file = \OC_App::getAppPath($app) . '/appinfo/routes.php';
133
+			$file = \OC_App::getAppPath($app).'/appinfo/routes.php';
134 134
 			if ($file !== false && file_exists($file)) {
135 135
 				$routingFiles = [$app => $file];
136 136
 			} else {
137 137
 				$routingFiles = [];
138 138
 			}
139 139
 		}
140
-		\OC::$server->getEventLogger()->start('loadroutes' . $requestedApp, 'Loading Routes');
140
+		\OC::$server->getEventLogger()->start('loadroutes'.$requestedApp, 'Loading Routes');
141 141
 		foreach ($routingFiles as $app => $file) {
142 142
 			if (!isset($this->loadedApps[$app])) {
143 143
 				if (!\OC_App::isAppLoaded($app)) {
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 				$this->useCollection($app);
151 151
 				$this->requireRouteFile($file, $app);
152 152
 				$collection = $this->getCollection($app);
153
-				$collection->addPrefix('/apps/' . $app);
153
+				$collection->addPrefix('/apps/'.$app);
154 154
 				$this->root->addCollection($collection);
155 155
 
156 156
 				// Also add the OCS collection
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
 		if (!isset($this->loadedApps['core'])) {
163 163
 			$this->loadedApps['core'] = true;
164 164
 			$this->useCollection('root');
165
-			require_once __DIR__ . '/../../../settings/routes.php';
166
-			require_once __DIR__ . '/../../../core/routes.php';
165
+			require_once __DIR__.'/../../../settings/routes.php';
166
+			require_once __DIR__.'/../../../core/routes.php';
167 167
 
168 168
 			// Also add the OCS collection
169 169
 			$collection = $this->getCollection('root.ocs');
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 			$collection->addPrefix('/ocs');
176 176
 			$this->root->addCollection($collection);
177 177
 		}
178
-		\OC::$server->getEventLogger()->end('loadroutes' . $requestedApp);
178
+		\OC::$server->getEventLogger()->end('loadroutes'.$requestedApp);
179 179
 	}
180 180
 
181 181
 	/**
@@ -246,14 +246,14 @@  discard block
 block discarded – undo
246 246
 	public function match($url) {
247 247
 		if (substr($url, 0, 6) === '/apps/') {
248 248
 			// empty string / 'apps' / $app / rest of the route
249
-			list(, , $app,) = explode('/', $url, 4);
249
+			list(,, $app,) = explode('/', $url, 4);
250 250
 
251 251
 			$app = \OC_App::cleanAppId($app);
252 252
 			\OC::$REQUESTEDAPP = $app;
253 253
 			$this->loadRoutes($app);
254 254
 		} else if (substr($url, 0, 13) === '/ocsapp/apps/') {
255 255
 			// empty string / 'ocsapp' / 'apps' / $app / rest of the route
256
-			list(, , , $app,) = explode('/', $url, 5);
256
+			list(,,, $app,) = explode('/', $url, 5);
257 257
 
258 258
 			$app = \OC_App::cleanAppId($app);
259 259
 			\OC::$REQUESTEDAPP = $app;
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 				// However, since Symfony does not allow empty route names, the route
278 278
 				// we need to match is '/', so we need to append the '/' here.
279 279
 				try {
280
-					$parameters = $matcher->match($url . '/');
280
+					$parameters = $matcher->match($url.'/');
281 281
 				} catch (ResourceNotFoundException $newException) {
282 282
 					// If we still didn't match a route, we throw the original exception
283 283
 					throw $e;
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
 		if (is_array($routes)) {
368 368
 			$appNameSpace = App::buildAppNamespace($appName);
369 369
 
370
-			$applicationClassName = $appNameSpace . '\\AppInfo\\Application';
370
+			$applicationClassName = $appNameSpace.'\\AppInfo\\Application';
371 371
 
372 372
 			if (class_exists($applicationClassName)) {
373 373
 				$application = new $applicationClassName();
Please login to merge, or discard this patch.
apps/files_sharing/lib/Controller/RemoteController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 			return new DataResponse();
85 85
 		}
86 86
 
87
-		$this->logger->error('Could not accept federated share with id: ' . $id,
87
+		$this->logger->error('Could not accept federated share with id: '.$id,
88 88
 			['app' => 'files_sharing']);
89 89
 
90 90
 		throw new OCSNotFoundException('wrong share ID, share doesn\'t exist.');
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 * @return array enriched share info with data from the filecache
116 116
 	 */
117 117
 	private static function extendShareInfo($share) {
118
-		$view = new \OC\Files\View('/' . \OC_User::getUser() . '/files/');
118
+		$view = new \OC\Files\View('/'.\OC_User::getUser().'/files/');
119 119
 		$info = $view->getFileInfo($share['mountpoint']);
120 120
 
121 121
 		$share['mimetype'] = $info->getMimetype();
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 			throw new OCSNotFoundException('Share does not exist');
179 179
 		}
180 180
 
181
-		$mountPoint = '/' . \OC_User::getUser() . '/files' . $shareInfo['mountpoint'];
181
+		$mountPoint = '/'.\OC_User::getUser().'/files'.$shareInfo['mountpoint'];
182 182
 
183 183
 		if ($this->externalManager->removeShare($mountPoint) === true) {
184 184
 			return new DataResponse();
Please login to merge, or discard this patch.
settings/ajax/disableapp.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 $lastConfirm = (int) \OC::$server->getSession()->get('last-password-confirm');
28 28
 if ($lastConfirm < (time() - 30 * 60 + 15)) { // allow 15 seconds delay
29 29
 	$l = \OC::$server->getL10N('core');
30
-	OC_JSON::error(array( 'data' => array( 'message' => $l->t('Password confirmation is required'))));
30
+	OC_JSON::error(array('data' => array('message' => $l->t('Password confirmation is required'))));
31 31
 	exit();
32 32
 }
33 33
 
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 	exit;
37 37
 }
38 38
 
39
-$appIds = (array)$_POST['appid'];
40
-foreach($appIds as $appId) {
39
+$appIds = (array) $_POST['appid'];
40
+foreach ($appIds as $appId) {
41 41
 	$appId = OC_App::cleanAppId($appId);
42 42
 	\OC::$server->getAppManager()->disableApp($appId);
43 43
 }
Please login to merge, or discard this patch.
apps/testing/lib/AppInfo/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 use OCA\Testing\AlternativeHomeUserBackend;
26 26
 
27 27
 class Application extends App {
28
-	public function __construct (array $urlParams = array()) {
28
+	public function __construct(array $urlParams = array()) {
29 29
 		$appName = 'testing';
30 30
 		parent::__construct($appName, $urlParams);
31 31
 
Please login to merge, or discard this patch.
apps/testing/lib/Controller/LockingController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 */
99 99
 	protected function getPath($user, $path) {
100 100
 		$node = $this->rootFolder->getUserFolder($user)->get($path);
101
-		return 'files/' . md5($node->getStorage()->getId() . '::' . trim($node->getInternalPath(), '/'));
101
+		return 'files/'.md5($node->getStorage()->getId().'::'.trim($node->getInternalPath(), '/'));
102 102
 	}
103 103
 
104 104
 	/**
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
 		try {
136 136
 			$lockingProvider->acquireLock($path, $type);
137
-			$this->config->setAppValue('testing', 'locking_' . $path, $type);
137
+			$this->config->setAppValue('testing', 'locking_'.$path, $type);
138 138
 			return new DataResponse();
139 139
 		} catch (LockedException $e) {
140 140
 			throw new OCSException('', Http::STATUS_LOCKED, $e);
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 
162 162
 		try {
163 163
 			$lockingProvider->changeLock($path, $type);
164
-			$this->config->setAppValue('testing', 'locking_' . $path, $type);
164
+			$this->config->setAppValue('testing', 'locking_'.$path, $type);
165 165
 			return new DataResponse();
166 166
 		} catch (LockedException $e) {
167 167
 			throw new OCSException('', Http::STATUS_LOCKED, $e);
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 
189 189
 		try {
190 190
 			$lockingProvider->releaseLock($path, $type);
191
-			$this->config->deleteAppValue('testing', 'locking_' . $path);
191
+			$this->config->deleteAppValue('testing', 'locking_'.$path);
192 192
 			return new DataResponse();
193 193
 		} catch (LockedException $e) {
194 194
 			throw new OCSException('', Http::STATUS_LOCKED, $e);
@@ -231,9 +231,9 @@  discard block
 block discarded – undo
231 231
 			if (strpos($lock, 'locking_') === 0) {
232 232
 				$path = substr($lock, strlen('locking_'));
233 233
 
234
-				if ($type === ILockingProvider::LOCK_EXCLUSIVE && (int)$this->config->getAppValue('testing', $lock) === ILockingProvider::LOCK_EXCLUSIVE) {
234
+				if ($type === ILockingProvider::LOCK_EXCLUSIVE && (int) $this->config->getAppValue('testing', $lock) === ILockingProvider::LOCK_EXCLUSIVE) {
235 235
 					$lockingProvider->releaseLock($path, $this->config->getAppValue('testing', $lock));
236
-				} else if ($type === ILockingProvider::LOCK_SHARED && (int)$this->config->getAppValue('testing', $lock) === ILockingProvider::LOCK_SHARED) {
236
+				} else if ($type === ILockingProvider::LOCK_SHARED && (int) $this->config->getAppValue('testing', $lock) === ILockingProvider::LOCK_SHARED) {
237 237
 					$lockingProvider->releaseLock($path, $this->config->getAppValue('testing', $lock));
238 238
 				} else {
239 239
 					$lockingProvider->releaseLock($path, $this->config->getAppValue('testing', $lock));
Please login to merge, or discard this patch.
lib/public/AppFramework/Http/DataDisplayResponse.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
 	 * @param array $headers additional key value based headers
47 47
 	 * @since 8.1.0
48 48
 	 */
49
-	public function __construct($data='', $statusCode=Http::STATUS_OK,
50
-	                            $headers=[]) {
49
+	public function __construct($data = '', $statusCode = Http::STATUS_OK,
50
+	                            $headers = []) {
51 51
 		$this->data = $data;
52 52
 		$this->setStatus($statusCode);
53 53
 		$this->setHeaders(array_merge($this->getHeaders(), $headers));
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 * @return DataDisplayResponse Reference to this object
71 71
 	 * @since 8.1.0
72 72
 	 */
73
-	public function setData($data){
73
+	public function setData($data) {
74 74
 		$this->data = $data;
75 75
 
76 76
 		return $this;
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	 * @return string the data
83 83
 	 * @since 8.1.0
84 84
 	 */
85
-	public function getData(){
85
+	public function getData() {
86 86
 		return $this->data;
87 87
 	}
88 88
 
Please login to merge, or discard this patch.
lib/private/Archive/Archive.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	 * @param string $source either a local file or string data
50 50
 	 * @return bool
51 51
 	 */
52
-	public abstract function addFile($path, $source='');
52
+	public abstract function addFile($path, $source = '');
53 53
 	/**
54 54
 	 * rename a file or folder in the archive
55 55
 	 * @param string $source
@@ -126,15 +126,15 @@  discard block
 block discarded – undo
126 126
 	 */
127 127
 	public function addRecursive($path, $source) {
128 128
 		$dh = opendir($source);
129
-		if(is_resource($dh)) {
129
+		if (is_resource($dh)) {
130 130
 			$this->addFolder($path);
131 131
 			while (($file = readdir($dh)) !== false) {
132
-				if($file === '.' || $file === '..') {
132
+				if ($file === '.' || $file === '..') {
133 133
 					continue;
134 134
 				}
135
-				if(is_dir($source.'/'.$file)) {
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/Share20/DefaultShareProvider.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 			->orderBy('id');
288 288
 
289 289
 		$cursor = $qb->execute();
290
-		while($data = $cursor->fetch()) {
290
+		while ($data = $cursor->fetch()) {
291 291
 			$children[] = $this->createShare($data);
292 292
 		}
293 293
 		$cursor->closeCursor();
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 			$user = $this->userManager->get($recipient);
333 333
 
334 334
 			if (is_null($group)) {
335
-				throw new ProviderException('Group "' . $share->getSharedWith() . '" does not exist');
335
+				throw new ProviderException('Group "'.$share->getSharedWith().'" does not exist');
336 336
 			}
337 337
 
338 338
 			if (!$group->inGroup($user)) {
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
 			);
493 493
 		}
494 494
 
495
-		$qb->innerJoin('s', 'filecache' ,'f', $qb->expr()->eq('s.file_source', 'f.fileid'));
495
+		$qb->innerJoin('s', 'filecache', 'f', $qb->expr()->eq('s.file_source', 'f.fileid'));
496 496
 		$qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId())));
497 497
 
498 498
 		$qb->orderBy('id');
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
 
549 549
 		$cursor = $qb->execute();
550 550
 		$shares = [];
551
-		while($data = $cursor->fetch()) {
551
+		while ($data = $cursor->fetch()) {
552 552
 			$shares[] = $this->createShare($data);
553 553
 		}
554 554
 		$cursor->closeCursor();
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
 			->execute();
628 628
 
629 629
 		$shares = [];
630
-		while($data = $cursor->fetch()) {
630
+		while ($data = $cursor->fetch()) {
631 631
 			$shares[] = $this->createShare($data);
632 632
 		}
633 633
 		$cursor->closeCursor();
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
 
699 699
 			$cursor = $qb->execute();
700 700
 
701
-			while($data = $cursor->fetch()) {
701
+			while ($data = $cursor->fetch()) {
702 702
 				if ($this->isAccessibleResult($data)) {
703 703
 					$shares[] = $this->createShare($data);
704 704
 				}
@@ -713,7 +713,7 @@  discard block
 block discarded – undo
713 713
 			$shares2 = [];
714 714
 
715 715
 			$start = 0;
716
-			while(true) {
716
+			while (true) {
717 717
 				$groups = array_slice($allGroups, $start, 100);
718 718
 				$start += 100;
719 719
 
@@ -758,7 +758,7 @@  discard block
 block discarded – undo
758 758
 					));
759 759
 
760 760
 				$cursor = $qb->execute();
761
-				while($data = $cursor->fetch()) {
761
+				while ($data = $cursor->fetch()) {
762 762
 					if ($offset > 0) {
763 763
 						$offset--;
764 764
 						continue;
@@ -827,14 +827,14 @@  discard block
 block discarded – undo
827 827
 	 */
828 828
 	private function createShare($data) {
829 829
 		$share = new Share($this->rootFolder, $this->userManager);
830
-		$share->setId((int)$data['id'])
831
-			->setShareType((int)$data['share_type'])
832
-			->setPermissions((int)$data['permissions'])
830
+		$share->setId((int) $data['id'])
831
+			->setShareType((int) $data['share_type'])
832
+			->setPermissions((int) $data['permissions'])
833 833
 			->setTarget($data['file_target'])
834
-			->setMailSend((bool)$data['mail_send']);
834
+			->setMailSend((bool) $data['mail_send']);
835 835
 
836 836
 		$shareTime = new \DateTime();
837
-		$shareTime->setTimestamp((int)$data['stime']);
837
+		$shareTime->setTimestamp((int) $data['stime']);
838 838
 		$share->setShareTime($shareTime);
839 839
 
840 840
 		if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER) {
@@ -849,7 +849,7 @@  discard block
 block discarded – undo
849 849
 		$share->setSharedBy($data['uid_initiator']);
850 850
 		$share->setShareOwner($data['uid_owner']);
851 851
 
852
-		$share->setNodeId((int)$data['file_source']);
852
+		$share->setNodeId((int) $data['file_source']);
853 853
 		$share->setNodeType($data['item_type']);
854 854
 
855 855
 		if ($data['expiration'] !== null) {
@@ -879,7 +879,7 @@  discard block
 block discarded – undo
879 879
 		$result = [];
880 880
 
881 881
 		$start = 0;
882
-		while(true) {
882
+		while (true) {
883 883
 			/** @var Share[] $shareSlice */
884 884
 			$shareSlice = array_slice($shares, $start, 100);
885 885
 			$start += 100;
@@ -894,7 +894,7 @@  discard block
 block discarded – undo
894 894
 			$shareMap = [];
895 895
 
896 896
 			foreach ($shareSlice as $share) {
897
-				$ids[] = (int)$share->getId();
897
+				$ids[] = (int) $share->getId();
898 898
 				$shareMap[$share->getId()] = $share;
899 899
 			}
900 900
 
@@ -911,8 +911,8 @@  discard block
 block discarded – undo
911 911
 
912 912
 			$stmt = $query->execute();
913 913
 
914
-			while($data = $stmt->fetch()) {
915
-				$shareMap[$data['parent']]->setPermissions((int)$data['permissions']);
914
+			while ($data = $stmt->fetch()) {
915
+				$shareMap[$data['parent']]->setPermissions((int) $data['permissions']);
916 916
 				$shareMap[$data['parent']]->setTarget($data['file_target']);
917 917
 			}
918 918
 
@@ -1009,8 +1009,8 @@  discard block
 block discarded – undo
1009 1009
 
1010 1010
 		$cursor = $qb->execute();
1011 1011
 		$ids = [];
1012
-		while($row = $cursor->fetch()) {
1013
-			$ids[] = (int)$row['id'];
1012
+		while ($row = $cursor->fetch()) {
1013
+			$ids[] = (int) $row['id'];
1014 1014
 		}
1015 1015
 		$cursor->closeCursor();
1016 1016
 
@@ -1052,8 +1052,8 @@  discard block
 block discarded – undo
1052 1052
 
1053 1053
 		$cursor = $qb->execute();
1054 1054
 		$ids = [];
1055
-		while($row = $cursor->fetch()) {
1056
-			$ids[] = (int)$row['id'];
1055
+		while ($row = $cursor->fetch()) {
1056
+			$ids[] = (int) $row['id'];
1057 1057
 		}
1058 1058
 		$cursor->closeCursor();
1059 1059
 
@@ -1107,8 +1107,8 @@  discard block
 block discarded – undo
1107 1107
 
1108 1108
 		$users = [];
1109 1109
 		$link = false;
1110
-		while($row = $cursor->fetch()) {
1111
-			$type = (int)$row['share_type'];
1110
+		while ($row = $cursor->fetch()) {
1111
+			$type = (int) $row['share_type'];
1112 1112
 			if ($type === \OCP\Share::SHARE_TYPE_USER) {
1113 1113
 				$uid = $row['share_with'];
1114 1114
 				$users[$uid] = isset($users[$uid]) ? $users[$uid] : [];
Please login to merge, or discard this patch.