@@ -50,7 +50,7 @@ |
||
| 50 | 50 | && stripos($url, 'http://') === false && stripos($url, 'https://') === false |
| 51 | 51 | ) { |
| 52 | 52 | //Forcing scheme (not super great idea) |
| 53 | - $url = 'http://' . $url; |
|
| 53 | + $url = 'http://'.$url; |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | return (bool)filter_var($url, FILTER_VALIDATE_URL); |
@@ -14,9 +14,9 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | class ImageChecker extends FileChecker implements SingletonInterface |
| 16 | 16 | { |
| 17 | - /** |
|
| 18 | - * Getimagesize constants. |
|
| 19 | - */ |
|
| 17 | + /** |
|
| 18 | + * Getimagesize constants. |
|
| 19 | + */ |
|
| 20 | 20 | const WIDTH = 0; |
| 21 | 21 | const HEIGHT = 1; |
| 22 | 22 | const IMAGE_TYPE = 2; |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | if ($this->isCloseTag($token)) { |
| 72 | 72 | $blockID = $this->uniqueID(); |
| 73 | 73 | |
| 74 | - $this->phpBlocks[$blockID] = $phpBlock . $token[1]; |
|
| 74 | + $this->phpBlocks[$blockID] = $phpBlock.$token[1]; |
|
| 75 | 75 | $isolated .= $this->placeholder($blockID); |
| 76 | 76 | |
| 77 | 77 | $phpBlock = ''; |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | { |
| 145 | 145 | return preg_replace_callback( |
| 146 | 146 | $this->blockRegex(), |
| 147 | - function ($match) { |
|
| 147 | + function($match) { |
|
| 148 | 148 | if (!isset($this->phpBlocks[$match['id']])) { |
| 149 | 149 | return $match[0]; |
| 150 | 150 | } |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | */ |
| 181 | 181 | private function blockRegex() |
| 182 | 182 | { |
| 183 | - return '/' . |
|
| 183 | + return '/'. |
|
| 184 | 184 | preg_quote($this->prefix) |
| 185 | 185 | . '(?P<id>[0-9a-z]+)' |
| 186 | 186 | . preg_quote($this->postfix) |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | */ |
| 193 | 193 | private function uniqueID() |
| 194 | 194 | { |
| 195 | - return md5(count($this->phpBlocks) . uniqid(true)); |
|
| 195 | + return md5(count($this->phpBlocks).uniqid(true)); |
|
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | /** |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | */ |
| 202 | 202 | private function placeholder($blockID) |
| 203 | 203 | { |
| 204 | - return $this->prefix . $blockID . $this->postfix; |
|
| 204 | + return $this->prefix.$blockID.$this->postfix; |
|
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | /** |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | |
| 402 | 402 | $name = $this->tokens[$localID][self::TOKEN_CODE]; |
| 403 | 403 | if (!empty($namespace = $this->activeNamespace($tokenID))) { |
| 404 | - $name = $namespace . self::NS_SEPARATOR . $name; |
|
| 404 | + $name = $namespace.self::NS_SEPARATOR.$name; |
|
| 405 | 405 | } |
| 406 | 406 | |
| 407 | 407 | $this->functions[$name] = [ |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | |
| 427 | 427 | $name = $this->tokens[$localID][self::TOKEN_CODE]; |
| 428 | 428 | if (!empty($namespace = $this->activeNamespace($tokenID))) { |
| 429 | - $name = $namespace . self::NS_SEPARATOR . $name; |
|
| 429 | + $name = $namespace.self::NS_SEPARATOR.$name; |
|
| 430 | 430 | } |
| 431 | 431 | |
| 432 | 432 | $this->declarations[token_name($tokenType)][$name] = [ |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | |
| 40 | 40 | $name = $context->getName(); |
| 41 | 41 | if ($context instanceof \ReflectionMethod) { |
| 42 | - $name = $context->class . '::' . $name; |
|
| 42 | + $name = $context->class.'::'.$name; |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | parent::__construct("Unable to resolve '{$parameter->name}' argument in '{$name}'."); |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | { |
| 325 | 325 | $statement = ''; |
| 326 | 326 | foreach ($joinTokens as $table => $join) { |
| 327 | - $statement .= "\n" . $join['type'] . ' JOIN ' . $this->quote($table, true); |
|
| 327 | + $statement .= "\n".$join['type'].' JOIN '.$this->quote($table, true); |
|
| 328 | 328 | $statement .= $this->optional("\n ON", $this->compileWhere($join['on'])); |
| 329 | 329 | } |
| 330 | 330 | |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | { |
| 364 | 364 | $result = []; |
| 365 | 365 | foreach ($ordering as $order) { |
| 366 | - $result[] = $this->quote($order[0]) . ' ' . strtoupper($order[1]); |
|
| 366 | + $result[] = $this->quote($order[0]).' '.strtoupper($order[1]); |
|
| 367 | 367 | } |
| 368 | 368 | |
| 369 | 369 | return join(', ', $result); |
@@ -525,7 +525,7 @@ discard block |
||
| 525 | 525 | $prefix .= ' '; |
| 526 | 526 | } |
| 527 | 527 | |
| 528 | - return $prefix . $expression . $postfix; |
|
| 528 | + return $prefix.$expression.$postfix; |
|
| 529 | 529 | } |
| 530 | 530 | |
| 531 | 531 | /** |
@@ -581,7 +581,7 @@ discard block |
||
| 581 | 581 | { |
| 582 | 582 | if ($context instanceof QueryBuilder) { |
| 583 | 583 | //Nested queries has to be wrapped with braces |
| 584 | - return '(' . $context->sqlStatement($this) . ')'; |
|
| 584 | + return '('.$context->sqlStatement($this).')'; |
|
| 585 | 585 | } |
| 586 | 586 | |
| 587 | 587 | if ($context instanceof ExpressionInterface) { |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | */ |
| 281 | 281 | public function identifier($identifier) |
| 282 | 282 | { |
| 283 | - return $identifier == '*' ? '*' : '"' . str_replace('"', '""', $identifier) . '"'; |
|
| 283 | + return $identifier == '*' ? '*' : '"'.str_replace('"', '""', $identifier).'"'; |
|
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | /** |
@@ -576,7 +576,7 @@ discard block |
||
| 576 | 576 | protected function savepointCreate($name) |
| 577 | 577 | { |
| 578 | 578 | $this->logger()->info("Creating savepoint '{$name}'."); |
| 579 | - $this->statement("SAVEPOINT " . $this->identifier("SVP{$name}")); |
|
| 579 | + $this->statement("SAVEPOINT ".$this->identifier("SVP{$name}")); |
|
| 580 | 580 | } |
| 581 | 581 | |
| 582 | 582 | /** |
@@ -589,7 +589,7 @@ discard block |
||
| 589 | 589 | protected function savepointRelease($name) |
| 590 | 590 | { |
| 591 | 591 | $this->logger()->info("Releasing savepoint '{$name}'."); |
| 592 | - $this->statement("RELEASE SAVEPOINT " . $this->identifier("SVP{$name}")); |
|
| 592 | + $this->statement("RELEASE SAVEPOINT ".$this->identifier("SVP{$name}")); |
|
| 593 | 593 | } |
| 594 | 594 | |
| 595 | 595 | /** |
@@ -602,7 +602,7 @@ discard block |
||
| 602 | 602 | protected function savepointRollback($name) |
| 603 | 603 | { |
| 604 | 604 | $this->logger()->info("Rolling back savepoint '{$name}'."); |
| 605 | - $this->statement("ROLLBACK TO SAVEPOINT " . $this->identifier("SVP{$name}")); |
|
| 605 | + $this->statement("ROLLBACK TO SAVEPOINT ".$this->identifier("SVP{$name}")); |
|
| 606 | 606 | } |
| 607 | 607 | |
| 608 | 608 | /** |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | */ |
| 92 | 92 | protected function expression($identifier) |
| 93 | 93 | { |
| 94 | - return preg_replace_callback('/([a-z][0-9_a-z\.]*\(?)/i', function ($match) { |
|
| 94 | + return preg_replace_callback('/([a-z][0-9_a-z\.]*\(?)/i', function($match) { |
|
| 95 | 95 | $identifier = $match[1]; |
| 96 | 96 | |
| 97 | 97 | //Function name |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | */ |
| 114 | 114 | protected function aliasing($identifier, $alias, $table) |
| 115 | 115 | { |
| 116 | - $quoted = $this->quote($identifier, $table) . ' AS ' . $this->driver->identifier($alias); |
|
| 116 | + $quoted = $this->quote($identifier, $table).' AS '.$this->driver->identifier($alias); |
|
| 117 | 117 | |
| 118 | 118 | if ($table && strpos($identifier, '.') === false) { |
| 119 | 119 | //We have to apply operation post factum to prevent self aliasing (name AS name) |
@@ -148,12 +148,12 @@ discard block |
||
| 148 | 148 | protected function unpaired($identifier, $table) |
| 149 | 149 | { |
| 150 | 150 | if ($table && !isset($this->aliases[$identifier])) { |
| 151 | - if (!isset($this->aliases[$this->prefix . $identifier])) { |
|
| 151 | + if (!isset($this->aliases[$this->prefix.$identifier])) { |
|
| 152 | 152 | //Generating our alias |
| 153 | - $this->aliases[$this->prefix . $identifier] = $identifier; |
|
| 153 | + $this->aliases[$this->prefix.$identifier] = $identifier; |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | - $identifier = $this->prefix . $identifier; |
|
| 156 | + $identifier = $this->prefix.$identifier; |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | return $this->driver->identifier($identifier); |
@@ -99,10 +99,10 @@ |
||
| 99 | 99 | case "double": |
| 100 | 100 | return sprintf('%F', $parameter); |
| 101 | 101 | case "string": |
| 102 | - return "'" . addcslashes($parameter, "'") . "'"; |
|
| 102 | + return "'".addcslashes($parameter, "'")."'"; |
|
| 103 | 103 | case 'object': |
| 104 | 104 | if (method_exists($parameter, '__toString')) { |
| 105 | - return "'" . addcslashes((string)$parameter, "'") . "'"; |
|
| 105 | + return "'".addcslashes((string)$parameter, "'")."'"; |
|
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | 108 | |