Completed
Pull Request — master (#8503)
by Blizzz
28:23 queued 10:12
created
lib/private/App/AppManager.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -113,11 +113,11 @@  discard block
 block discarded – undo
113 113
 			$values = $this->appConfig->getValues(false, 'enabled');
114 114
 
115 115
 			$alwaysEnabledApps = $this->getAlwaysEnabledApps();
116
-			foreach($alwaysEnabledApps as $appId) {
116
+			foreach ($alwaysEnabledApps as $appId) {
117 117
 				$values[$appId] = 'yes';
118 118
 			}
119 119
 
120
-			$this->installedAppsCache = array_filter($values, function ($value) {
120
+			$this->installedAppsCache = array_filter($values, function($value) {
121 121
 				return $value !== 'no';
122 122
 			});
123 123
 			ksort($this->installedAppsCache);
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 	 */
143 143
 	public function getEnabledAppsForUser(IUser $user) {
144 144
 		$apps = $this->getInstalledAppsValues();
145
-		$appsForUser = array_filter($apps, function ($enabled) use ($user) {
145
+		$appsForUser = array_filter($apps, function($enabled) use ($user) {
146 146
 			return $this->checkAppForUser($enabled, $user);
147 147
 		});
148 148
 		return array_keys($appsForUser);
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 		} elseif ($user === null) {
182 182
 			return false;
183 183
 		} else {
184
-			if(empty($enabled)){
184
+			if (empty($enabled)) {
185 185
 				return false;
186 186
 			}
187 187
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 
190 190
 			if (!is_array($groupIds)) {
191 191
 				$jsonError = json_last_error();
192
-				\OC::$server->getLogger()->warning('AppManger::checkAppForUser - can\'t decode group IDs: ' . print_r($enabled, true) . ' - json error code: ' . $jsonError, ['app' => 'lib']);
192
+				\OC::$server->getLogger()->warning('AppManger::checkAppForUser - can\'t decode group IDs: '.print_r($enabled, true).' - json error code: '.$jsonError, ['app' => 'lib']);
193 193
 				return false;
194 194
 			}
195 195
 
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 			}
264 264
 		}
265 265
 
266
-		$groupIds = array_map(function ($group) {
266
+		$groupIds = array_map(function($group) {
267 267
 			/** @var \OCP\IGroup $group */
268 268
 			return $group->getGID();
269 269
 		}, $groups);
@@ -302,8 +302,8 @@  discard block
 block discarded – undo
302 302
 	 */
303 303
 	public function getAppPath($appId) {
304 304
 		$appPath = \OC_App::getAppPath($appId);
305
-		if($appPath === false) {
306
-			throw new AppPathNotFoundException('Could not find path for ' . $appId);
305
+		if ($appPath === false) {
306
+			throw new AppPathNotFoundException('Could not find path for '.$appId);
307 307
 		}
308 308
 		return $appPath;
309 309
 	}
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 			} catch (AppPathNotFoundException $e) {
364 364
 				return [];
365 365
 			}
366
-			$file = $appPath . '/appinfo/info.xml';
366
+			$file = $appPath.'/appinfo/info.xml';
367 367
 		}
368 368
 
369 369
 		$parser = new InfoParser($this->memCacheFactory->createLocal('core.appinfo'));
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 	}
382 382
 
383 383
 	public function getAppVersion(string $appId, bool $useCache = true): string {
384
-		if(!$useCache || !isset($this->appVersions[$appId])) {
384
+		if (!$useCache || !isset($this->appVersions[$appId])) {
385 385
 			$appInfo = \OC::$server->getAppManager()->getAppInfo($appId);
386 386
 			$this->appVersions[$appId] = ($appInfo !== null && isset($appInfo['version'])) ? $appInfo['version'] : '0';
387 387
 		}
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
 	 */
430 430
 	private function loadShippedJson() {
431 431
 		if ($this->shippedApps === null) {
432
-			$shippedJson = \OC::$SERVERROOT . '/core/shipped.json';
432
+			$shippedJson = \OC::$SERVERROOT.'/core/shipped.json';
433 433
 			if (!file_exists($shippedJson)) {
434 434
 				throw new \Exception("File not found: $shippedJson");
435 435
 			}
Please login to merge, or discard this patch.