@@ -44,15 +44,15 @@ discard block |
||
44 | 44 | protected function getAddressbookHomeForPrincipal($principal) { |
45 | 45 | if (strrpos($principal, 'principals/users', -strlen($principal)) !== false) { |
46 | 46 | list(, $principalId) = \Sabre\Uri\split($principal); |
47 | - return self::ADDRESSBOOK_ROOT . '/users/' . $principalId; |
|
47 | + return self::ADDRESSBOOK_ROOT.'/users/'.$principalId; |
|
48 | 48 | } |
49 | 49 | if (strrpos($principal, 'principals/groups', -strlen($principal)) !== false) { |
50 | 50 | list(, $principalId) = \Sabre\Uri\split($principal); |
51 | - return self::ADDRESSBOOK_ROOT . '/groups/' . $principalId; |
|
51 | + return self::ADDRESSBOOK_ROOT.'/groups/'.$principalId; |
|
52 | 52 | } |
53 | 53 | if (strrpos($principal, 'principals/system', -strlen($principal)) !== false) { |
54 | 54 | list(, $principalId) = \Sabre\Uri\split($principal); |
55 | - return self::ADDRESSBOOK_ROOT . '/system/' . $principalId; |
|
55 | + return self::ADDRESSBOOK_ROOT.'/system/'.$principalId; |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | if ($node instanceof AddressBook) { |
71 | 71 | |
72 | - $propFind->handle($ns . 'groups', function () use ($node) { |
|
72 | + $propFind->handle($ns.'groups', function() use ($node) { |
|
73 | 73 | return new Groups($node->getContactsGroups()); |
74 | 74 | }); |
75 | 75 | } |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $notification->setParsedSubject($l->t('Update to %1$s is available.', [$parameters['version']])); |
109 | 109 | |
110 | 110 | if ($this->isAdmin()) { |
111 | - $notification->setLink($this->url->linkToRouteAbsolute('settings.AdminSettings.index', ['section' => 'overview']) . '#version'); |
|
111 | + $notification->setLink($this->url->linkToRouteAbsolute('settings.AdminSettings.index', ['section' => 'overview']).'#version'); |
|
112 | 112 | } |
113 | 113 | } else { |
114 | 114 | $appInfo = $this->getAppInfo($notification->getObjectType()); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | ]); |
129 | 129 | |
130 | 130 | if ($this->isAdmin()) { |
131 | - $notification->setLink($this->url->linkToRouteAbsolute('settings.AppSettings.viewApps', ['category' => 'updates']) . '#app-' . $notification->getObjectType()); |
|
131 | + $notification->setLink($this->url->linkToRouteAbsolute('settings.AppSettings.viewApps', ['category' => 'updates']).'#app-'.$notification->getObjectType()); |
|
132 | 132 | } |
133 | 133 | } |
134 | 134 |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | throw new InvalidTokenException(); |
163 | 163 | } |
164 | 164 | |
165 | - if ((int)$token->getExpires() !== 0 && $token->getExpires() < $this->time->getTime()) { |
|
165 | + if ((int) $token->getExpires() !== 0 && $token->getExpires() < $this->time->getTime()) { |
|
166 | 166 | throw new ExpiredTokenException($token); |
167 | 167 | } |
168 | 168 | |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | throw new InvalidTokenException(); |
185 | 185 | } |
186 | 186 | |
187 | - if ((int)$token->getExpires() !== 0 && $token->getExpires() < $this->time->getTime()) { |
|
187 | + if ((int) $token->getExpires() !== 0 && $token->getExpires() < $this->time->getTime()) { |
|
188 | 188 | throw new ExpiredTokenException($token); |
189 | 189 | } |
190 | 190 | |
@@ -265,10 +265,10 @@ discard block |
||
265 | 265 | */ |
266 | 266 | public function invalidateOldTokens() { |
267 | 267 | $olderThan = $this->time->getTime() - (int) $this->config->getSystemValue('session_lifetime', 60 * 60 * 24); |
268 | - $this->logger->debug('Invalidating session tokens older than ' . date('c', $olderThan), ['app' => 'cron']); |
|
268 | + $this->logger->debug('Invalidating session tokens older than '.date('c', $olderThan), ['app' => 'cron']); |
|
269 | 269 | $this->mapper->invalidateOld($olderThan, IToken::DO_NOT_REMEMBER); |
270 | 270 | $rememberThreshold = $this->time->getTime() - (int) $this->config->getSystemValue('remember_login_cookie_lifetime', 60 * 60 * 24 * 15); |
271 | - $this->logger->debug('Invalidating remembered session tokens older than ' . date('c', $rememberThreshold), ['app' => 'cron']); |
|
271 | + $this->logger->debug('Invalidating remembered session tokens older than '.date('c', $rememberThreshold), ['app' => 'cron']); |
|
272 | 272 | $this->mapper->invalidateOld($rememberThreshold, IToken::REMEMBER); |
273 | 273 | } |
274 | 274 | |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | */ |
301 | 301 | private function hashToken(string $token): string { |
302 | 302 | $secret = $this->config->getSystemValue('secret'); |
303 | - return hash('sha512', $token . $secret); |
|
303 | + return hash('sha512', $token.$secret); |
|
304 | 304 | } |
305 | 305 | |
306 | 306 | /** |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | */ |
315 | 315 | private function encryptPassword(string $password, string $token): string { |
316 | 316 | $secret = $this->config->getSystemValue('secret'); |
317 | - return $this->crypto->encrypt($password, $token . $secret); |
|
317 | + return $this->crypto->encrypt($password, $token.$secret); |
|
318 | 318 | } |
319 | 319 | |
320 | 320 | /** |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | private function decryptPassword(string $password, string $token): string { |
331 | 331 | $secret = $this->config->getSystemValue('secret'); |
332 | 332 | try { |
333 | - return $this->crypto->decrypt($password, $token . $secret); |
|
333 | + return $this->crypto->decrypt($password, $token.$secret); |
|
334 | 334 | } catch (Exception $ex) { |
335 | 335 | // Delete the invalid token |
336 | 336 | $this->invalidateToken($token); |
@@ -99,9 +99,9 @@ |
||
99 | 99 | return; |
100 | 100 | } |
101 | 101 | |
102 | - $output->writeln($title . ":"); |
|
102 | + $output->writeln($title.":"); |
|
103 | 103 | foreach ($providers as $provider) { |
104 | - $output->writeln("- " . $provider); |
|
104 | + $output->writeln("- ".$provider); |
|
105 | 105 | } |
106 | 106 | } |
107 | 107 |
@@ -59,7 +59,7 @@ |
||
59 | 59 | $this->notificationManager = $notificationManager; |
60 | 60 | $this->jobList = $jobList; |
61 | 61 | |
62 | - $this->setInterval(60*60*24*14); |
|
62 | + $this->setInterval(60 * 60 * 24 * 14); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | protected function run($argument) { |
@@ -109,11 +109,11 @@ discard block |
||
109 | 109 | |
110 | 110 | try { |
111 | 111 | $comment = $this->commentsManager->get($id); |
112 | - if($comment->getObjectType() !== 'files') { |
|
112 | + if ($comment->getObjectType() !== 'files') { |
|
113 | 113 | return new NotFoundResponse(); |
114 | 114 | } |
115 | 115 | $userFolder = $this->rootFolder->getUserFolder($currentUser->getUID()); |
116 | - $files = $userFolder->getById((int)$comment->getObjectId()); |
|
116 | + $files = $userFolder->getById((int) $comment->getObjectId()); |
|
117 | 117 | |
118 | 118 | $this->markProcessed($comment, $currentUser); |
119 | 119 | |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | |
124 | 124 | $url = $this->urlGenerator->linkToRouteAbsolute( |
125 | 125 | 'files.viewcontroller.showFile', |
126 | - [ 'fileid' => $comment->getObjectId() ] |
|
126 | + ['fileid' => $comment->getObjectId()] |
|
127 | 127 | ); |
128 | 128 | |
129 | 129 | return new RedirectResponse($url); |
@@ -64,10 +64,10 @@ |
||
64 | 64 | public function setupDatabase($username) { |
65 | 65 | $datadir = $this->config->getValue( |
66 | 66 | 'datadirectory', |
67 | - \OC::$SERVERROOT . '/data' |
|
67 | + \OC::$SERVERROOT.'/data' |
|
68 | 68 | ); |
69 | 69 | |
70 | - $sqliteFile = $datadir . '/' . $this->dbName . 'db'; |
|
70 | + $sqliteFile = $datadir.'/'.$this->dbName.'db'; |
|
71 | 71 | if (file_exists($sqliteFile)) { |
72 | 72 | unlink($sqliteFile); |
73 | 73 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | if ($host === '') { |
141 | 141 | $additionalConnectionParams['dbname'] = $dbName; // use dbname as easy connect name |
142 | 142 | } else { |
143 | - $additionalConnectionParams['dbname'] = '//' . $host . (!empty($port) ? ":{$port}" : "") . '/' . $dbName; |
|
143 | + $additionalConnectionParams['dbname'] = '//'.$host.(!empty($port) ? ":{$port}" : "").'/'.$dbName; |
|
144 | 144 | } |
145 | 145 | unset($additionalConnectionParams['host']); |
146 | 146 | break; |
@@ -195,8 +195,8 @@ discard block |
||
195 | 195 | $name = $this->config->getValue('dbname', self::DEFAULT_DBNAME); |
196 | 196 | |
197 | 197 | if ($this->normalizeType($type) === 'sqlite3') { |
198 | - $dataDir = $this->config->getValue("datadirectory", \OC::$SERVERROOT . '/data'); |
|
199 | - $connectionParams['path'] = $dataDir . '/' . $name . '.db'; |
|
198 | + $dataDir = $this->config->getValue("datadirectory", \OC::$SERVERROOT.'/data'); |
|
199 | + $connectionParams['path'] = $dataDir.'/'.$name.'.db'; |
|
200 | 200 | } else { |
201 | 201 | $host = $this->config->getValue('dbhost', ''); |
202 | 202 | $connectionParams = array_merge($connectionParams, $this->splitHostFromPortAndSocket($host)); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | $schema = $schemaClosure(); |
43 | 43 | |
44 | 44 | $table = $schema->getTable('authtoken'); |
45 | - $table->addColumn('password_invalid','boolean', [ |
|
45 | + $table->addColumn('password_invalid', 'boolean', [ |
|
46 | 46 | 'notnull' => true, |
47 | 47 | 'default' => false, |
48 | 48 | ]); |