@@ -90,8 +90,8 @@ discard block |
||
90 | 90 | * @return string short footer |
91 | 91 | */ |
92 | 92 | public function getShortFooter() { |
93 | - $footer = '© ' . date('Y') . ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $this->getEntity() . '</a>' . |
|
94 | - '<br/>' . $this->getSlogan(); |
|
93 | + $footer = '© '.date('Y').' <a href="'.$this->getBaseUrl().'" target="_blank">'.$this->getEntity().'</a>'. |
|
94 | + '<br/>'.$this->getSlogan(); |
|
95 | 95 | |
96 | 96 | return $footer; |
97 | 97 | } |
@@ -101,8 +101,8 @@ discard block |
||
101 | 101 | * @return string long footer |
102 | 102 | */ |
103 | 103 | public function getLongFooter() { |
104 | - $footer = '© ' . date('Y') . ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $this->getEntity() . '</a>' . |
|
105 | - '<br/>' . $this->getSlogan(); |
|
104 | + $footer = '© '.date('Y').' <a href="'.$this->getBaseUrl().'" target="_blank">'.$this->getEntity().'</a>'. |
|
105 | + '<br/>'.$this->getSlogan(); |
|
106 | 106 | |
107 | 107 | return $footer; |
108 | 108 | } |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | * @return string documentation link |
113 | 113 | */ |
114 | 114 | public function buildDocLinkToKey($key) { |
115 | - return $this->getDocBaseUrl() . '/server/15/go.php?to=' . $key; |
|
115 | + return $this->getDocBaseUrl().'/server/15/go.php?to='.$key; |
|
116 | 116 | } |
117 | 117 | |
118 | 118 |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | return; |
68 | 68 | } |
69 | 69 | |
70 | - $folders = array_filter($folders, function (ISimpleFolder $folder) { |
|
70 | + $folders = array_filter($folders, function(ISimpleFolder $folder) { |
|
71 | 71 | return $folder->fileExists('photo.'); |
72 | 72 | }); |
73 | 73 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | return; |
76 | 76 | } |
77 | 77 | |
78 | - $output->info('Delete ' . count($folders) . ' "photo." files'); |
|
78 | + $output->info('Delete '.count($folders).' "photo." files'); |
|
79 | 79 | |
80 | 80 | foreach ($folders as $folder) { |
81 | 81 | try { |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $folder->getFile('photo.')->delete(); |
84 | 84 | } catch (\Exception $e) { |
85 | 85 | $this->logger->logException($e); |
86 | - $output->warning('Could not delete file "dav-photocache/' . $folder->getName() . '/photo."'); |
|
86 | + $output->warning('Could not delete file "dav-photocache/'.$folder->getName().'/photo."'); |
|
87 | 87 | } |
88 | 88 | } |
89 | 89 | } |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | |
212 | 212 | private function hashToken(string $token): string { |
213 | 213 | $secret = $this->config->getSystemValue('secret'); |
214 | - return hash('sha512', $token . $secret); |
|
214 | + return hash('sha512', $token.$secret); |
|
215 | 215 | } |
216 | 216 | |
217 | 217 | private function getKeyPair(): array { |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | while ($error = openssl_error_string()) { |
242 | 242 | $errors[] = $error; |
243 | 243 | } |
244 | - $this->logger->critical('Something is wrong with your openssl setup: ' . implode(', ', $errors)); |
|
244 | + $this->logger->critical('Something is wrong with your openssl setup: '.implode(', ', $errors)); |
|
245 | 245 | } |
246 | 246 | |
247 | 247 | private function encryptPassword(string $password, string $publicKey): string { |
@@ -389,7 +389,7 @@ |
||
389 | 389 | foreach ($ak as $source) { |
390 | 390 | $tags = $this->subTags[$source]; |
391 | 391 | foreach ($tags as $tag) { |
392 | - $subTags[] = $source . '_' . $tag; |
|
392 | + $subTags[] = $source.'_'.$tag; |
|
393 | 393 | } |
394 | 394 | } |
395 | 395 |
@@ -53,7 +53,7 @@ |
||
53 | 53 | $providers = $this->registry->getProviderStates($event->getUser()); |
54 | 54 | |
55 | 55 | // Loop over all providers. If all are disabled we remove the job |
56 | - $state = array_reduce($providers, function (bool $carry, bool $enabled) { |
|
56 | + $state = array_reduce($providers, function(bool $carry, bool $enabled) { |
|
57 | 57 | return $carry || $enabled; |
58 | 58 | }, false); |
59 | 59 |
@@ -39,9 +39,9 @@ |
||
39 | 39 | public function castColumn($column, $type) { |
40 | 40 | switch ($type) { |
41 | 41 | case IQueryBuilder::PARAM_INT: |
42 | - return new QueryFunction('CAST(' . $this->helper->quoteColumnName($column) . ' AS INT)'); |
|
42 | + return new QueryFunction('CAST('.$this->helper->quoteColumnName($column).' AS INT)'); |
|
43 | 43 | case IQueryBuilder::PARAM_STR: |
44 | - return new QueryFunction('CAST(' . $this->helper->quoteColumnName($column) . ' AS TEXT)'); |
|
44 | + return new QueryFunction('CAST('.$this->helper->quoteColumnName($column).' AS TEXT)'); |
|
45 | 45 | default: |
46 | 46 | return parent::castColumn($column, $type); |
47 | 47 | } |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | ->setFirstResult($start); |
145 | 145 | |
146 | 146 | if ($filter !== '') { |
147 | - $query->where($query->expr()->iLike('c.name', $query->createNamedParameter('%' . $this->connection->escapeLikeParameter($filter) . '%'))); |
|
147 | + $query->where($query->expr()->iLike('c.name', $query->createNamedParameter('%'.$this->connection->escapeLikeParameter($filter).'%'))); |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | $result = $query->execute(); |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | while ($row = $result->fetch()) { |
155 | 155 | $foundResults++; |
156 | 156 | $access = $row['access'] === null ? null : (bool) $row['access']; |
157 | - $collection = new Collection($this, $this->connection, (int)$row['id'], (string)$row['name'], $user, $access); |
|
157 | + $collection = new Collection($this, $this->connection, (int) $row['id'], (string) $row['name'], $user, $access); |
|
158 | 158 | if ($collection->canAccess($user)) { |
159 | 159 | $collections[] = $collection; |
160 | 160 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | |
46 | 46 | public function process(LoginData $loginData): LoginResult { |
47 | 47 | $tokenType = IToken::REMEMBER; |
48 | - if ((int)$this->config->getSystemValue('remember_login_cookie_lifetime', 60 * 60 * 24 * 15) === 0) { |
|
48 | + if ((int) $this->config->getSystemValue('remember_login_cookie_lifetime', 60 * 60 * 24 * 15) === 0) { |
|
49 | 49 | $loginData->setRememberLogin(false); |
50 | 50 | $tokenType = IToken::DO_NOT_REMEMBER; |
51 | 51 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | |
100 | 100 | private function filterTrace(array $trace) { |
101 | 101 | $sensitiveValues = []; |
102 | - $trace = array_map(function (array $traceLine) use (&$sensitiveValues) { |
|
102 | + $trace = array_map(function(array $traceLine) use (&$sensitiveValues) { |
|
103 | 103 | $className = $traceLine['class'] ?? ''; |
104 | 104 | if ($className && isset(self::methodsWithSensitiveParametersByClass[$className]) |
105 | 105 | && in_array($traceLine['function'], self::methodsWithSensitiveParametersByClass[$className], true)) { |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | } |
113 | 113 | return $traceLine; |
114 | 114 | }, $trace); |
115 | - return array_map(function (array $traceLine) use ($sensitiveValues) { |
|
115 | + return array_map(function(array $traceLine) use ($sensitiveValues) { |
|
116 | 116 | if (isset($traceLine['args'])) { |
117 | 117 | $traceLine['args'] = $this->removeValuesFromArgs($traceLine['args'], $sensitiveValues); |
118 | 118 | } |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | |
134 | 134 | private function encodeTrace($trace) { |
135 | 135 | $filteredTrace = $this->filterTrace($trace); |
136 | - return array_map(function (array $line) { |
|
136 | + return array_map(function(array $line) { |
|
137 | 137 | if (isset($line['args'])) { |
138 | 138 | $line['args'] = array_map([$this, 'encodeArg'], $line['args']); |
139 | 139 | } |