@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | } |
111 | 111 | |
112 | - throw new NotFound('Node with name \'' . $name . '\' could not be found'); |
|
112 | + throw new NotFound('Node with name \''.$name.'\' could not be found'); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | /** |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @param integer|null $limit |
118 | 118 | * @param integer|null $offset |
119 | 119 | */ |
120 | - function calendarSearch(array $filters, $limit=null, $offset=null) { |
|
120 | + function calendarSearch(array $filters, $limit = null, $offset = null) { |
|
121 | 121 | $principalUri = $this->principalInfo['uri']; |
122 | 122 | return $this->caldavBackend->calendarSearch($principalUri, $filters, $limit, $offset); |
123 | 123 | } |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | */ |
152 | 152 | public function move($source, $destination) { |
153 | 153 | $statement = $this->connection->prepare( |
154 | - 'UPDATE `*PREFIX*properties` SET `propertypath` = ?' . |
|
154 | + 'UPDATE `*PREFIX*properties` SET `propertypath` = ?'. |
|
155 | 155 | ' WHERE `userid` = ? AND `propertypath` = ?' |
156 | 156 | ); |
157 | 157 | $statement->execute(array($destination, $this->user, $source)); |
@@ -213,13 +213,13 @@ discard block |
||
213 | 213 | */ |
214 | 214 | private function updateProperties($path, $properties) { |
215 | 215 | |
216 | - $deleteStatement = 'DELETE FROM `*PREFIX*properties`' . |
|
216 | + $deleteStatement = 'DELETE FROM `*PREFIX*properties`'. |
|
217 | 217 | ' WHERE `userid` = ? AND `propertypath` = ? AND `propertyname` = ?'; |
218 | 218 | |
219 | - $insertStatement = 'INSERT INTO `*PREFIX*properties`' . |
|
219 | + $insertStatement = 'INSERT INTO `*PREFIX*properties`'. |
|
220 | 220 | ' (`userid`,`propertypath`,`propertyname`,`propertyvalue`) VALUES(?,?,?,?)'; |
221 | 221 | |
222 | - $updateStatement = 'UPDATE `*PREFIX*properties` SET `propertyvalue` = ?' . |
|
222 | + $updateStatement = 'UPDATE `*PREFIX*properties` SET `propertyvalue` = ?'. |
|
223 | 223 | ' WHERE `userid` = ? AND `propertypath` = ? AND `propertyname` = ?'; |
224 | 224 | |
225 | 225 | // TODO: use "insert or update" strategy ? |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | <tr><td> |
28 | 28 | <table cellspacing="0" cellpadding="0" border="0" width="600px"> |
29 | 29 | <tr> |
30 | - <td colspan="2" bgcolor="<?php p($theme->getColorPrimary());?>"> |
|
30 | + <td colspan="2" bgcolor="<?php p($theme->getColorPrimary()); ?>"> |
|
31 | 31 | <img src="<?php p(\OC::$server->getURLGenerator()->getAbsoluteURL(image_path('', 'logo-mail.png'))); ?>" alt="<?php p($theme->getName()); ?>"/> |
32 | 32 | </td> |
33 | 33 | </tr> |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | <td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">--<br> |
53 | 53 | <?php p($theme->getName()); ?> - |
54 | 54 | <?php p($theme->getSlogan()); ?> |
55 | - <br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl());?></a> |
|
55 | + <br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl()); ?></a> |
|
56 | 56 | </td> |
57 | 57 | </tr> |
58 | 58 | <tr> |
@@ -133,10 +133,10 @@ discard block |
||
133 | 133 | |
134 | 134 | // Check that all parameters from $event exist in $previousEvent |
135 | 135 | foreach ($params1 as $key => $parameter) { |
136 | - if (preg_match('/^' . $mergeParameter . '(\d+)?$/', $key)) { |
|
136 | + if (preg_match('/^'.$mergeParameter.'(\d+)?$/', $key)) { |
|
137 | 137 | if (!$this->checkParameterAlreadyExits($params, $mergeParameter, $parameter)) { |
138 | 138 | $combined++; |
139 | - $params[$mergeParameter . $combined] = $parameter; |
|
139 | + $params[$mergeParameter.$combined] = $parameter; |
|
140 | 140 | } |
141 | 141 | continue; |
142 | 142 | } |
@@ -151,10 +151,10 @@ discard block |
||
151 | 151 | |
152 | 152 | // Check that all parameters from $previousEvent exist in $event |
153 | 153 | foreach ($params2 as $key => $parameter) { |
154 | - if (preg_match('/^' . $mergeParameter . '(\d+)?$/', $key)) { |
|
154 | + if (preg_match('/^'.$mergeParameter.'(\d+)?$/', $key)) { |
|
155 | 155 | if (!$this->checkParameterAlreadyExits($params, $mergeParameter, $parameter)) { |
156 | 156 | $combined++; |
157 | - $params[$mergeParameter . $combined] = $parameter; |
|
157 | + $params[$mergeParameter.$combined] = $parameter; |
|
158 | 158 | } |
159 | 159 | continue; |
160 | 160 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | */ |
179 | 179 | protected function checkParameterAlreadyExits($parameters, $mergeParameter, $parameter) { |
180 | 180 | foreach ($parameters as $key => $param) { |
181 | - if (preg_match('/^' . $mergeParameter . '(\d+)?$/', $key)) { |
|
181 | + if (preg_match('/^'.$mergeParameter.'(\d+)?$/', $key)) { |
|
182 | 182 | if ($param === $parameter) { |
183 | 183 | return true; |
184 | 184 | } |
@@ -196,30 +196,30 @@ discard block |
||
196 | 196 | protected function getExtendedSubject($subject, $parameter, $counter) { |
197 | 197 | switch ($counter) { |
198 | 198 | case 1: |
199 | - $replacement = '{' . $parameter . '1}'; |
|
199 | + $replacement = '{'.$parameter.'1}'; |
|
200 | 200 | break; |
201 | 201 | case 2: |
202 | 202 | $replacement = $this->l10n->t( |
203 | 203 | '%1$s and %2$s', |
204 | - ['{' . $parameter . '2}', '{' . $parameter . '1}'] |
|
204 | + ['{'.$parameter.'2}', '{'.$parameter.'1}'] |
|
205 | 205 | ); |
206 | 206 | break; |
207 | 207 | case 3: |
208 | 208 | $replacement = $this->l10n->t( |
209 | 209 | '%1$s, %2$s and %3$s', |
210 | - ['{' . $parameter . '3}', '{' . $parameter . '2}', '{' . $parameter . '1}'] |
|
210 | + ['{'.$parameter.'3}', '{'.$parameter.'2}', '{'.$parameter.'1}'] |
|
211 | 211 | ); |
212 | 212 | break; |
213 | 213 | case 4: |
214 | 214 | $replacement = $this->l10n->t( |
215 | 215 | '%1$s, %2$s, %3$s and %4$s', |
216 | - ['{' . $parameter . '4}', '{' . $parameter . '3}', '{' . $parameter . '2}', '{' . $parameter . '1}'] |
|
216 | + ['{'.$parameter.'4}', '{'.$parameter.'3}', '{'.$parameter.'2}', '{'.$parameter.'1}'] |
|
217 | 217 | ); |
218 | 218 | break; |
219 | 219 | case 5: |
220 | 220 | $replacement = $this->l10n->t( |
221 | 221 | '%1$s, %2$s, %3$s, %4$s and %5$s', |
222 | - ['{' . $parameter . '5}', '{' . $parameter . '4}', '{' . $parameter . '3}', '{' . $parameter . '2}', '{' . $parameter . '1}'] |
|
222 | + ['{'.$parameter.'5}', '{'.$parameter.'4}', '{'.$parameter.'3}', '{'.$parameter.'2}', '{'.$parameter.'1}'] |
|
223 | 223 | ); |
224 | 224 | break; |
225 | 225 | default: |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | } |
228 | 228 | |
229 | 229 | return str_replace( |
230 | - '{' . $parameter . '}', |
|
230 | + '{'.$parameter.'}', |
|
231 | 231 | $replacement, |
232 | 232 | $subject |
233 | 233 | ); |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | protected function generateParsedSubject($subject, $parameters) { |
242 | 242 | $placeholders = $replacements = []; |
243 | 243 | foreach ($parameters as $placeholder => $parameter) { |
244 | - $placeholders[] = '{' . $placeholder . '}'; |
|
244 | + $placeholders[] = '{'.$placeholder.'}'; |
|
245 | 245 | if ($parameter['type'] === 'file') { |
246 | 246 | $replacements[] = trim($parameter['path'], '/'); |
247 | 247 | } else if (isset($parameter['name'])) { |
@@ -171,14 +171,14 @@ |
||
171 | 171 | protected function deleteOrphanEntries(IOutput $output, $repairInfo, $deleteTable, $deleteId, $sourceTable, $sourceId, $sourceNullColumn) { |
172 | 172 | $qb = $this->connection->getQueryBuilder(); |
173 | 173 | |
174 | - $qb->select('d.' . $deleteId) |
|
174 | + $qb->select('d.'.$deleteId) |
|
175 | 175 | ->from($deleteTable, 'd') |
176 | - ->leftJoin('d', $sourceTable, 's', $qb->expr()->eq('d.' . $deleteId, 's.' . $sourceId)) |
|
176 | + ->leftJoin('d', $sourceTable, 's', $qb->expr()->eq('d.'.$deleteId, 's.'.$sourceId)) |
|
177 | 177 | ->where( |
178 | 178 | $qb->expr()->eq('d.type', $qb->expr()->literal('files')) |
179 | 179 | ) |
180 | 180 | ->andWhere( |
181 | - $qb->expr()->isNull('s.' . $sourceNullColumn) |
|
181 | + $qb->expr()->isNull('s.'.$sourceNullColumn) |
|
182 | 182 | ); |
183 | 183 | $result = $qb->execute(); |
184 | 184 |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | * @return TemplateResponse|RedirectResponse |
86 | 86 | */ |
87 | 87 | public function showRenewPasswordForm($user) { |
88 | - if($this->config->getUserValue($user, 'user_ldap', 'needsPasswordReset') !== 'true') { |
|
88 | + if ($this->config->getUserValue($user, 'user_ldap', 'needsPasswordReset') !== 'true') { |
|
89 | 89 | return new RedirectResponse($this->urlGenerator->linkToRouteAbsolute('core.login.showLoginForm')); |
90 | 90 | } |
91 | 91 | $parameters = []; |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | * @return RedirectResponse |
130 | 130 | */ |
131 | 131 | public function tryRenewPassword($user, $oldPassword, $newPassword) { |
132 | - if($this->config->getUserValue($user, 'user_ldap', 'needsPasswordReset') !== 'true') { |
|
132 | + if ($this->config->getUserValue($user, 'user_ldap', 'needsPasswordReset') !== 'true') { |
|
133 | 133 | return new RedirectResponse($this->urlGenerator->linkToRouteAbsolute('core.login.showLoginForm')); |
134 | 134 | } |
135 | 135 | $args = !is_null($user) ? ['user' => $user] : []; |
@@ -102,13 +102,13 @@ |
||
102 | 102 | if ($generatePasswordResetToken) { |
103 | 103 | $token = $this->secureRandom->generate( |
104 | 104 | 21, |
105 | - ISecureRandom::CHAR_DIGITS . |
|
106 | - ISecureRandom::CHAR_LOWER . |
|
105 | + ISecureRandom::CHAR_DIGITS. |
|
106 | + ISecureRandom::CHAR_LOWER. |
|
107 | 107 | ISecureRandom::CHAR_UPPER |
108 | 108 | ); |
109 | - $tokenValue = $this->timeFactory->getTime() . ':' . $token; |
|
109 | + $tokenValue = $this->timeFactory->getTime().':'.$token; |
|
110 | 110 | $mailAddress = (null !== $user->getEMailAddress()) ? $user->getEMailAddress() : ''; |
111 | - $encryptedValue = $this->crypto->encrypt($tokenValue, $mailAddress . $this->config->getSystemValue('secret')); |
|
111 | + $encryptedValue = $this->crypto->encrypt($tokenValue, $mailAddress.$this->config->getSystemValue('secret')); |
|
112 | 112 | $this->config->setUserValue($user->getUID(), 'core', 'lostpassword', $encryptedValue); |
113 | 113 | $link = $this->urlGenerator->linkToRouteAbsolute('core.lost.resetform', ['userId' => $user->getUID(), 'token' => $token]); |
114 | 114 | } else { |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | } |
115 | 115 | |
116 | 116 | $item = $node; |
117 | - $appendix = '/' . $node->getName(); |
|
117 | + $appendix = '/'.$node->getName(); |
|
118 | 118 | while (!empty($byId)) { |
119 | 119 | try { |
120 | 120 | /** @var Node $item */ |
@@ -122,12 +122,12 @@ discard block |
||
122 | 122 | |
123 | 123 | if (!empty($byId[$item->getId()])) { |
124 | 124 | foreach ($byId[$item->getId()] as $uid => $path) { |
125 | - $results[$uid] = $path . $appendix; |
|
125 | + $results[$uid] = $path.$appendix; |
|
126 | 126 | } |
127 | 127 | unset($byId[$item->getId()]); |
128 | 128 | } |
129 | 129 | |
130 | - $appendix = '/' . $item->getName() . $appendix; |
|
130 | + $appendix = '/'.$item->getName().$appendix; |
|
131 | 131 | } catch (NotFoundException $e) { |
132 | 132 | return $results; |
133 | 133 | } catch (InvalidPathException $e) { |
@@ -212,6 +212,6 @@ discard block |
||
212 | 212 | protected function getMountedPath(Node $node) { |
213 | 213 | $path = $node->getPath(); |
214 | 214 | $sections = explode('/', $path, 4); |
215 | - return '/' . $sections[3]; |
|
215 | + return '/'.$sections[3]; |
|
216 | 216 | } |
217 | 217 | } |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | * @return string |
174 | 174 | */ |
175 | 175 | public function getId() { |
176 | - return 'shared::' . $this->getMountPoint(); |
|
176 | + return 'shared::'.$this->getMountPoint(); |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | /** |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | } |
270 | 270 | } |
271 | 271 | $info = array( |
272 | - 'target' => $this->getMountPoint() . $path, |
|
272 | + 'target' => $this->getMountPoint().$path, |
|
273 | 273 | 'source' => $source, |
274 | 274 | 'mode' => $mode, |
275 | 275 | ); |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | |
479 | 479 | public function file_get_contents($path) { |
480 | 480 | $info = [ |
481 | - 'target' => $this->getMountPoint() . '/' . $path, |
|
481 | + 'target' => $this->getMountPoint().'/'.$path, |
|
482 | 482 | 'source' => $this->getUnjailedPath($path), |
483 | 483 | ]; |
484 | 484 | \OCP\Util::emitHook('\OC\Files\Storage\Shared', 'file_get_contents', $info); |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | |
488 | 488 | public function file_put_contents($path, $data) { |
489 | 489 | $info = [ |
490 | - 'target' => $this->getMountPoint() . '/' . $path, |
|
490 | + 'target' => $this->getMountPoint().'/'.$path, |
|
491 | 491 | 'source' => $this->getUnjailedPath($path), |
492 | 492 | ]; |
493 | 493 | \OCP\Util::emitHook('\OC\Files\Storage\Shared', 'file_put_contents', $info); |