@@ -84,7 +84,7 @@ |
||
84 | 84 | $providers[$provider->getId()] = $provider; |
85 | 85 | } catch (QueryException $exc) { |
86 | 86 | // Provider class can not be resolved |
87 | - throw new Exception('Could not load two-factor auth provider ' . $provider->getService()); |
|
87 | + throw new Exception('Could not load two-factor auth provider '.$provider->getService()); |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 |
@@ -180,7 +180,7 @@ |
||
180 | 180 | $data = strtotime($data); |
181 | 181 | $value->setTimestamp($data); |
182 | 182 | } elseif ($data !== null) { |
183 | - $data = (int)$data; |
|
183 | + $data = (int) $data; |
|
184 | 184 | $value->setTimestamp($data); |
185 | 185 | } |
186 | 186 |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | try { |
84 | 84 | $client = $this->clientService->newClient(); |
85 | 85 | $response = $client->get( |
86 | - $lookupServerUrl . '/users?search=' . urlencode($search), |
|
86 | + $lookupServerUrl.'/users?search='.urlencode($search), |
|
87 | 87 | [ |
88 | 88 | 'timeout' => 10, |
89 | 89 | 'connect_timeout' => 3, |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | try { |
97 | 97 | $remote = $this->cloudIdManager->resolveCloudId($lookup['federationId'])->getRemote(); |
98 | 98 | } catch (\Exception $e) { |
99 | - $this->logger->error('Can not parse federated cloud ID "' . $lookup['federationId'] . '"', [ |
|
99 | + $this->logger->error('Can not parse federated cloud ID "'.$lookup['federationId'].'"', [ |
|
100 | 100 | 'exception' => $e, |
101 | 101 | ]); |
102 | 102 | continue; |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | continue; |
106 | 106 | } |
107 | 107 | $name = isset($lookup['name']['value']) ? $lookup['name']['value'] : ''; |
108 | - $label = empty($name) ? $lookup['federationId'] : $name . ' (' . $lookup['federationId'] . ')'; |
|
108 | + $label = empty($name) ? $lookup['federationId'] : $name.' ('.$lookup['federationId'].')'; |
|
109 | 109 | $result[] = [ |
110 | 110 | 'label' => $label, |
111 | 111 | 'value' => [ |
@@ -57,7 +57,7 @@ |
||
57 | 57 | try { |
58 | 58 | $this->providerInstances[] = $this->serverContainer->query($provider); |
59 | 59 | } catch (QueryException $e) { |
60 | - $this->logger->error("Could not query resource provider $provider: " . $e->getMessage(), [ |
|
60 | + $this->logger->error("Could not query resource provider $provider: ".$e->getMessage(), [ |
|
61 | 61 | 'exception' => $e, |
62 | 62 | ]); |
63 | 63 | } |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $values[$appId] = 'yes'; |
133 | 133 | } |
134 | 134 | |
135 | - $this->installedAppsCache = array_filter($values, function ($value) { |
|
135 | + $this->installedAppsCache = array_filter($values, function($value) { |
|
136 | 136 | return $value !== 'no'; |
137 | 137 | }); |
138 | 138 | ksort($this->installedAppsCache); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | */ |
158 | 158 | public function getEnabledAppsForUser(IUser $user) { |
159 | 159 | $apps = $this->getInstalledAppsValues(); |
160 | - $appsForUser = array_filter($apps, function ($enabled) use ($user) { |
|
160 | + $appsForUser = array_filter($apps, function($enabled) use ($user) { |
|
161 | 161 | return $this->checkAppForUser($enabled, $user); |
162 | 162 | }); |
163 | 163 | return array_keys($appsForUser); |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | */ |
170 | 170 | public function getEnabledAppsForGroup(IGroup $group): array { |
171 | 171 | $apps = $this->getInstalledAppsValues(); |
172 | - $appsForGroups = array_filter($apps, function ($enabled) use ($group) { |
|
172 | + $appsForGroups = array_filter($apps, function($enabled) use ($group) { |
|
173 | 173 | return $this->checkAppForGroups($enabled, $group); |
174 | 174 | }); |
175 | 175 | return array_keys($appsForGroups); |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | |
242 | 242 | if (!is_array($groupIds)) { |
243 | 243 | $jsonError = json_last_error(); |
244 | - $this->logger->warning('AppManger::checkAppForUser - can\'t decode group IDs: ' . print_r($enabled, true) . ' - json error code: ' . $jsonError); |
|
244 | + $this->logger->warning('AppManger::checkAppForUser - can\'t decode group IDs: '.print_r($enabled, true).' - json error code: '.$jsonError); |
|
245 | 245 | return false; |
246 | 246 | } |
247 | 247 | |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | |
275 | 275 | if (!is_array($groupIds)) { |
276 | 276 | $jsonError = json_last_error(); |
277 | - $this->logger->warning('AppManger::checkAppForUser - can\'t decode group IDs: ' . print_r($enabled, true) . ' - json error code: ' . $jsonError); |
|
277 | + $this->logger->warning('AppManger::checkAppForUser - can\'t decode group IDs: '.print_r($enabled, true).' - json error code: '.$jsonError); |
|
278 | 278 | return false; |
279 | 279 | } |
280 | 280 | |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | $this->ignoreNextcloudRequirementForApp($appId); |
365 | 365 | } |
366 | 366 | |
367 | - $groupIds = array_map(function ($group) { |
|
367 | + $groupIds = array_map(function($group) { |
|
368 | 368 | /** @var \OCP\IGroup $group */ |
369 | 369 | return ($group instanceof IGroup) |
370 | 370 | ? $group->getGID() |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | public function getAppPath($appId) { |
421 | 421 | $appPath = \OC_App::getAppPath($appId); |
422 | 422 | if ($appPath === false) { |
423 | - throw new AppPathNotFoundException('Could not find path for ' . $appId); |
|
423 | + throw new AppPathNotFoundException('Could not find path for '.$appId); |
|
424 | 424 | } |
425 | 425 | return $appPath; |
426 | 426 | } |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | public function getAppWebPath(string $appId): string { |
436 | 436 | $appWebPath = \OC_App::getAppWebPath($appId); |
437 | 437 | if ($appWebPath === false) { |
438 | - throw new AppPathNotFoundException('Could not find web path for ' . $appId); |
|
438 | + throw new AppPathNotFoundException('Could not find web path for '.$appId); |
|
439 | 439 | } |
440 | 440 | return $appWebPath; |
441 | 441 | } |
@@ -496,7 +496,7 @@ discard block |
||
496 | 496 | } catch (AppPathNotFoundException $e) { |
497 | 497 | return null; |
498 | 498 | } |
499 | - $file = $appPath . '/appinfo/info.xml'; |
|
499 | + $file = $appPath.'/appinfo/info.xml'; |
|
500 | 500 | } |
501 | 501 | |
502 | 502 | $parser = new InfoParser($this->memCacheFactory->createLocal('core.appinfo')); |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | */ |
565 | 565 | private function loadShippedJson() { |
566 | 566 | if ($this->shippedApps === null) { |
567 | - $shippedJson = \OC::$SERVERROOT . '/core/shipped.json'; |
|
567 | + $shippedJson = \OC::$SERVERROOT.'/core/shipped.json'; |
|
568 | 568 | if (!file_exists($shippedJson)) { |
569 | 569 | throw new \Exception("File not found: $shippedJson"); |
570 | 570 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | return; |
70 | 70 | } |
71 | 71 | |
72 | - $this->logger->warning('Invalid '. $key . ' data provided to provideInitialState by ' . $appName); |
|
72 | + $this->logger->warning('Invalid '.$key.' data provided to provideInitialState by '.$appName); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | public function provideLazyInitialState(string $appName, string $key, Closure $closure): void { |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $provider = $this->container->query($initialState->getService()); |
119 | 119 | } catch (QueryException $e) { |
120 | 120 | // Log an continue. We can be fault tolerant here. |
121 | - $this->logger->error('Could not load initial state provider dynamically: ' . $e->getMessage(), [ |
|
121 | + $this->logger->error('Could not load initial state provider dynamically: '.$e->getMessage(), [ |
|
122 | 122 | 'exception' => $e, |
123 | 123 | 'app' => $initialState->getAppId(), |
124 | 124 | ]); |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | |
128 | 128 | if (!($provider instanceof InitialStateProvider)) { |
129 | 129 | // Log an continue. We can be fault tolerant here. |
130 | - $this->logger->error('Initial state provider is not an InitialStateProvider instance: ' . $initialState->getService(), [ |
|
130 | + $this->logger->error('Initial state provider is not an InitialStateProvider instance: '.$initialState->getService(), [ |
|
131 | 131 | 'app' => $initialState->getAppId(), |
132 | 132 | ]); |
133 | 133 | } |
@@ -6,42 +6,42 @@ |
||
6 | 6 | |
7 | 7 | class ComposerStaticInitFederation |
8 | 8 | { |
9 | - public static $prefixLengthsPsr4 = array ( |
|
9 | + public static $prefixLengthsPsr4 = array( |
|
10 | 10 | 'O' => |
11 | - array ( |
|
11 | + array( |
|
12 | 12 | 'OCA\\Federation\\' => 15, |
13 | 13 | ), |
14 | 14 | ); |
15 | 15 | |
16 | - public static $prefixDirsPsr4 = array ( |
|
16 | + public static $prefixDirsPsr4 = array( |
|
17 | 17 | 'OCA\\Federation\\' => |
18 | - array ( |
|
19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
18 | + array( |
|
19 | + 0 => __DIR__.'/..'.'/../lib', |
|
20 | 20 | ), |
21 | 21 | ); |
22 | 22 | |
23 | - public static $classMap = array ( |
|
24 | - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
|
25 | - 'OCA\\Federation\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
26 | - 'OCA\\Federation\\BackgroundJob\\GetSharedSecret' => __DIR__ . '/..' . '/../lib/BackgroundJob/GetSharedSecret.php', |
|
27 | - 'OCA\\Federation\\BackgroundJob\\RequestSharedSecret' => __DIR__ . '/..' . '/../lib/BackgroundJob/RequestSharedSecret.php', |
|
28 | - 'OCA\\Federation\\Command\\SyncFederationAddressBooks' => __DIR__ . '/..' . '/../lib/Command/SyncFederationAddressBooks.php', |
|
29 | - 'OCA\\Federation\\Controller\\OCSAuthAPIController' => __DIR__ . '/..' . '/../lib/Controller/OCSAuthAPIController.php', |
|
30 | - 'OCA\\Federation\\Controller\\SettingsController' => __DIR__ . '/..' . '/../lib/Controller/SettingsController.php', |
|
31 | - 'OCA\\Federation\\DAV\\FedAuth' => __DIR__ . '/..' . '/../lib/DAV/FedAuth.php', |
|
32 | - 'OCA\\Federation\\DbHandler' => __DIR__ . '/..' . '/../lib/DbHandler.php', |
|
33 | - 'OCA\\Federation\\Listener\\SabrePluginAuthInitListener' => __DIR__ . '/..' . '/../lib/Listener/SabrePluginAuthInitListener.php', |
|
34 | - 'OCA\\Federation\\Middleware\\AddServerMiddleware' => __DIR__ . '/..' . '/../lib/Middleware/AddServerMiddleware.php', |
|
35 | - 'OCA\\Federation\\Migration\\Version1010Date20200630191302' => __DIR__ . '/..' . '/../lib/Migration/Version1010Date20200630191302.php', |
|
36 | - 'OCA\\Federation\\Settings\\Admin' => __DIR__ . '/..' . '/../lib/Settings/Admin.php', |
|
37 | - 'OCA\\Federation\\SyncFederationAddressBooks' => __DIR__ . '/..' . '/../lib/SyncFederationAddressBooks.php', |
|
38 | - 'OCA\\Federation\\SyncJob' => __DIR__ . '/..' . '/../lib/SyncJob.php', |
|
39 | - 'OCA\\Federation\\TrustedServers' => __DIR__ . '/..' . '/../lib/TrustedServers.php', |
|
23 | + public static $classMap = array( |
|
24 | + 'Composer\\InstalledVersions' => __DIR__.'/..'.'/composer/InstalledVersions.php', |
|
25 | + 'OCA\\Federation\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
26 | + 'OCA\\Federation\\BackgroundJob\\GetSharedSecret' => __DIR__.'/..'.'/../lib/BackgroundJob/GetSharedSecret.php', |
|
27 | + 'OCA\\Federation\\BackgroundJob\\RequestSharedSecret' => __DIR__.'/..'.'/../lib/BackgroundJob/RequestSharedSecret.php', |
|
28 | + 'OCA\\Federation\\Command\\SyncFederationAddressBooks' => __DIR__.'/..'.'/../lib/Command/SyncFederationAddressBooks.php', |
|
29 | + 'OCA\\Federation\\Controller\\OCSAuthAPIController' => __DIR__.'/..'.'/../lib/Controller/OCSAuthAPIController.php', |
|
30 | + 'OCA\\Federation\\Controller\\SettingsController' => __DIR__.'/..'.'/../lib/Controller/SettingsController.php', |
|
31 | + 'OCA\\Federation\\DAV\\FedAuth' => __DIR__.'/..'.'/../lib/DAV/FedAuth.php', |
|
32 | + 'OCA\\Federation\\DbHandler' => __DIR__.'/..'.'/../lib/DbHandler.php', |
|
33 | + 'OCA\\Federation\\Listener\\SabrePluginAuthInitListener' => __DIR__.'/..'.'/../lib/Listener/SabrePluginAuthInitListener.php', |
|
34 | + 'OCA\\Federation\\Middleware\\AddServerMiddleware' => __DIR__.'/..'.'/../lib/Middleware/AddServerMiddleware.php', |
|
35 | + 'OCA\\Federation\\Migration\\Version1010Date20200630191302' => __DIR__.'/..'.'/../lib/Migration/Version1010Date20200630191302.php', |
|
36 | + 'OCA\\Federation\\Settings\\Admin' => __DIR__.'/..'.'/../lib/Settings/Admin.php', |
|
37 | + 'OCA\\Federation\\SyncFederationAddressBooks' => __DIR__.'/..'.'/../lib/SyncFederationAddressBooks.php', |
|
38 | + 'OCA\\Federation\\SyncJob' => __DIR__.'/..'.'/../lib/SyncJob.php', |
|
39 | + 'OCA\\Federation\\TrustedServers' => __DIR__.'/..'.'/../lib/TrustedServers.php', |
|
40 | 40 | ); |
41 | 41 | |
42 | 42 | public static function getInitializer(ClassLoader $loader) |
43 | 43 | { |
44 | - return \Closure::bind(function () use ($loader) { |
|
44 | + return \Closure::bind(function() use ($loader) { |
|
45 | 45 | $loader->prefixLengthsPsr4 = ComposerStaticInitFederation::$prefixLengthsPsr4; |
46 | 46 | $loader->prefixDirsPsr4 = ComposerStaticInitFederation::$prefixDirsPsr4; |
47 | 47 | $loader->classMap = ComposerStaticInitFederation::$classMap; |
@@ -6,20 +6,20 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', |
|
10 | - 'OCA\\Federation\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
11 | - 'OCA\\Federation\\BackgroundJob\\GetSharedSecret' => $baseDir . '/../lib/BackgroundJob/GetSharedSecret.php', |
|
12 | - 'OCA\\Federation\\BackgroundJob\\RequestSharedSecret' => $baseDir . '/../lib/BackgroundJob/RequestSharedSecret.php', |
|
13 | - 'OCA\\Federation\\Command\\SyncFederationAddressBooks' => $baseDir . '/../lib/Command/SyncFederationAddressBooks.php', |
|
14 | - 'OCA\\Federation\\Controller\\OCSAuthAPIController' => $baseDir . '/../lib/Controller/OCSAuthAPIController.php', |
|
15 | - 'OCA\\Federation\\Controller\\SettingsController' => $baseDir . '/../lib/Controller/SettingsController.php', |
|
16 | - 'OCA\\Federation\\DAV\\FedAuth' => $baseDir . '/../lib/DAV/FedAuth.php', |
|
17 | - 'OCA\\Federation\\DbHandler' => $baseDir . '/../lib/DbHandler.php', |
|
18 | - 'OCA\\Federation\\Listener\\SabrePluginAuthInitListener' => $baseDir . '/../lib/Listener/SabrePluginAuthInitListener.php', |
|
19 | - 'OCA\\Federation\\Middleware\\AddServerMiddleware' => $baseDir . '/../lib/Middleware/AddServerMiddleware.php', |
|
20 | - 'OCA\\Federation\\Migration\\Version1010Date20200630191302' => $baseDir . '/../lib/Migration/Version1010Date20200630191302.php', |
|
21 | - 'OCA\\Federation\\Settings\\Admin' => $baseDir . '/../lib/Settings/Admin.php', |
|
22 | - 'OCA\\Federation\\SyncFederationAddressBooks' => $baseDir . '/../lib/SyncFederationAddressBooks.php', |
|
23 | - 'OCA\\Federation\\SyncJob' => $baseDir . '/../lib/SyncJob.php', |
|
24 | - 'OCA\\Federation\\TrustedServers' => $baseDir . '/../lib/TrustedServers.php', |
|
9 | + 'Composer\\InstalledVersions' => $vendorDir.'/composer/InstalledVersions.php', |
|
10 | + 'OCA\\Federation\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
11 | + 'OCA\\Federation\\BackgroundJob\\GetSharedSecret' => $baseDir.'/../lib/BackgroundJob/GetSharedSecret.php', |
|
12 | + 'OCA\\Federation\\BackgroundJob\\RequestSharedSecret' => $baseDir.'/../lib/BackgroundJob/RequestSharedSecret.php', |
|
13 | + 'OCA\\Federation\\Command\\SyncFederationAddressBooks' => $baseDir.'/../lib/Command/SyncFederationAddressBooks.php', |
|
14 | + 'OCA\\Federation\\Controller\\OCSAuthAPIController' => $baseDir.'/../lib/Controller/OCSAuthAPIController.php', |
|
15 | + 'OCA\\Federation\\Controller\\SettingsController' => $baseDir.'/../lib/Controller/SettingsController.php', |
|
16 | + 'OCA\\Federation\\DAV\\FedAuth' => $baseDir.'/../lib/DAV/FedAuth.php', |
|
17 | + 'OCA\\Federation\\DbHandler' => $baseDir.'/../lib/DbHandler.php', |
|
18 | + 'OCA\\Federation\\Listener\\SabrePluginAuthInitListener' => $baseDir.'/../lib/Listener/SabrePluginAuthInitListener.php', |
|
19 | + 'OCA\\Federation\\Middleware\\AddServerMiddleware' => $baseDir.'/../lib/Middleware/AddServerMiddleware.php', |
|
20 | + 'OCA\\Federation\\Migration\\Version1010Date20200630191302' => $baseDir.'/../lib/Migration/Version1010Date20200630191302.php', |
|
21 | + 'OCA\\Federation\\Settings\\Admin' => $baseDir.'/../lib/Settings/Admin.php', |
|
22 | + 'OCA\\Federation\\SyncFederationAddressBooks' => $baseDir.'/../lib/SyncFederationAddressBooks.php', |
|
23 | + 'OCA\\Federation\\SyncJob' => $baseDir.'/../lib/SyncJob.php', |
|
24 | + 'OCA\\Federation\\TrustedServers' => $baseDir.'/../lib/TrustedServers.php', |
|
25 | 25 | ); |
@@ -54,11 +54,11 @@ |
||
54 | 54 | */ |
55 | 55 | public function run($arguments): void { |
56 | 56 | $uploadList = []; |
57 | - $this->userManager->callForSeenUsers(function (IUser $user) use (&$uploadList) { |
|
57 | + $this->userManager->callForSeenUsers(function(IUser $user) use (&$uploadList) { |
|
58 | 58 | $userId = $user->getUID(); |
59 | 59 | try { |
60 | 60 | \OC_Util::setupFS($userId); |
61 | - $filesExternalUploadsFolder = $this->rootFolder->get($userId . '/files_external/uploads'); |
|
61 | + $filesExternalUploadsFolder = $this->rootFolder->get($userId.'/files_external/uploads'); |
|
62 | 62 | } catch (NotFoundException $e) { |
63 | 63 | \OC_Util::tearDownFS(); |
64 | 64 | return; |