@@ -74,7 +74,7 @@ |
||
74 | 74 | * @since 5.0.0 |
75 | 75 | */ |
76 | 76 | public static function setExecutionType($type) { |
77 | - if( !in_array( $type, array('none', 'ajax', 'webcron', 'cron'))) { |
|
77 | + if (!in_array($type, array('none', 'ajax', 'webcron', 'cron'))) { |
|
78 | 78 | return false; |
79 | 79 | } |
80 | 80 | \OC::$server->getConfig()->setAppValue('core', 'backgroundjobs_mode', $type); |
@@ -46,7 +46,7 @@ |
||
46 | 46 | /** |
47 | 47 | * @since 9.2.0 |
48 | 48 | */ |
49 | - const EVENT = self::class . ':' . 'PreviewRequested'; |
|
49 | + const EVENT = self::class.':'.'PreviewRequested'; |
|
50 | 50 | |
51 | 51 | const MODE_FILL = 'fill'; |
52 | 52 | const MODE_COVER = 'cover'; |
@@ -159,7 +159,7 @@ |
||
159 | 159 | } |
160 | 160 | } |
161 | 161 | |
162 | - return array_filter($providers, function ($provider) use ($user) { |
|
162 | + return array_filter($providers, function($provider) use ($user) { |
|
163 | 163 | /* @var $provider IProvider */ |
164 | 164 | return $provider->isTwoFactorAuthEnabledForUser($user); |
165 | 165 | }); |
@@ -129,7 +129,7 @@ |
||
129 | 129 | $data = $result->fetchAll(); |
130 | 130 | $result->closeCursor(); |
131 | 131 | |
132 | - $entities = array_map(function ($row) { |
|
132 | + $entities = array_map(function($row) { |
|
133 | 133 | return DefaultToken::fromRow($row); |
134 | 134 | }, $data); |
135 | 135 |
@@ -170,7 +170,7 @@ |
||
170 | 170 | if (is_array($scope)) { |
171 | 171 | parent::setScope(json_encode($scope)); |
172 | 172 | } else { |
173 | - parent::setScope((string)$scope); |
|
173 | + parent::setScope((string) $scope); |
|
174 | 174 | } |
175 | 175 | } |
176 | 176 | } |
@@ -253,10 +253,10 @@ discard block |
||
253 | 253 | */ |
254 | 254 | public function invalidateOldTokens() { |
255 | 255 | $olderThan = $this->time->getTime() - (int) $this->config->getSystemValue('session_lifetime', 60 * 60 * 24); |
256 | - $this->logger->debug('Invalidating session tokens older than ' . date('c', $olderThan)); |
|
256 | + $this->logger->debug('Invalidating session tokens older than '.date('c', $olderThan)); |
|
257 | 257 | $this->mapper->invalidateOld($olderThan, IToken::DO_NOT_REMEMBER); |
258 | 258 | $rememberThreshold = $this->time->getTime() - (int) $this->config->getSystemValue('remember_login_cookie_lifetime', 60 * 60 * 24 * 15); |
259 | - $this->logger->debug('Invalidating remembered session tokens older than ' . date('c', $rememberThreshold)); |
|
259 | + $this->logger->debug('Invalidating remembered session tokens older than '.date('c', $rememberThreshold)); |
|
260 | 260 | $this->mapper->invalidateOld($rememberThreshold, IToken::REMEMBER); |
261 | 261 | } |
262 | 262 | |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | */ |
267 | 267 | private function hashToken($token) { |
268 | 268 | $secret = $this->config->getSystemValue('secret'); |
269 | - return hash('sha512', $token . $secret); |
|
269 | + return hash('sha512', $token.$secret); |
|
270 | 270 | } |
271 | 271 | |
272 | 272 | /** |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | */ |
281 | 281 | private function encryptPassword($password, $token) { |
282 | 282 | $secret = $this->config->getSystemValue('secret'); |
283 | - return $this->crypto->encrypt($password, $token . $secret); |
|
283 | + return $this->crypto->encrypt($password, $token.$secret); |
|
284 | 284 | } |
285 | 285 | |
286 | 286 | /** |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | private function decryptPassword($password, $token) { |
297 | 297 | $secret = $this->config->getSystemValue('secret'); |
298 | 298 | try { |
299 | - return $this->crypto->decrypt($password, $token . $secret); |
|
299 | + return $this->crypto->decrypt($password, $token.$secret); |
|
300 | 300 | } catch (Exception $ex) { |
301 | 301 | // Delete the invalid token |
302 | 302 | $this->invalidateToken($token); |
@@ -188,7 +188,7 @@ |
||
188 | 188 | if (\OC_Helper::is_function_enabled('exec')) { |
189 | 189 | $os = strtolower(php_uname('s')); |
190 | 190 | if (strpos($os, 'linux') !== false) { |
191 | - return $this->exec('stat -c %Y ' . escapeshellarg($fullPath)); |
|
191 | + return $this->exec('stat -c %Y '.escapeshellarg($fullPath)); |
|
192 | 192 | } |
193 | 193 | } |
194 | 194 |
@@ -103,6 +103,6 @@ |
||
103 | 103 | $time = new \DateTime('now', $timeZone); |
104 | 104 | $timestampInfo = $time->format($this->config->getSystemValue('logdateformat', \DateTime::ATOM)); |
105 | 105 | |
106 | - return $timestampInfo . ' ' . $this->formatter->format($message); |
|
106 | + return $timestampInfo.' '.$this->formatter->format($message); |
|
107 | 107 | } |
108 | 108 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); |
92 | 92 | } |
93 | 93 | try { |
94 | - require_once __DIR__ . '/../../../core/register_command.php'; |
|
94 | + require_once __DIR__.'/../../../core/register_command.php'; |
|
95 | 95 | if ($this->config->getSystemValue('installed', false)) { |
96 | 96 | if (\OCP\Util::needUpgrade()) { |
97 | 97 | throw new NeedsUpdateException(); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | } |
114 | 114 | // load from register_command.php |
115 | 115 | \OC_App::registerAutoloading($app, $appPath); |
116 | - $file = $appPath . '/appinfo/register_command.php'; |
|
116 | + $file = $appPath.'/appinfo/register_command.php'; |
|
117 | 117 | if (file_exists($file)) { |
118 | 118 | try { |
119 | 119 | require $file; |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | } else if ($input->getArgument('command') !== '_completion') { |
127 | 127 | $output->writeln("Nextcloud is not installed - only a limited number of commands are available"); |
128 | 128 | } |
129 | - } catch(NeedsUpdateException $e) { |
|
129 | + } catch (NeedsUpdateException $e) { |
|
130 | 130 | if ($input->getArgument('command') !== '_completion') { |
131 | 131 | $output->writeln("Nextcloud or one of the apps require upgrade - only a limited number of commands are available"); |
132 | 132 | $output->writeln("You may use your browser or the occ upgrade command to do the upgrade"); |
@@ -137,8 +137,8 @@ discard block |
||
137 | 137 | $errors = \OC_Util::checkServer(\OC::$server->getConfig()); |
138 | 138 | if (!empty($errors)) { |
139 | 139 | foreach ($errors as $error) { |
140 | - $output->writeln((string)$error['error']); |
|
141 | - $output->writeln((string)$error['hint']); |
|
140 | + $output->writeln((string) $error['error']); |
|
141 | + $output->writeln((string) $error['hint']); |
|
142 | 142 | $output->writeln(''); |
143 | 143 | } |
144 | 144 | throw new \Exception("Environment not properly prepared."); |