@@ -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 | } |
@@ -197,7 +197,7 @@ |
||
197 | 197 | } catch (NotFoundException $e) { |
198 | 198 | return new DataResponse( |
199 | 199 | [ |
200 | - 'message' => (string)$this->l10n->t('Storage with ID "%d" not found', [$id]) |
|
200 | + 'message' => (string) $this->l10n->t('Storage with ID "%d" not found', [$id]) |
|
201 | 201 | ], |
202 | 202 | Http::STATUS_NOT_FOUND |
203 | 203 | ); |
@@ -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 | /** |
@@ -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 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | } |
62 | 62 | |
63 | 63 | protected function execute(InputInterface $input, OutputInterface $output) { |
64 | - if ($input->getOption('shipped') === 'true' || $input->getOption('shipped') === 'false'){ |
|
64 | + if ($input->getOption('shipped') === 'true' || $input->getOption('shipped') === 'false') { |
|
65 | 65 | $shippedFilter = $input->getOption('shipped') === 'true'; |
66 | 66 | } else { |
67 | 67 | $shippedFilter = null; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | //sort enabled apps above disabled apps |
75 | 75 | foreach ($apps as $app) { |
76 | - if ($shippedFilter !== null && $this->manager->isShipped($app) !== $shippedFilter){ |
|
76 | + if ($shippedFilter !== null && $this->manager->isShipped($app) !== $shippedFilter) { |
|
77 | 77 | continue; |
78 | 78 | } |
79 | 79 | if ($this->manager->isInstalled($app)) { |
@@ -87,10 +87,10 @@ discard block |
||
87 | 87 | $result = $query->execute(); |
88 | 88 | |
89 | 89 | if ($result) { |
90 | - return (int)$this->connection->lastInsertId('*PREFIX*'.$this->dbTable); |
|
90 | + return (int) $this->connection->lastInsertId('*PREFIX*'.$this->dbTable); |
|
91 | 91 | } |
92 | 92 | |
93 | - $message = 'Internal failure, Could not add trusted server: ' . $url; |
|
93 | + $message = 'Internal failure, Could not add trusted server: '.$url; |
|
94 | 94 | $message_t = $this->IL10N->t('Could not add server'); |
95 | 95 | throw new HintException($message, $message_t); |
96 | 96 | } |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $result = $query->execute()->fetchAll(); |
125 | 125 | |
126 | 126 | if (empty($result)) { |
127 | - throw new \Exception('No Server found with ID: ' . $id); |
|
127 | + throw new \Exception('No Server found with ID: '.$id); |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | return $result[0]; |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $statement->closeCursor(); |
202 | 202 | |
203 | 203 | if (!isset($result['token'])) { |
204 | - throw new \Exception('No token found for: ' . $url); |
|
204 | + throw new \Exception('No token found for: '.$url); |
|
205 | 205 | } |
206 | 206 | |
207 | 207 | return $result['token']; |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | $statement = $query->execute(); |
279 | 279 | $result = $statement->fetch(); |
280 | 280 | $statement->closeCursor(); |
281 | - return (int)$result['status']; |
|
281 | + return (int) $result['status']; |
|
282 | 282 | } |
283 | 283 | |
284 | 284 | /** |
@@ -150,7 +150,7 @@ |
||
150 | 150 | public function actionInclude($file) { |
151 | 151 | $function = function($param) use ($file) { |
152 | 152 | unset($param["_route"]); |
153 | - $_GET=array_merge($_GET, $param); |
|
153 | + $_GET = array_merge($_GET, $param); |
|
154 | 154 | unset($param); |
155 | 155 | require_once "$file"; |
156 | 156 | } ; |