@@ -217,7 +217,7 @@ |
||
217 | 217 | // interpolate $message as defined in PSR-3 |
218 | 218 | $replace = []; |
219 | 219 | foreach ($context as $key => $val) { |
220 | - $replace['{' . $key . '}'] = $val; |
|
220 | + $replace['{'.$key.'}'] = $val; |
|
221 | 221 | } |
222 | 222 | $message = strtr($message, $replace); |
223 | 223 |
@@ -62,7 +62,7 @@ |
||
62 | 62 | */ |
63 | 63 | public function addEntityCollection(string $name, \Closure $entityExistsFunction) { |
64 | 64 | if (isset($this->collections[$name])) { |
65 | - throw new \OutOfBoundsException('Duplicate entity name "' . $name . '"'); |
|
65 | + throw new \OutOfBoundsException('Duplicate entity name "'.$name.'"'); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | $this->collections[$name] = $entityExistsFunction; |
@@ -63,5 +63,5 @@ |
||
63 | 63 | * @return bool Whether $hash is a valid hash of $message |
64 | 64 | * @since 8.0.0 |
65 | 65 | */ |
66 | - public function verify(string $message, string $hash, &$newHash = null): bool ; |
|
66 | + public function verify(string $message, string $hash, &$newHash = null): bool; |
|
67 | 67 | } |
@@ -67,6 +67,6 @@ |
||
67 | 67 | $implements |= Backend::COUNT_USERS; |
68 | 68 | } |
69 | 69 | |
70 | - return (bool)($actions & $implements); |
|
70 | + return (bool) ($actions & $implements); |
|
71 | 71 | } |
72 | 72 | } |
@@ -62,6 +62,6 @@ |
||
62 | 62 | $implements |= GroupInterface::REMOVE_FROM_GOUP; |
63 | 63 | } |
64 | 64 | |
65 | - return (bool)($actions & $implements); |
|
65 | + return (bool) ($actions & $implements); |
|
66 | 66 | } |
67 | 67 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | try { |
66 | 66 | return new \DateTimeZone($timeZone); |
67 | 67 | } catch (\Exception $e) { |
68 | - \OCP\Util::writeLog('datetimezone', 'Failed to created DateTimeZone "' . $timeZone . "'", ILogger::DEBUG); |
|
68 | + \OCP\Util::writeLog('datetimezone', 'Failed to created DateTimeZone "'.$timeZone."'", ILogger::DEBUG); |
|
69 | 69 | return new \DateTimeZone($this->getDefaultTimeZone()); |
70 | 70 | } |
71 | 71 | } |
@@ -86,9 +86,9 @@ discard block |
||
86 | 86 | // so a positive offset means negative timeZone |
87 | 87 | // and the other way around. |
88 | 88 | if ($offset > 0) { |
89 | - $timeZone = 'Etc/GMT-' . $offset; |
|
89 | + $timeZone = 'Etc/GMT-'.$offset; |
|
90 | 90 | } else { |
91 | - $timeZone = 'Etc/GMT+' . abs($offset); |
|
91 | + $timeZone = 'Etc/GMT+'.abs($offset); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | return new \DateTimeZone($timeZone); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | } |
111 | 111 | |
112 | 112 | // No timezone found, fallback to UTC |
113 | - \OCP\Util::writeLog('datetimezone', 'Failed to find DateTimeZone for offset "' . $offset . "'", ILogger::DEBUG); |
|
113 | + \OCP\Util::writeLog('datetimezone', 'Failed to find DateTimeZone for offset "'.$offset."'", ILogger::DEBUG); |
|
114 | 114 | return new \DateTimeZone($this->getDefaultTimeZone()); |
115 | 115 | } |
116 | 116 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | */ |
21 | 21 | |
22 | 22 | |
23 | -require_once __DIR__ . '/../lib/base.php'; |
|
23 | +require_once __DIR__.'/../lib/base.php'; |
|
24 | 24 | |
25 | 25 | header('Content-Type: application/json'); |
26 | 26 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | */ |
33 | 33 | public function __construct($providerId) { |
34 | 34 | $l = \OC::$server->getL10N('federation'); |
35 | - $message = 'Cloud Federation Provider with ID: "' . $providerId . '" does not exist.'; |
|
35 | + $message = 'Cloud Federation Provider with ID: "'.$providerId.'" does not exist.'; |
|
36 | 36 | $hint = $l->t('Cloud Federation Provider with ID: "%s" does not exist.', [$providerId]); |
37 | 37 | parent::__construct($message, $hint); |
38 | 38 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $appName = $input->getArgument('app'); |
114 | 114 | $version = $input->getArgument('version'); |
115 | 115 | |
116 | - if (!preg_match('/^\d{1,16}$/',$version)) { |
|
116 | + if (!preg_match('/^\d{1,16}$/', $version)) { |
|
117 | 117 | $output->writeln('<error>The given version is invalid. Only 0-9 are allowed (max. 16 digits)</error>'); |
118 | 118 | return 1; |
119 | 119 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $ms = new MigrationService($appName, $this->connection, new ConsoleOutput($output)); |
122 | 122 | |
123 | 123 | $date = date('YmdHis'); |
124 | - $path = $this->generateMigration($ms, 'Version' . $version . 'Date' . $date); |
|
124 | + $path = $this->generateMigration($ms, 'Version'.$version.'Date'.$date); |
|
125 | 125 | |
126 | 126 | $output->writeln("New migration class has been generated to <info>$path</info>"); |
127 | 127 | return 0; |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $appName = $context->getWordAtIndex($context->getWordIndex() - 1); |
152 | 152 | |
153 | 153 | $version = explode('.', $this->appManager->getAppVersion($appName)); |
154 | - return [$version[0] . sprintf('%1$03d', $version[1])]; |
|
154 | + return [$version[0].sprintf('%1$03d', $version[1])]; |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | return []; |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | */ |
166 | 166 | protected function generateMigration(MigrationService $ms, $className, $schemaBody = '') { |
167 | 167 | if ($schemaBody === '') { |
168 | - $schemaBody = "\t\t" . 'return null;'; |
|
168 | + $schemaBody = "\t\t".'return null;'; |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | $dir = $ms->getMigrationsDirectory(); |
184 | 184 | |
185 | 185 | $this->ensureMigrationDirExists($dir); |
186 | - $path = $dir . '/' . $className . '.php'; |
|
186 | + $path = $dir.'/'.$className.'.php'; |
|
187 | 187 | |
188 | 188 | if (file_put_contents($path, $code) === false) { |
189 | 189 | throw new RuntimeException('Failed to generate new migration step.'); |