@@ -128,32 +128,32 @@ discard block |
||
128 | 128 | $authBackend = $this->backendService->getAuthMechanism($authIdentifier); |
129 | 129 | |
130 | 130 | if (!Filesystem::isValidPath($mountPoint)) { |
131 | - $output->writeln('<error>Invalid mountpoint "' . $mountPoint . '"</error>'); |
|
131 | + $output->writeln('<error>Invalid mountpoint "'.$mountPoint.'"</error>'); |
|
132 | 132 | return 1; |
133 | 133 | } |
134 | 134 | if (is_null($storageBackend)) { |
135 | - $output->writeln('<error>Storage backend with identifier "' . $storageIdentifier . '" not found (see `occ files_external:backends` for possible values)</error>'); |
|
135 | + $output->writeln('<error>Storage backend with identifier "'.$storageIdentifier.'" not found (see `occ files_external:backends` for possible values)</error>'); |
|
136 | 136 | return 404; |
137 | 137 | } |
138 | 138 | if (is_null($authBackend)) { |
139 | - $output->writeln('<error>Authentication backend with identifier "' . $authIdentifier . '" not found (see `occ files_external:backends` for possible values)</error>'); |
|
139 | + $output->writeln('<error>Authentication backend with identifier "'.$authIdentifier.'" not found (see `occ files_external:backends` for possible values)</error>'); |
|
140 | 140 | return 404; |
141 | 141 | } |
142 | 142 | $supportedSchemes = array_keys($storageBackend->getAuthSchemes()); |
143 | 143 | if (!in_array($authBackend->getScheme(), $supportedSchemes)) { |
144 | - $output->writeln('<error>Authentication backend "' . $authIdentifier . '" not valid for storage backend "' . $storageIdentifier . '" (see `occ files_external:backends storage ' . $storageIdentifier . '` for possible values)</error>'); |
|
144 | + $output->writeln('<error>Authentication backend "'.$authIdentifier.'" not valid for storage backend "'.$storageIdentifier.'" (see `occ files_external:backends storage '.$storageIdentifier.'` for possible values)</error>'); |
|
145 | 145 | return 1; |
146 | 146 | } |
147 | 147 | |
148 | 148 | $config = []; |
149 | 149 | foreach ($configInput as $configOption) { |
150 | 150 | if (!strpos($configOption, '=')) { |
151 | - $output->writeln('<error>Invalid mount configuration option "' . $configOption . '"</error>'); |
|
151 | + $output->writeln('<error>Invalid mount configuration option "'.$configOption.'"</error>'); |
|
152 | 152 | return 1; |
153 | 153 | } |
154 | 154 | list($key, $value) = explode('=', $configOption, 2); |
155 | 155 | if (!$this->validateParam($key, $value, $storageBackend, $authBackend)) { |
156 | - $output->writeln('<error>Unknown configuration for backends "' . $key . '"</error>'); |
|
156 | + $output->writeln('<error>Unknown configuration for backends "'.$key.'"</error>'); |
|
157 | 157 | return 1; |
158 | 158 | } |
159 | 159 | $config[$key] = $value; |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | |
168 | 168 | if ($user) { |
169 | 169 | if (!$this->userManager->userExists($user)) { |
170 | - $output->writeln('<error>User "' . $user . '" not found</error>'); |
|
170 | + $output->writeln('<error>User "'.$user.'" not found</error>'); |
|
171 | 171 | return 1; |
172 | 172 | } |
173 | 173 | $mount->setApplicableUsers([$user]); |
@@ -178,9 +178,9 @@ discard block |
||
178 | 178 | } else { |
179 | 179 | $this->getStorageService($user)->addStorage($mount); |
180 | 180 | if ($input->getOption('output') === self::OUTPUT_FORMAT_PLAIN) { |
181 | - $output->writeln('<info>Storage created with id ' . $mount->getId() . '</info>'); |
|
181 | + $output->writeln('<info>Storage created with id '.$mount->getId().'</info>'); |
|
182 | 182 | } else { |
183 | - $output->writeln((string)$mount->getId()); |
|
183 | + $output->writeln((string) $mount->getId()); |
|
184 | 184 | } |
185 | 185 | } |
186 | 186 | return 0; |
@@ -50,7 +50,7 @@ |
||
50 | 50 | public function __construct($arguments) { |
51 | 51 | $this->user = $arguments['user']; |
52 | 52 | $datadir = $this->user->getHome(); |
53 | - $this->id = 'home::' . $this->user->getUID(); |
|
53 | + $this->id = 'home::'.$this->user->getUID(); |
|
54 | 54 | |
55 | 55 | parent::__construct(['datadir' => $datadir]); |
56 | 56 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | public function castColumn($column, $type) { |
148 | 148 | if ($type === IQueryBuilder::PARAM_STR) { |
149 | 149 | $column = $this->helper->quoteColumnName($column); |
150 | - return new QueryFunction('to_char(' . $column . ')'); |
|
150 | + return new QueryFunction('to_char('.$column.')'); |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | return parent::castColumn($column, $type); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | * @inheritdoc |
158 | 158 | */ |
159 | 159 | public function like($x, $y, $type = null) { |
160 | - return parent::like($x, $y, $type) . " ESCAPE '\\'"; |
|
160 | + return parent::like($x, $y, $type)." ESCAPE '\\'"; |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |
@@ -166,6 +166,6 @@ discard block |
||
166 | 166 | public function iLike($x, $y, $type = null) { |
167 | 167 | $x = $this->helper->quoteColumnName($x); |
168 | 168 | $y = $this->helper->quoteColumnName($y); |
169 | - return new QueryFunction('REGEXP_LIKE(' . $x . ', \'^\' || REPLACE(REPLACE(' . $y . ', \'%\', \'.*\'), \'_\', \'.\') || \'$\', \'i\')'); |
|
169 | + return new QueryFunction('REGEXP_LIKE('.$x.', \'^\' || REPLACE(REPLACE('.$y.', \'%\', \'.*\'), \'_\', \'.\') || \'$\', \'i\')'); |
|
170 | 170 | } |
171 | 171 | } |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | |
234 | 234 | $schemaManager = new \OC\DB\MDB2SchemaManager($toDB); |
235 | 235 | $apps = $input->getOption('all-apps') ? \OC_App::getAllApps() : \OC_App::getEnabledApps(); |
236 | - foreach($apps as $app) { |
|
236 | + foreach ($apps as $app) { |
|
237 | 237 | if (file_exists(\OC_App::getAppPath($app).'/appinfo/database.xml')) { |
238 | 238 | $schemaManager->createDbFromStructure(\OC_App::getAppPath($app).'/appinfo/database.xml'); |
239 | 239 | } else { |
@@ -269,13 +269,13 @@ discard block |
||
269 | 269 | if (!empty($toTables)) { |
270 | 270 | $output->writeln('<info>Clearing schema in new database</info>'); |
271 | 271 | } |
272 | - foreach($toTables as $table) { |
|
272 | + foreach ($toTables as $table) { |
|
273 | 273 | $db->getSchemaManager()->dropTable($table); |
274 | 274 | } |
275 | 275 | } |
276 | 276 | |
277 | 277 | protected function getTables(Connection $db) { |
278 | - $filterExpression = '/^' . preg_quote($this->config->getSystemValue('dbtableprefix', 'oc_')) . '/'; |
|
278 | + $filterExpression = '/^'.preg_quote($this->config->getSystemValue('dbtableprefix', 'oc_')).'/'; |
|
279 | 279 | $db->getConfiguration()-> |
280 | 280 | setFilterSchemaAssetsExpression($filterExpression); |
281 | 281 | return $db->getSchemaManager()->listTableNames(); |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | * @suppress SqlInjectionChecker |
291 | 291 | */ |
292 | 292 | protected function copyTable(Connection $fromDB, Connection $toDB, Table $table, InputInterface $input, OutputInterface $output) { |
293 | - if ($table->getName() === $toDB->getPrefix() . 'migrations') { |
|
293 | + if ($table->getName() === $toDB->getPrefix().'migrations') { |
|
294 | 294 | $output->writeln('<comment>Skipping migrations table because it was already filled by running the migrations</comment>'); |
295 | 295 | return; |
296 | 296 | } |
@@ -305,9 +305,9 @@ discard block |
||
305 | 305 | $count = $result->fetchColumn(); |
306 | 306 | $result->closeCursor(); |
307 | 307 | |
308 | - $numChunks = ceil($count/$chunkSize); |
|
308 | + $numChunks = ceil($count / $chunkSize); |
|
309 | 309 | if ($numChunks > 1) { |
310 | - $output->writeln('chunked query, ' . $numChunks . ' chunks'); |
|
310 | + $output->writeln('chunked query, '.$numChunks.' chunks'); |
|
311 | 311 | } |
312 | 312 | |
313 | 313 | $progress = new ProgressBar($output, $count); |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | |
395 | 395 | try { |
396 | 396 | // copy table rows |
397 | - foreach($tables as $table) { |
|
397 | + foreach ($tables as $table) { |
|
398 | 398 | $output->writeln($table); |
399 | 399 | $this->copyTable($fromDB, $toDB, $schema->getTable($table), $input, $output); |
400 | 400 | } |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | } |
405 | 405 | // save new database config |
406 | 406 | $this->saveDBInfo($input); |
407 | - } catch(\Exception $e) { |
|
407 | + } catch (\Exception $e) { |
|
408 | 408 | $this->config->setSystemValue('maintenance', false); |
409 | 409 | throw $e; |
410 | 410 | } |
@@ -56,19 +56,19 @@ |
||
56 | 56 | $translations = $this->l10n->getTranslations(); |
57 | 57 | |
58 | 58 | $text = $this->text; |
59 | - if(array_key_exists($this->text, $translations)) { |
|
60 | - if(is_array($translations[$this->text])) { |
|
59 | + if (array_key_exists($this->text, $translations)) { |
|
60 | + if (is_array($translations[$this->text])) { |
|
61 | 61 | $fn = $this->l10n->getPluralFormFunction(); |
62 | 62 | $id = $fn($this->count); |
63 | 63 | $text = $translations[$this->text][$id]; |
64 | 64 | } |
65 | - else{ |
|
65 | + else { |
|
66 | 66 | $text = $translations[$this->text]; |
67 | 67 | } |
68 | 68 | } |
69 | 69 | |
70 | 70 | // Replace %n first (won't interfere with vsprintf) |
71 | - $text = str_replace('%n', (string)$this->count, $text); |
|
71 | + $text = str_replace('%n', (string) $this->count, $text); |
|
72 | 72 | return vsprintf($text, $this->parameters); |
73 | 73 | } |
74 | 74 |
@@ -27,7 +27,7 @@ |
||
27 | 27 | * {@inheritDoc} |
28 | 28 | */ |
29 | 29 | public function getName() { |
30 | - return (string)$this->l10n->t('Education Edition'); |
|
30 | + return (string) $this->l10n->t('Education Edition'); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | /** |
52 | 52 | * Controllers |
53 | 53 | */ |
54 | - $container->registerService('ShareController', function (SimpleContainer $c) use ($server) { |
|
54 | + $container->registerService('ShareController', function(SimpleContainer $c) use ($server) { |
|
55 | 55 | $federatedSharingApp = new \OCA\FederatedFileSharing\AppInfo\Application(); |
56 | 56 | return new ShareController( |
57 | 57 | $c->query('AppName'), |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $server->query(Defaults::class) |
72 | 72 | ); |
73 | 73 | }); |
74 | - $container->registerService('ExternalSharesController', function (SimpleContainer $c) { |
|
74 | + $container->registerService('ExternalSharesController', function(SimpleContainer $c) { |
|
75 | 75 | return new ExternalSharesController( |
76 | 76 | $c->query('AppName'), |
77 | 77 | $c->query('Request'), |
@@ -83,13 +83,13 @@ discard block |
||
83 | 83 | /** |
84 | 84 | * Core class wrappers |
85 | 85 | */ |
86 | - $container->registerService('HttpClientService', function (SimpleContainer $c) use ($server) { |
|
86 | + $container->registerService('HttpClientService', function(SimpleContainer $c) use ($server) { |
|
87 | 87 | return $server->getHTTPClientService(); |
88 | 88 | }); |
89 | - $container->registerService(ICloudIdManager::class, function (SimpleContainer $c) use ($server) { |
|
89 | + $container->registerService(ICloudIdManager::class, function(SimpleContainer $c) use ($server) { |
|
90 | 90 | return $server->getCloudIdManager(); |
91 | 91 | }); |
92 | - $container->registerService('ExternalManager', function (SimpleContainer $c) use ($server) { |
|
92 | + $container->registerService('ExternalManager', function(SimpleContainer $c) use ($server) { |
|
93 | 93 | $user = $server->getUserSession()->getUser(); |
94 | 94 | $uid = $user ? $user->getUID() : null; |
95 | 95 | return new \OCA\Files_Sharing\External\Manager( |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | /** |
108 | 108 | * Middleware |
109 | 109 | */ |
110 | - $container->registerService('SharingCheckMiddleware', function (SimpleContainer $c) use ($server) { |
|
110 | + $container->registerService('SharingCheckMiddleware', function(SimpleContainer $c) use ($server) { |
|
111 | 111 | return new SharingCheckMiddleware( |
112 | 112 | $c->query('AppName'), |
113 | 113 | $server->getConfig(), |
@@ -118,14 +118,14 @@ discard block |
||
118 | 118 | ); |
119 | 119 | }); |
120 | 120 | |
121 | - $container->registerService('OCSShareAPIMiddleware', function (SimpleContainer $c) use ($server) { |
|
121 | + $container->registerService('OCSShareAPIMiddleware', function(SimpleContainer $c) use ($server) { |
|
122 | 122 | return new OCSShareAPIMiddleware( |
123 | 123 | $server->getShareManager(), |
124 | 124 | $server->getL10N($c->query('AppName')) |
125 | 125 | ); |
126 | 126 | }); |
127 | 127 | |
128 | - $container->registerService(ShareInfoMiddleware::class, function () use ($server) { |
|
128 | + $container->registerService(ShareInfoMiddleware::class, function() use ($server) { |
|
129 | 129 | return new ShareInfoMiddleware( |
130 | 130 | $server->getShareManager() |
131 | 131 | ); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $container->registerMiddleWare('OCSShareAPIMiddleware'); |
137 | 137 | $container->registerMiddleWare(ShareInfoMiddleware::class); |
138 | 138 | |
139 | - $container->registerService('MountProvider', function (IContainer $c) { |
|
139 | + $container->registerService('MountProvider', function(IContainer $c) { |
|
140 | 140 | /** @var \OCP\IServerContainer $server */ |
141 | 141 | $server = $c->query('ServerContainer'); |
142 | 142 | return new MountProvider( |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | ); |
147 | 147 | }); |
148 | 148 | |
149 | - $container->registerService('ExternalMountProvider', function (IContainer $c) { |
|
149 | + $container->registerService('ExternalMountProvider', function(IContainer $c) { |
|
150 | 150 | /** @var \OCP\IServerContainer $server */ |
151 | 151 | $server = $c->query('ServerContainer'); |
152 | 152 | return new \OCA\Files_Sharing\External\MountProvider( |
@@ -3,11 +3,11 @@ |
||
3 | 3 | /** @var $l \OCP\IL10N */ |
4 | 4 | /** @var $theme OCP\Defaults */ |
5 | 5 | // @codeCoverageIgnoreStart |
6 | -if(!isset($_)) {//standalone page is not supported anymore - redirect to / |
|
6 | +if (!isset($_)) {//standalone page is not supported anymore - redirect to / |
|
7 | 7 | require_once '../../lib/base.php'; |
8 | 8 | |
9 | 9 | $urlGenerator = \OC::$server->getURLGenerator(); |
10 | - header('Location: ' . $urlGenerator->getAbsoluteURL('/')); |
|
10 | + header('Location: '.$urlGenerator->getAbsoluteURL('/')); |
|
11 | 11 | exit; |
12 | 12 | } |
13 | 13 | // @codeCoverageIgnoreEnd |
@@ -25,6 +25,6 @@ |
||
25 | 25 | |
26 | 26 | class PgSqlFunctionBuilder extends FunctionBuilder { |
27 | 27 | public function concat($x, $y) { |
28 | - return new QueryFunction('(' . $this->helper->quoteColumnName($x) . ' || ' . $this->helper->quoteColumnName($y) . ')'); |
|
28 | + return new QueryFunction('('.$this->helper->quoteColumnName($x).' || '.$this->helper->quoteColumnName($y).')'); |
|
29 | 29 | } |
30 | 30 | } |