@@ -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 | } |
@@ -84,8 +84,8 @@ discard block |
||
| 84 | 84 | $anonPeriod = $this->reflector->getAnnotationParameter('AnonRateThrottle', 'period'); |
| 85 | 85 | $userLimit = $this->reflector->getAnnotationParameter('UserRateThrottle', 'limit'); |
| 86 | 86 | $userPeriod = $this->reflector->getAnnotationParameter('UserRateThrottle', 'period'); |
| 87 | - $rateLimitIdentifier = get_class($controller) . '::' . $methodName; |
|
| 88 | - if($userLimit !== '' && $userPeriod !== '' && $this->userSession->isLoggedIn()) { |
|
| 87 | + $rateLimitIdentifier = get_class($controller).'::'.$methodName; |
|
| 88 | + if ($userLimit !== '' && $userPeriod !== '' && $this->userSession->isLoggedIn()) { |
|
| 89 | 89 | $this->limiter->registerUserRequest( |
| 90 | 90 | $rateLimitIdentifier, |
| 91 | 91 | $userLimit, |
@@ -106,8 +106,8 @@ discard block |
||
| 106 | 106 | * {@inheritDoc} |
| 107 | 107 | */ |
| 108 | 108 | public function afterException($controller, $methodName, \Exception $exception) { |
| 109 | - if($exception instanceof RateLimitExceededException) { |
|
| 110 | - if (stripos($this->request->getHeader('Accept'),'html') === false) { |
|
| 109 | + if ($exception instanceof RateLimitExceededException) { |
|
| 110 | + if (stripos($this->request->getHeader('Accept'), 'html') === false) { |
|
| 111 | 111 | $response = new JSONResponse( |
| 112 | 112 | [ |
| 113 | 113 | 'message' => $exception->getMessage(), |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | public function beforeController($controller, $methodName) { |
| 62 | 62 | parent::beforeController($controller, $methodName); |
| 63 | 63 | |
| 64 | - if($this->reflector->hasAnnotation('BruteForceProtection')) { |
|
| 64 | + if ($this->reflector->hasAnnotation('BruteForceProtection')) { |
|
| 65 | 65 | $action = $this->reflector->getAnnotationParameter('BruteForceProtection', 'action'); |
| 66 | 66 | $this->throttler->sleepDelay($this->request->getRemoteAddress(), $action); |
| 67 | 67 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | * {@inheritDoc} |
| 72 | 72 | */ |
| 73 | 73 | public function afterController($controller, $methodName, Response $response) { |
| 74 | - if($this->reflector->hasAnnotation('BruteForceProtection') && $response->isThrottled()) { |
|
| 74 | + if ($this->reflector->hasAnnotation('BruteForceProtection') && $response->isThrottled()) { |
|
| 75 | 75 | $action = $this->reflector->getAnnotationParameter('BruteForceProtection', 'action'); |
| 76 | 76 | $ip = $this->request->getRemoteAddress(); |
| 77 | 77 | $this->throttler->sleepDelay($ip, $action); |
@@ -198,7 +198,7 @@ |
||
| 198 | 198 | } catch (NotFoundException $e) { |
| 199 | 199 | return new DataResponse( |
| 200 | 200 | [ |
| 201 | - 'message' => (string)$this->l10n->t('Storage with ID "%d" not found', array($id)) |
|
| 201 | + 'message' => (string) $this->l10n->t('Storage with ID "%d" not found', array($id)) |
|
| 202 | 202 | ], |
| 203 | 203 | Http::STATUS_NOT_FOUND |
| 204 | 204 | ); |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | } catch (NotFoundException $e) { |
| 123 | 123 | return new DataResponse( |
| 124 | 124 | [ |
| 125 | - 'message' => (string)$this->l10n->t('Storage with ID "%d" not found', array($id)) |
|
| 125 | + 'message' => (string) $this->l10n->t('Storage with ID "%d" not found', array($id)) |
|
| 126 | 126 | ], |
| 127 | 127 | Http::STATUS_NOT_FOUND |
| 128 | 128 | ); |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | } else { |
| 163 | 163 | return new DataResponse( |
| 164 | 164 | [ |
| 165 | - 'message' => (string)$this->l10n->t('Storage with ID "%d" is not user editable', array($id)) |
|
| 165 | + 'message' => (string) $this->l10n->t('Storage with ID "%d" is not user editable', array($id)) |
|
| 166 | 166 | ], |
| 167 | 167 | Http::STATUS_FORBIDDEN |
| 168 | 168 | ); |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | } catch (NotFoundException $e) { |
| 171 | 171 | return new DataResponse( |
| 172 | 172 | [ |
| 173 | - 'message' => (string)$this->l10n->t('Storage with ID "%d" not found', array($id)) |
|
| 173 | + 'message' => (string) $this->l10n->t('Storage with ID "%d" not found', array($id)) |
|
| 174 | 174 | ], |
| 175 | 175 | Http::STATUS_NOT_FOUND |
| 176 | 176 | ); |
@@ -198,7 +198,7 @@ |
||
| 198 | 198 | } catch (NotFoundException $e) { |
| 199 | 199 | return new DataResponse( |
| 200 | 200 | [ |
| 201 | - 'message' => (string)$this->l10n->t('Storage with ID "%d" not found', array($id)) |
|
| 201 | + 'message' => (string) $this->l10n->t('Storage with ID "%d" not found', array($id)) |
|
| 202 | 202 | ], |
| 203 | 203 | Http::STATUS_NOT_FOUND |
| 204 | 204 | ); |