@@ -124,11 +124,11 @@ discard block |
||
124 | 124 | $values = $this->appConfig->getValues(false, 'enabled'); |
125 | 125 | |
126 | 126 | $alwaysEnabledApps = $this->getAlwaysEnabledApps(); |
127 | - foreach($alwaysEnabledApps as $appId) { |
|
127 | + foreach ($alwaysEnabledApps as $appId) { |
|
128 | 128 | $values[$appId] = 'yes'; |
129 | 129 | } |
130 | 130 | |
131 | - $this->installedAppsCache = array_filter($values, function ($value) { |
|
131 | + $this->installedAppsCache = array_filter($values, function($value) { |
|
132 | 132 | return $value !== 'no'; |
133 | 133 | }); |
134 | 134 | ksort($this->installedAppsCache); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | */ |
154 | 154 | public function getEnabledAppsForUser(IUser $user) { |
155 | 155 | $apps = $this->getInstalledAppsValues(); |
156 | - $appsForUser = array_filter($apps, function ($enabled) use ($user) { |
|
156 | + $appsForUser = array_filter($apps, function($enabled) use ($user) { |
|
157 | 157 | return $this->checkAppForUser($enabled, $user); |
158 | 158 | }); |
159 | 159 | return array_keys($appsForUser); |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | */ |
166 | 166 | public function getEnabledAppsForGroup(IGroup $group): array { |
167 | 167 | $apps = $this->getInstalledAppsValues(); |
168 | - $appsForGroups = array_filter($apps, function ($enabled) use ($group) { |
|
168 | + $appsForGroups = array_filter($apps, function($enabled) use ($group) { |
|
169 | 169 | return $this->checkAppForGroups($enabled, $group); |
170 | 170 | }); |
171 | 171 | return array_keys($appsForGroups); |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | } elseif ($user === null) { |
230 | 230 | return false; |
231 | 231 | } else { |
232 | - if(empty($enabled)){ |
|
232 | + if (empty($enabled)) { |
|
233 | 233 | return false; |
234 | 234 | } |
235 | 235 | |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | |
238 | 238 | if (!is_array($groupIds)) { |
239 | 239 | $jsonError = json_last_error(); |
240 | - $this->logger->warning('AppManger::checkAppForUser - can\'t decode group IDs: ' . print_r($enabled, true) . ' - json error code: ' . $jsonError, ['app' => 'lib']); |
|
240 | + $this->logger->warning('AppManger::checkAppForUser - can\'t decode group IDs: '.print_r($enabled, true).' - json error code: '.$jsonError, ['app' => 'lib']); |
|
241 | 241 | return false; |
242 | 242 | } |
243 | 243 | |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | |
271 | 271 | if (!is_array($groupIds)) { |
272 | 272 | $jsonError = json_last_error(); |
273 | - $this->logger->warning('AppManger::checkAppForUser - can\'t decode group IDs: ' . print_r($enabled, true) . ' - json error code: ' . $jsonError, ['app' => 'lib']); |
|
273 | + $this->logger->warning('AppManger::checkAppForUser - can\'t decode group IDs: '.print_r($enabled, true).' - json error code: '.$jsonError, ['app' => 'lib']); |
|
274 | 274 | return false; |
275 | 275 | } |
276 | 276 | |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | throw new \InvalidArgumentException("$appId can't be enabled for groups."); |
343 | 343 | } |
344 | 344 | |
345 | - $groupIds = array_map(function ($group) { |
|
345 | + $groupIds = array_map(function($group) { |
|
346 | 346 | /** @var \OCP\IGroup $group */ |
347 | 347 | return ($group instanceof IGroup) |
348 | 348 | ? $group->getGID() |
@@ -398,8 +398,8 @@ discard block |
||
398 | 398 | */ |
399 | 399 | public function getAppPath($appId) { |
400 | 400 | $appPath = \OC_App::getAppPath($appId); |
401 | - if($appPath === false) { |
|
402 | - throw new AppPathNotFoundException('Could not find path for ' . $appId); |
|
401 | + if ($appPath === false) { |
|
402 | + throw new AppPathNotFoundException('Could not find path for '.$appId); |
|
403 | 403 | } |
404 | 404 | return $appPath; |
405 | 405 | } |
@@ -413,8 +413,8 @@ discard block |
||
413 | 413 | */ |
414 | 414 | public function getAppWebPath(string $appId): string { |
415 | 415 | $appWebPath = \OC_App::getAppWebPath($appId); |
416 | - if($appWebPath === false) { |
|
417 | - throw new AppPathNotFoundException('Could not find web path for ' . $appId); |
|
416 | + if ($appWebPath === false) { |
|
417 | + throw new AppPathNotFoundException('Could not find web path for '.$appId); |
|
418 | 418 | } |
419 | 419 | return $appWebPath; |
420 | 420 | } |
@@ -475,7 +475,7 @@ discard block |
||
475 | 475 | } catch (AppPathNotFoundException $e) { |
476 | 476 | return null; |
477 | 477 | } |
478 | - $file = $appPath . '/appinfo/info.xml'; |
|
478 | + $file = $appPath.'/appinfo/info.xml'; |
|
479 | 479 | } |
480 | 480 | |
481 | 481 | $parser = new InfoParser($this->memCacheFactory->createLocal('core.appinfo')); |
@@ -493,7 +493,7 @@ discard block |
||
493 | 493 | } |
494 | 494 | |
495 | 495 | public function getAppVersion(string $appId, bool $useCache = true): string { |
496 | - if(!$useCache || !isset($this->appVersions[$appId])) { |
|
496 | + if (!$useCache || !isset($this->appVersions[$appId])) { |
|
497 | 497 | $appInfo = $this->getAppInfo($appId); |
498 | 498 | $this->appVersions[$appId] = ($appInfo !== null && isset($appInfo['version'])) ? $appInfo['version'] : '0'; |
499 | 499 | } |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | */ |
544 | 544 | private function loadShippedJson() { |
545 | 545 | if ($this->shippedApps === null) { |
546 | - $shippedJson = \OC::$SERVERROOT . '/core/shipped.json'; |
|
546 | + $shippedJson = \OC::$SERVERROOT.'/core/shipped.json'; |
|
547 | 547 | if (!file_exists($shippedJson)) { |
548 | 548 | throw new \Exception("File not found: $shippedJson"); |
549 | 549 | } |