@@ -69,7 +69,7 @@ |
||
69 | 69 | $result->closeCursor(); |
70 | 70 | |
71 | 71 | if ($entriesUpdated > 0) { |
72 | - $output->info($entriesUpdated . ' mounts updated'); |
|
72 | + $output->info($entriesUpdated.' mounts updated'); |
|
73 | 73 | return; |
74 | 74 | } |
75 | 75 |
@@ -93,7 +93,7 @@ |
||
93 | 93 | $result->closeCursor(); |
94 | 94 | |
95 | 95 | if ($deletedEntries) { |
96 | - $output->info('Removed ' . $deletedEntries . ' shares where user is not a member of the group anymore'); |
|
96 | + $output->info('Removed '.$deletedEntries.' shares where user is not a member of the group anymore'); |
|
97 | 97 | } |
98 | 98 | } |
99 | 99 |
@@ -33,7 +33,7 @@ |
||
33 | 33 | } |
34 | 34 | if ($table !== null) { |
35 | 35 | $suffix = '_SEQ'; |
36 | - $table = '"' . $table . $suffix . '"'; |
|
36 | + $table = '"'.$table.$suffix.'"'; |
|
37 | 37 | } |
38 | 38 | return $this->conn->realLastInsertId($table); |
39 | 39 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | public function iLike($x, $y, $type = null) { |
49 | 49 | $x = $this->helper->quoteColumnName($x); |
50 | 50 | $y = $this->helper->quoteColumnName($y); |
51 | - return $this->expressionBuilder->comparison($x, ' COLLATE ' . $this->charset . '_general_ci LIKE', $y); |
|
51 | + return $this->expressionBuilder->comparison($x, ' COLLATE '.$this->charset.'_general_ci LIKE', $y); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | // fix default value in brackets - pg 9.4 is returning a negative default value in () |
38 | 38 | // see https://github.com/doctrine/dbal/issues/2427 |
39 | 39 | foreach ($tableDiff->changedColumns as $column) { |
40 | - $column->changedProperties = array_filter($column->changedProperties, function ($changedProperties) use ($column) { |
|
40 | + $column->changedProperties = array_filter($column->changedProperties, function($changedProperties) use ($column) { |
|
41 | 41 | if ($changedProperties !== 'default') { |
42 | 42 | return true; |
43 | 43 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | * @param string $tableName |
35 | 35 | */ |
36 | 36 | public function lockTable($tableName) { |
37 | - $this->conn->executeUpdate('LOCK TABLES `' .$tableName . '` WRITE'); |
|
37 | + $this->conn->executeUpdate('LOCK TABLES `'.$tableName.'` WRITE'); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | public function unlockTable() { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | public function fixupStatement($statement) { |
45 | - $statement = str_replace(' ILIKE ', ' COLLATE ' . $this->getCharset() . '_general_ci LIKE ', $statement); |
|
45 | + $statement = str_replace(' ILIKE ', ' COLLATE '.$this->getCharset().'_general_ci LIKE ', $statement); |
|
46 | 46 | return $statement; |
47 | 47 | } |
48 | 48 |
@@ -63,7 +63,7 @@ |
||
63 | 63 | * @return string |
64 | 64 | */ |
65 | 65 | private function buildTempDatabase() { |
66 | - $dataDir = $this->config->getSystemValue("datadirectory", \OC::$SERVERROOT . '/data'); |
|
66 | + $dataDir = $this->config->getSystemValue("datadirectory", \OC::$SERVERROOT.'/data'); |
|
67 | 67 | $tmpFile = uniqid("oc_"); |
68 | 68 | return "$dataDir/$tmpFile.db"; |
69 | 69 | } |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | public function enterNode(Node $node) { |
104 | 104 | if ($this->checkEqualOperatorUsage && $node instanceof Node\Expr\BinaryOp\Equal) { |
105 | - $this->errors[]= [ |
|
105 | + $this->errors[] = [ |
|
106 | 106 | 'disallowedToken' => '==', |
107 | 107 | 'errorCode' => CodeChecker::OP_OPERATOR_USAGE_DISCOURAGED, |
108 | 108 | 'line' => $node->getLine(), |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | ]; |
111 | 111 | } |
112 | 112 | if ($this->checkEqualOperatorUsage && $node instanceof Node\Expr\BinaryOp\NotEqual) { |
113 | - $this->errors[]= [ |
|
113 | + $this->errors[] = [ |
|
114 | 114 | 'disallowedToken' => '!=', |
115 | 115 | 'errorCode' => CodeChecker::OP_OPERATOR_USAGE_DISCOURAGED, |
116 | 116 | 'line' => $node->getLine(), |
@@ -214,28 +214,28 @@ discard block |
||
214 | 214 | $alias = strtolower($alias); |
215 | 215 | |
216 | 216 | foreach ($this->blackListedClassNames as $blackListedAlias => $blackListedClassName) { |
217 | - if (strpos($blackListedClassName, $name . '\\') === 0) { |
|
217 | + if (strpos($blackListedClassName, $name.'\\') === 0) { |
|
218 | 218 | $aliasedClassName = str_replace($name, $alias, $blackListedClassName); |
219 | 219 | $this->blackListedClassNames[$aliasedClassName] = $blackListedClassName; |
220 | 220 | } |
221 | 221 | } |
222 | 222 | |
223 | 223 | foreach ($this->blackListedConstants as $blackListedAlias => $blackListedConstant) { |
224 | - if (strpos($blackListedConstant, $name . '\\') === 0 || strpos($blackListedConstant, $name . '::') === 0) { |
|
224 | + if (strpos($blackListedConstant, $name.'\\') === 0 || strpos($blackListedConstant, $name.'::') === 0) { |
|
225 | 225 | $aliasedConstantName = str_replace($name, $alias, $blackListedConstant); |
226 | 226 | $this->blackListedConstants[$aliasedConstantName] = $blackListedConstant; |
227 | 227 | } |
228 | 228 | } |
229 | 229 | |
230 | 230 | foreach ($this->blackListedFunctions as $blackListedAlias => $blackListedFunction) { |
231 | - if (strpos($blackListedFunction, $name . '\\') === 0 || strpos($blackListedFunction, $name . '::') === 0) { |
|
231 | + if (strpos($blackListedFunction, $name.'\\') === 0 || strpos($blackListedFunction, $name.'::') === 0) { |
|
232 | 232 | $aliasedFunctionName = str_replace($name, $alias, $blackListedFunction); |
233 | 233 | $this->blackListedFunctions[$aliasedFunctionName] = $blackListedFunction; |
234 | 234 | } |
235 | 235 | } |
236 | 236 | |
237 | 237 | foreach ($this->blackListedMethods as $blackListedAlias => $blackListedMethod) { |
238 | - if (strpos($blackListedMethod, $name . '\\') === 0 || strpos($blackListedMethod, $name . '::') === 0) { |
|
238 | + if (strpos($blackListedMethod, $name.'\\') === 0 || strpos($blackListedMethod, $name.'::') === 0) { |
|
239 | 239 | $aliasedMethodName = str_replace($name, $alias, $blackListedMethod); |
240 | 240 | $this->blackListedMethods[$aliasedMethodName] = $blackListedMethod; |
241 | 241 | } |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | $lowerName = strtolower($name); |
247 | 247 | |
248 | 248 | if (isset($this->blackListedClassNames[$lowerName])) { |
249 | - $this->errors[]= [ |
|
249 | + $this->errors[] = [ |
|
250 | 250 | 'disallowedToken' => $name, |
251 | 251 | 'errorCode' => $errorCode, |
252 | 252 | 'line' => $node->getLine(), |
@@ -256,11 +256,11 @@ discard block |
||
256 | 256 | } |
257 | 257 | |
258 | 258 | private function checkBlackListConstant($class, $constantName, Node $node) { |
259 | - $name = $class . '::' . $constantName; |
|
259 | + $name = $class.'::'.$constantName; |
|
260 | 260 | $lowerName = strtolower($name); |
261 | 261 | |
262 | 262 | if (isset($this->blackListedConstants[$lowerName])) { |
263 | - $this->errors[]= [ |
|
263 | + $this->errors[] = [ |
|
264 | 264 | 'disallowedToken' => $name, |
265 | 265 | 'errorCode' => CodeChecker::CLASS_CONST_FETCH_NOT_ALLOWED, |
266 | 266 | 'line' => $node->getLine(), |
@@ -270,11 +270,11 @@ discard block |
||
270 | 270 | } |
271 | 271 | |
272 | 272 | private function checkBlackListFunction($class, $functionName, Node $node) { |
273 | - $name = $class . '::' . $functionName; |
|
273 | + $name = $class.'::'.$functionName; |
|
274 | 274 | $lowerName = strtolower($name); |
275 | 275 | |
276 | 276 | if (isset($this->blackListedFunctions[$lowerName])) { |
277 | - $this->errors[]= [ |
|
277 | + $this->errors[] = [ |
|
278 | 278 | 'disallowedToken' => $name, |
279 | 279 | 'errorCode' => CodeChecker::STATIC_CALL_NOT_ALLOWED, |
280 | 280 | 'line' => $node->getLine(), |
@@ -284,11 +284,11 @@ discard block |
||
284 | 284 | } |
285 | 285 | |
286 | 286 | private function checkBlackListMethod($class, $functionName, Node $node) { |
287 | - $name = $class . '::' . $functionName; |
|
287 | + $name = $class.'::'.$functionName; |
|
288 | 288 | $lowerName = strtolower($name); |
289 | 289 | |
290 | 290 | if (isset($this->blackListedMethods[$lowerName])) { |
291 | - $this->errors[]= [ |
|
291 | + $this->errors[] = [ |
|
292 | 292 | 'disallowedToken' => $name, |
293 | 293 | 'errorCode' => CodeChecker::CLASS_METHOD_CALL_NOT_ALLOWED, |
294 | 294 | 'line' => $node->getLine(), |
@@ -90,8 +90,8 @@ discard block |
||
90 | 90 | break; |
91 | 91 | |
92 | 92 | case 'openssl': |
93 | - $prettyVersion = preg_replace_callback('{^(?:OpenSSL\s*)?([0-9.]+)([a-z]?).*}', function ($match) { |
|
94 | - return $match[1] . (empty($match[2]) ? '' : '.' . (ord($match[2]) - 96)); |
|
93 | + $prettyVersion = preg_replace_callback('{^(?:OpenSSL\s*)?([0-9.]+)([a-z]?).*}', function($match) { |
|
94 | + return $match[1].(empty($match[2]) ? '' : '.'.(ord($match[2]) - 96)); |
|
95 | 95 | }, OPENSSL_VERSION_TEXT); |
96 | 96 | break; |
97 | 97 | |
@@ -166,19 +166,19 @@ discard block |
||
166 | 166 | return '9999999-dev'; |
167 | 167 | } |
168 | 168 | if ('dev-' === strtolower(substr($version, 0, 4))) { |
169 | - return 'dev-' . substr($version, 4); |
|
169 | + return 'dev-'.substr($version, 4); |
|
170 | 170 | } |
171 | 171 | // match classical versioning |
172 | - if (preg_match('{^v?(\d{1,3})(\.\d+)?(\.\d+)?(\.\d+)?' . self::$modifierRegex . '$}i', $version, $matches)) { |
|
172 | + if (preg_match('{^v?(\d{1,3})(\.\d+)?(\.\d+)?(\.\d+)?'.self::$modifierRegex.'$}i', $version, $matches)) { |
|
173 | 173 | $version = $matches[1] |
174 | 174 | . (!empty($matches[2]) ? $matches[2] : '.0') |
175 | 175 | . (!empty($matches[3]) ? $matches[3] : '.0') |
176 | 176 | . (!empty($matches[4]) ? $matches[4] : '.0'); |
177 | 177 | $index = 5; |
178 | - } elseif (preg_match('{^v?(\d{4}(?:[.:-]?\d{2}){1,6}(?:[.:-]?\d{1,3})?)' . self::$modifierRegex . '$}i', $version, $matches)) { // match date-based versioning |
|
178 | + } elseif (preg_match('{^v?(\d{4}(?:[.:-]?\d{2}){1,6}(?:[.:-]?\d{1,3})?)'.self::$modifierRegex.'$}i', $version, $matches)) { // match date-based versioning |
|
179 | 179 | $version = preg_replace('{\D}', '-', $matches[1]); |
180 | 180 | $index = 2; |
181 | - } elseif (preg_match('{^v?(\d{4,})(\.\d+)?(\.\d+)?(\.\d+)?' . self::$modifierRegex . '$}i', $version, $matches)) { |
|
181 | + } elseif (preg_match('{^v?(\d{4,})(\.\d+)?(\.\d+)?(\.\d+)?'.self::$modifierRegex.'$}i', $version, $matches)) { |
|
182 | 182 | $version = $matches[1] |
183 | 183 | . (!empty($matches[2]) ? $matches[2] : '.0') |
184 | 184 | . (!empty($matches[3]) ? $matches[3] : '.0') |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | if ('stable' === $matches[$index]) { |
192 | 192 | return $version; |
193 | 193 | } |
194 | - $version .= '-' . $this->expandStability($matches[$index]) . (!empty($matches[$index + 1]) ? $matches[$index + 1] : ''); |
|
194 | + $version .= '-'.$this->expandStability($matches[$index]).(!empty($matches[$index + 1]) ? $matches[$index + 1] : ''); |
|
195 | 195 | } |
196 | 196 | if (!empty($matches[$index + 2])) { |
197 | 197 | $version .= '-dev'; |
@@ -199,12 +199,12 @@ discard block |
||
199 | 199 | return $version; |
200 | 200 | } |
201 | 201 | $extraMessage = ''; |
202 | - if (preg_match('{ +as +' . preg_quote($version) . '$}', $fullVersion)) { |
|
203 | - $extraMessage = ' in "' . $fullVersion . '", the alias must be an exact version'; |
|
204 | - } elseif (preg_match('{^' . preg_quote($version) . ' +as +}', $fullVersion)) { |
|
205 | - $extraMessage = ' in "' . $fullVersion . '", the alias source must be an exact version, if it is a branch name you should prefix it with dev-'; |
|
202 | + if (preg_match('{ +as +'.preg_quote($version).'$}', $fullVersion)) { |
|
203 | + $extraMessage = ' in "'.$fullVersion.'", the alias must be an exact version'; |
|
204 | + } elseif (preg_match('{^'.preg_quote($version).' +as +}', $fullVersion)) { |
|
205 | + $extraMessage = ' in "'.$fullVersion.'", the alias source must be an exact version, if it is a branch name you should prefix it with dev-'; |
|
206 | 206 | } |
207 | - throw new \UnexpectedValueException('Invalid version string "' . $version . '"' . $extraMessage); |
|
207 | + throw new \UnexpectedValueException('Invalid version string "'.$version.'"'.$extraMessage); |
|
208 | 208 | } |
209 | 209 | |
210 | 210 | /** |