@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $folder = $this->appData->getFolder($appName); |
73 | 73 | $gzip = false; |
74 | 74 | $file = $this->getFile($folder, $fileName, $gzip); |
75 | - } catch(NotFoundException $e) { |
|
75 | + } catch (NotFoundException $e) { |
|
76 | 76 | return new NotFoundResponse(); |
77 | 77 | } |
78 | 78 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | if (strpos($encoding, 'gzip') !== false) { |
102 | 102 | try { |
103 | 103 | $gzip = true; |
104 | - return $folder->getFile($fileName . '.gzip'); # Safari doesn't like .gz |
|
104 | + return $folder->getFile($fileName.'.gzip'); # Safari doesn't like .gz |
|
105 | 105 | } catch (NotFoundException $e) { |
106 | 106 | // continue |
107 | 107 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | $config = \OC::$server->getConfig(); |
26 | 26 | $state = $config->getSystemValue('ldapIgnoreNamingRules', 'doSet'); |
27 | -if($state === 'doSet') { |
|
27 | +if ($state === 'doSet') { |
|
28 | 28 | \OC::$server->getConfig()->setSystemValue('ldapIgnoreNamingRules', false); |
29 | 29 | } |
30 | 30 |
@@ -128,7 +128,7 @@ |
||
128 | 128 | * @since 8.0.0 |
129 | 129 | * @suppress PhanDeprecatedFunction |
130 | 130 | */ |
131 | - public static function html_select_options($options, $selected, $params=array()) { |
|
131 | + public static function html_select_options($options, $selected, $params = array()) { |
|
132 | 132 | return \html_select_options($options, $selected, $params); |
133 | 133 | } |
134 | 134 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function shouldJoinTags(ISearchOperator $operator) { |
76 | 76 | if ($operator instanceof ISearchBinaryOperator) { |
77 | - return array_reduce($operator->getArguments(), function ($shouldJoin, ISearchOperator $operator) { |
|
77 | + return array_reduce($operator->getArguments(), function($shouldJoin, ISearchOperator $operator) { |
|
78 | 78 | return $shouldJoin || $this->shouldJoinTags($operator); |
79 | 79 | }, false); |
80 | 80 | } else if ($operator instanceof ISearchComparison) { |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | * @param ISearchOperator $operator |
89 | 89 | */ |
90 | 90 | public function searchOperatorArrayToDBExprArray(IQueryBuilder $builder, array $operators) { |
91 | - return array_map(function ($operator) use ($builder) { |
|
91 | + return array_map(function($operator) use ($builder) { |
|
92 | 92 | return $this->searchOperatorToDBExpr($builder, $operator); |
93 | 93 | }, $operators); |
94 | 94 | } |
@@ -109,12 +109,12 @@ discard block |
||
109 | 109 | case ISearchBinaryOperator::OPERATOR_OR: |
110 | 110 | return call_user_func_array([$expr, 'orX'], $this->searchOperatorArrayToDBExprArray($builder, $operator->getArguments())); |
111 | 111 | default: |
112 | - throw new \InvalidArgumentException('Invalid operator type: ' . $operator->getType()); |
|
112 | + throw new \InvalidArgumentException('Invalid operator type: '.$operator->getType()); |
|
113 | 113 | } |
114 | 114 | } else if ($operator instanceof ISearchComparison) { |
115 | 115 | return $this->searchComparisonToDBExpr($builder, $operator, self::$searchOperatorMap); |
116 | 116 | } else { |
117 | - throw new \InvalidArgumentException('Invalid operator type: ' . get_class($operator)); |
|
117 | + throw new \InvalidArgumentException('Invalid operator type: '.get_class($operator)); |
|
118 | 118 | } |
119 | 119 | } |
120 | 120 | |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $queryOperator = $operatorMap[$type]; |
127 | 127 | return $builder->expr()->$queryOperator($field, $this->getParameterForValue($builder, $value)); |
128 | 128 | } else { |
129 | - throw new \InvalidArgumentException('Invalid operator type: ' . $comparison->getType()); |
|
129 | + throw new \InvalidArgumentException('Invalid operator type: '.$comparison->getType()); |
|
130 | 130 | } |
131 | 131 | } |
132 | 132 | |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | $type = ISearchComparison::COMPARE_EQUAL; |
146 | 146 | } |
147 | 147 | if (strpos($value, '%') !== false) { |
148 | - throw new \InvalidArgumentException('Unsupported query value for mimetype: ' . $value . ', only values in the format "mime/type" or "mime/%" are supported'); |
|
148 | + throw new \InvalidArgumentException('Unsupported query value for mimetype: '.$value.', only values in the format "mime/type" or "mime/%" are supported'); |
|
149 | 149 | } |
150 | 150 | } |
151 | 151 | } else if ($field === 'favorite') { |
@@ -178,14 +178,14 @@ discard block |
||
178 | 178 | ]; |
179 | 179 | |
180 | 180 | if (!isset($types[$operator->getField()])) { |
181 | - throw new \InvalidArgumentException('Unsupported comparison field ' . $operator->getField()); |
|
181 | + throw new \InvalidArgumentException('Unsupported comparison field '.$operator->getField()); |
|
182 | 182 | } |
183 | 183 | $type = $types[$operator->getField()]; |
184 | 184 | if (gettype($operator->getValue()) !== $type) { |
185 | - throw new \InvalidArgumentException('Invalid type for field ' . $operator->getField()); |
|
185 | + throw new \InvalidArgumentException('Invalid type for field '.$operator->getField()); |
|
186 | 186 | } |
187 | 187 | if (!in_array($operator->getType(), $comparisons[$operator->getField()])) { |
188 | - throw new \InvalidArgumentException('Unsupported comparison for field ' . $operator->getField() . ': ' . $operator->getType()); |
|
188 | + throw new \InvalidArgumentException('Unsupported comparison for field '.$operator->getField().': '.$operator->getType()); |
|
189 | 189 | } |
190 | 190 | } |
191 | 191 |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | // WARNING: this should be moved to proper AppFramework handling |
24 | 24 | // Check if we are a user |
25 | 25 | if (!\OC::$server->getUserSession()->isLoggedIn()) { |
26 | - header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute( |
|
26 | + header('Location: '.\OC::$server->getURLGenerator()->linkToRoute( |
|
27 | 27 | 'core.login.showLoginForm', |
28 | 28 | [ |
29 | 29 | 'redirect_url' => \OC::$server->getRequest()->getRequestUri(), |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | } |
35 | 35 | // Redirect to 2FA challenge selection if 2FA challenge was not solved yet |
36 | 36 | if (\OC::$server->getTwoFactorAuthManager()->needsSecondFactor(\OC::$server->getUserSession()->getUser())) { |
37 | - header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.selectChallenge')); |
|
37 | + header('Location: '.\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.selectChallenge')); |
|
38 | 38 | exit(); |
39 | 39 | } |
40 | 40 |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | * @return IMemcache |
134 | 134 | */ |
135 | 135 | public function createLocking(string $prefix = ''): IMemcache { |
136 | - return new $this->lockingCacheClass($this->globalPrefix . '/' . $prefix); |
|
136 | + return new $this->lockingCacheClass($this->globalPrefix.'/'.$prefix); |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | /** |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | * @return ICache |
144 | 144 | */ |
145 | 145 | public function createDistributed(string $prefix = ''): ICache { |
146 | - return new $this->distributedCacheClass($this->globalPrefix . '/' . $prefix); |
|
146 | + return new $this->distributedCacheClass($this->globalPrefix.'/'.$prefix); |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | /** |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | * @return ICache |
154 | 154 | */ |
155 | 155 | public function createLocal(string $prefix = ''): ICache { |
156 | - return new $this->localCacheClass($this->globalPrefix . '/' . $prefix); |
|
156 | + return new $this->localCacheClass($this->globalPrefix.'/'.$prefix); |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | /** |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | if (!($node instanceof File)) { |
173 | 173 | return new JSONResponse(['data' => ['message' => $this->l->t('Please select a file.')]]); |
174 | 174 | } |
175 | - if ($node->getSize() > 20*1024*1024) { |
|
175 | + if ($node->getSize() > 20 * 1024 * 1024) { |
|
176 | 176 | return new JSONResponse( |
177 | 177 | ['data' => ['message' => $this->l->t('File is too big')]], |
178 | 178 | Http::STATUS_BAD_REQUEST |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | is_uploaded_file($files['tmp_name'][0]) && |
201 | 201 | !\OC\Files\Filesystem::isFileBlacklisted($files['tmp_name'][0]) |
202 | 202 | ) { |
203 | - if ($files['size'][0] > 20*1024*1024) { |
|
203 | + if ($files['size'][0] > 20 * 1024 * 1024) { |
|
204 | 204 | return new JSONResponse( |
205 | 205 | ['data' => ['message' => $this->l->t('File is too big')]], |
206 | 206 | Http::STATUS_BAD_REQUEST |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | Http::STATUS_OK, |
293 | 293 | ['Content-Type' => $image->mimeType()]); |
294 | 294 | |
295 | - $resp->setETag((string)crc32($image->data())); |
|
295 | + $resp->setETag((string) crc32($image->data())); |
|
296 | 296 | $resp->cacheFor(0); |
297 | 297 | $resp->setLastModified(new \DateTime('now', new \DateTimeZone('GMT'))); |
298 | 298 | return $resp; |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | |
326 | 326 | $image = new \OC_Image(); |
327 | 327 | $image->loadFromData($tmpAvatar); |
328 | - $image->crop($crop['x'], $crop['y'], (int)round($crop['w']), (int)round($crop['h'])); |
|
328 | + $image->crop($crop['x'], $crop['y'], (int) round($crop['w']), (int) round($crop['h'])); |
|
329 | 329 | try { |
330 | 330 | $avatar = $this->avatarManager->getAvatar($this->userId); |
331 | 331 | $avatar->set($image); |
@@ -151,7 +151,7 @@ |
||
151 | 151 | |
152 | 152 | public function takeOutCurrentUser(array &$users) { |
153 | 153 | $currentUser = $this->userSession->getUser(); |
154 | - if(!is_null($currentUser)) { |
|
154 | + if (!is_null($currentUser)) { |
|
155 | 155 | if (isset($users[$currentUser->getUID()])) { |
156 | 156 | unset($users[$currentUser->getUID()]); |
157 | 157 | } |
@@ -33,8 +33,8 @@ |
||
33 | 33 | /** |
34 | 34 | * @since 14.0.0 |
35 | 35 | */ |
36 | - const EVENT_SUCCESS = self::class . '::success'; |
|
37 | - const EVENT_FAILED = self::class . '::failed'; |
|
36 | + const EVENT_SUCCESS = self::class.'::success'; |
|
37 | + const EVENT_FAILED = self::class.'::failed'; |
|
38 | 38 | |
39 | 39 | /** |
40 | 40 | * Get unique identifier of this 2FA provider |