Passed
Push — master ( ba03c1...e5d864 )
by Morris
11:34
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
 
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 			throw new \InvalidArgumentException("$appId can't be enabled for groups.");
267 267
 		}
268 268
 
269
-		$groupIds = array_map(function ($group) {
269
+		$groupIds = array_map(function($group) {
270 270
 			/** @var \OCP\IGroup $group */
271 271
 			return $group->getGID();
272 272
 		}, $groups);
@@ -312,8 +312,8 @@  discard block
 block discarded – undo
312 312
 	 */
313 313
 	public function getAppPath($appId) {
314 314
 		$appPath = \OC_App::getAppPath($appId);
315
-		if($appPath === false) {
316
-			throw new AppPathNotFoundException('Could not find path for ' . $appId);
315
+		if ($appPath === false) {
316
+			throw new AppPathNotFoundException('Could not find path for '.$appId);
317 317
 		}
318 318
 		return $appPath;
319 319
 	}
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 			} catch (AppPathNotFoundException $e) {
375 375
 				return null;
376 376
 			}
377
-			$file = $appPath . '/appinfo/info.xml';
377
+			$file = $appPath.'/appinfo/info.xml';
378 378
 		}
379 379
 
380 380
 		$parser = new InfoParser($this->memCacheFactory->createLocal('core.appinfo'));
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 	}
393 393
 
394 394
 	public function getAppVersion(string $appId, bool $useCache = true): string {
395
-		if(!$useCache || !isset($this->appVersions[$appId])) {
395
+		if (!$useCache || !isset($this->appVersions[$appId])) {
396 396
 			$appInfo = \OC::$server->getAppManager()->getAppInfo($appId);
397 397
 			$this->appVersions[$appId] = ($appInfo !== null && isset($appInfo['version'])) ? $appInfo['version'] : '0';
398 398
 		}
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 	 */
443 443
 	private function loadShippedJson() {
444 444
 		if ($this->shippedApps === null) {
445
-			$shippedJson = \OC::$SERVERROOT . '/core/shipped.json';
445
+			$shippedJson = \OC::$SERVERROOT.'/core/shipped.json';
446 446
 			if (!file_exists($shippedJson)) {
447 447
 				throw new \Exception("File not found: $shippedJson");
448 448
 			}
Please login to merge, or discard this patch.