@@ -20,4 +20,4 @@ |
||
20 | 20 | * along with this program. If not, see <http://www.gnu.org/licenses/> |
21 | 21 | * |
22 | 22 | */ |
23 | -require_once __DIR__ . '/v1.php'; |
|
23 | +require_once __DIR__.'/v1.php'; |
@@ -30,10 +30,10 @@ discard block |
||
30 | 30 | * along with this program. If not, see <http://www.gnu.org/licenses/> |
31 | 31 | * |
32 | 32 | */ |
33 | -require_once __DIR__ . '/lib/versioncheck.php'; |
|
33 | +require_once __DIR__.'/lib/versioncheck.php'; |
|
34 | 34 | |
35 | 35 | try { |
36 | - require_once __DIR__ . '/lib/base.php'; |
|
36 | + require_once __DIR__.'/lib/base.php'; |
|
37 | 37 | if (\OCP\Util::needUpgrade()) { |
38 | 38 | // since the behavior of apps or remotes are unpredictable during |
39 | 39 | // an upgrade, return a 503 directly |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $pathInfo = trim($pathInfo, '/'); |
55 | 55 | [$service] = explode('/', $pathInfo); |
56 | 56 | } |
57 | - $file = \OC::$server->getConfig()->getAppValue('core', 'public_' . strip_tags($service)); |
|
57 | + $file = \OC::$server->getConfig()->getAppValue('core', 'public_'.strip_tags($service)); |
|
58 | 58 | if ($file === '') { |
59 | 59 | http_response_code(404); |
60 | 60 | exit; |
@@ -75,9 +75,9 @@ discard block |
||
75 | 75 | OC_App::loadApp($app); |
76 | 76 | OC_User::setIncognitoMode(true); |
77 | 77 | |
78 | - $baseuri = OC::$WEBROOT . '/public.php/' . $service . '/'; |
|
78 | + $baseuri = OC::$WEBROOT.'/public.php/'.$service.'/'; |
|
79 | 79 | |
80 | - require_once OC_App::getAppPath($app) . '/' . $parts[1]; |
|
80 | + require_once OC_App::getAppPath($app).'/'.$parts[1]; |
|
81 | 81 | } catch (Exception $ex) { |
82 | 82 | $status = 500; |
83 | 83 | if ($ex instanceof \OC\ServiceUnavailableException) { |
@@ -95,7 +95,7 @@ |
||
95 | 95 | } |
96 | 96 | $this->headerActions[] = $action; |
97 | 97 | } |
98 | - usort($this->headerActions, function (IMenuAction $a, IMenuAction $b) { |
|
98 | + usort($this->headerActions, function(IMenuAction $a, IMenuAction $b) { |
|
99 | 99 | return $a->getPriority() <=> $b->getPriority(); |
100 | 100 | }); |
101 | 101 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | } |
67 | 67 | |
68 | 68 | public function getProperties(): array { |
69 | - return array_filter($this->properties, function ($obj) { |
|
69 | + return array_filter($this->properties, function($obj) { |
|
70 | 70 | return $obj instanceof IAccountProperty; |
71 | 71 | }); |
72 | 72 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $index = $obj->getName(); |
97 | 97 | if ($this->isCollection($index)) { |
98 | 98 | $incrementals[$index] = ($incrementals[$index] ?? -1) + 1; |
99 | - $index .= '#' . $incrementals[$index]; |
|
99 | + $index .= '#'.$incrementals[$index]; |
|
100 | 100 | } |
101 | 101 | $result[$index] = $obj; |
102 | 102 | } |
@@ -282,9 +282,9 @@ discard block |
||
282 | 282 | } |
283 | 283 | |
284 | 284 | protected function getTables(Connection $db) { |
285 | - $db->getConfiguration()->setSchemaAssetsFilter(function ($asset) { |
|
285 | + $db->getConfiguration()->setSchemaAssetsFilter(function($asset) { |
|
286 | 286 | /** @var string|AbstractAsset $asset */ |
287 | - $filterExpression = '/^' . preg_quote($this->config->getSystemValue('dbtableprefix', 'oc_')) . '/'; |
|
287 | + $filterExpression = '/^'.preg_quote($this->config->getSystemValue('dbtableprefix', 'oc_')).'/'; |
|
288 | 288 | if ($asset instanceof AbstractAsset) { |
289 | 289 | return preg_match($filterExpression, $asset->getName()) !== false; |
290 | 290 | } |
@@ -301,12 +301,12 @@ discard block |
||
301 | 301 | * @param OutputInterface $output |
302 | 302 | */ |
303 | 303 | protected function copyTable(Connection $fromDB, Connection $toDB, Table $table, InputInterface $input, OutputInterface $output) { |
304 | - if ($table->getName() === $toDB->getPrefix() . 'migrations') { |
|
304 | + if ($table->getName() === $toDB->getPrefix().'migrations') { |
|
305 | 305 | $output->writeln('<comment>Skipping migrations table because it was already filled by running the migrations</comment>'); |
306 | 306 | return; |
307 | 307 | } |
308 | 308 | |
309 | - $chunkSize = (int)$input->getOption('chunk-size'); |
|
309 | + $chunkSize = (int) $input->getOption('chunk-size'); |
|
310 | 310 | |
311 | 311 | $query = $fromDB->getQueryBuilder(); |
312 | 312 | $query->automaticTablePrefix(false); |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | |
319 | 319 | $numChunks = ceil($count / $chunkSize); |
320 | 320 | if ($numChunks > 1) { |
321 | - $output->writeln('chunked query, ' . $numChunks . ' chunks'); |
|
321 | + $output->writeln('chunked query, '.$numChunks.' chunks'); |
|
322 | 322 | } |
323 | 323 | |
324 | 324 | $progress = new ProgressBar($output, $count); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $user = $input->getArgument('uid'); |
97 | 97 | if (!$this->userManager->userExists($user)) { |
98 | 98 | throw new \InvalidArgumentException( |
99 | - 'User <' . $user . '> is unknown.'); |
|
99 | + 'User <'.$user.'> is unknown.'); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | $birthday = $input->getOption('birthday'); |
@@ -112,11 +112,11 @@ discard block |
||
112 | 112 | } |
113 | 113 | |
114 | 114 | $calendarInfo = $this->calDav->getCalendarByUri( |
115 | - 'principals/users/' . $user, |
|
115 | + 'principals/users/'.$user, |
|
116 | 116 | $name); |
117 | 117 | if ($calendarInfo === null) { |
118 | 118 | throw new \InvalidArgumentException( |
119 | - 'User <' . $user . '> has no calendar named <' . $name . '>. You can run occ dav:list-calendars to list calendars URIs for this user.'); |
|
119 | + 'User <'.$user.'> has no calendar named <'.$name.'>. You can run occ dav:list-calendars to list calendars URIs for this user.'); |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | $calendar = new Calendar( |
@@ -332,7 +332,7 @@ |
||
332 | 332 | |
333 | 333 | $access = $this->userBackend->getLDAPAccess($uid); |
334 | 334 | $connection = $access->getConnection(); |
335 | - $key = $uid . '-' . $attribute; |
|
335 | + $key = $uid.'-'.$attribute; |
|
336 | 336 | |
337 | 337 | $cached = $connection->getFromCache($key); |
338 | 338 | if (is_array($cached)) { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $this->defaultTextColorPrimary = '#ffffff'; |
73 | 73 | $this->defaultProductName = 'Nextcloud'; |
74 | 74 | |
75 | - $themePath = OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.php'; |
|
75 | + $themePath = OC::$SERVERROOT.'/themes/'.OC_Util::getTheme().'/defaults.php'; |
|
76 | 76 | if (file_exists($themePath)) { |
77 | 77 | // prevent defaults.php from printing output |
78 | 78 | ob_start(); |
@@ -247,9 +247,9 @@ discard block |
||
247 | 247 | if ($this->themeExist('getShortFooter')) { |
248 | 248 | $footer = $this->theme->getShortFooter(); |
249 | 249 | } else { |
250 | - $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank"' . |
|
251 | - ' rel="noreferrer noopener">' .$this->getEntity() . '</a>'. |
|
252 | - ' – ' . $this->getSlogan(); |
|
250 | + $footer = '<a href="'.$this->getBaseUrl().'" target="_blank"'. |
|
251 | + ' rel="noreferrer noopener">'.$this->getEntity().'</a>'. |
|
252 | + ' – '.$this->getSlogan(); |
|
253 | 253 | } |
254 | 254 | |
255 | 255 | return $footer; |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | if ($this->themeExist('buildDocLinkToKey')) { |
278 | 278 | return $this->theme->buildDocLinkToKey($key); |
279 | 279 | } |
280 | - return $this->getDocBaseUrl() . '/server/' . $this->defaultDocVersion . '/go.php?to=' . $key; |
|
280 | + return $this->getDocBaseUrl().'/server/'.$this->defaultDocVersion.'/go.php?to='.$key; |
|
281 | 281 | } |
282 | 282 | |
283 | 283 | /** |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | } else { |
325 | 325 | $logo = \OC::$server->getURLGenerator()->imagePath('core', 'logo/logo.png'); |
326 | 326 | } |
327 | - return $logo . '?v=' . hash('sha1', implode('.', \OCP\Util::getVersion())); |
|
327 | + return $logo.'?v='.hash('sha1', implode('.', \OCP\Util::getVersion())); |
|
328 | 328 | } |
329 | 329 | |
330 | 330 | public function getTextColorPrimary() { |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | use OCP\Group\Events\GroupDeletedEvent; |
72 | 72 | use OCP\User\Events\UserDeletedEvent; |
73 | 73 | |
74 | -require_once __DIR__ . '/../../3rdparty/autoload.php'; |
|
74 | +require_once __DIR__.'/../../3rdparty/autoload.php'; |
|
75 | 75 | |
76 | 76 | /** |
77 | 77 | * @package OCA\Files_External\AppInfo |
@@ -93,10 +93,10 @@ discard block |
||
93 | 93 | } |
94 | 94 | |
95 | 95 | public function boot(IBootContext $context): void { |
96 | - $context->injectFn(function (IMountProviderCollection $mountProviderCollection, ConfigAdapter $configAdapter) { |
|
96 | + $context->injectFn(function(IMountProviderCollection $mountProviderCollection, ConfigAdapter $configAdapter) { |
|
97 | 97 | $mountProviderCollection->registerProvider($configAdapter); |
98 | 98 | }); |
99 | - \OCA\Files\App::getNavigationManager()->add(function () { |
|
99 | + \OCA\Files\App::getNavigationManager()->add(function() { |
|
100 | 100 | $l = \OC::$server->getL10N('files_external'); |
101 | 101 | return [ |
102 | 102 | 'id' => 'extstoragemounts', |
@@ -106,10 +106,10 @@ discard block |
||
106 | 106 | 'name' => $l->t('External storage'), |
107 | 107 | ]; |
108 | 108 | }); |
109 | - $context->injectFn(function (BackendService $backendService, UserPlaceholderHandler $userConfigHandler) { |
|
109 | + $context->injectFn(function(BackendService $backendService, UserPlaceholderHandler $userConfigHandler) { |
|
110 | 110 | $backendService->registerBackendProvider($this); |
111 | 111 | $backendService->registerAuthMechanismProvider($this); |
112 | - $backendService->registerConfigHandler('user', function () use ($userConfigHandler) { |
|
112 | + $backendService->registerConfigHandler('user', function() use ($userConfigHandler) { |
|
113 | 113 | return $userConfigHandler; |
114 | 114 | }); |
115 | 115 | }); |