@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | $relation = parent::relation($relationName); |
| 53 | 53 | |
| 54 | 54 | if ($this->isDiscriminatedMapper() && $relation['type'] == Relation::BY_INHERITANCE) { |
| 55 | - throw new \RuntimeException('Relation type not allowed from relation "' . $relationName . '" in ' . $this->getEntityClass()); |
|
| 55 | + throw new \RuntimeException('Relation type not allowed from relation "'.$relationName.'" in '.$this->getEntityClass()); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | return $relation; |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | $discriminatorField = $this->metadata()->attributes[$this->discriminatorColumn]['field']; |
| 149 | 149 | |
| 150 | 150 | if (empty($data[$discriminatorField])) { |
| 151 | - throw new \Exception('Discriminator field "' . $discriminatorField . '" not found'); |
|
| 151 | + throw new \Exception('Discriminator field "'.$discriminatorField.'" not found'); |
|
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | return $data[$discriminatorField]; |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | public function getDiscriminatorType($discriminatorValue) |
| 167 | 167 | { |
| 168 | 168 | if (empty($this->discriminatorMap[$discriminatorValue])) { |
| 169 | - throw new \Exception('Unknown discriminator type "' . $discriminatorValue . '"'); |
|
| 169 | + throw new \Exception('Unknown discriminator type "'.$discriminatorValue.'"'); |
|
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | return $this->discriminatorMap[$discriminatorValue]; |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | $this->remove($attribute); |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | - $this->criteria[$filter] = $value; |
|
| 91 | + $this->criteria[$filter] = $value; |
|
| 92 | 92 | $this->inputs[$attribute][] = $filter; |
| 93 | 93 | } |
| 94 | 94 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | foreach ($data as $attribute => $value) { |
| 29 | - $method = 'set' . ucfirst($attribute); |
|
| 29 | + $method = 'set'.ucfirst($attribute); |
|
| 30 | 30 | $exists = property_exists($this, $attribute); |
| 31 | 31 | |
| 32 | 32 | if ($exists && $this->$attribute instanceof ImportableInterface && !$value instanceof ImportableInterface) { |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | return ''; |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - return 'namespace ' . $namespace . ';'; |
|
| 41 | + return 'namespace '.$namespace.';'; |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | /** |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | $out = ''; |
| 55 | 55 | |
| 56 | 56 | foreach ($names as $property) { |
| 57 | - $out .= $visibility.' $' . $property . ';'.$this->eol; |
|
| 57 | + $out .= $visibility.' $'.$property.';'.$this->eol; |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | return $out; |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | */ |
| 70 | 70 | public function simpleConstructor($properties) |
| 71 | 71 | { |
| 72 | - $parameters = implode(', ', array_map(function ($p) { return '$'.$p; }, $properties)); |
|
| 72 | + $parameters = implode(', ', array_map(function($p) { return '$'.$p; }, $properties)); |
|
| 73 | 73 | $content = ''; |
| 74 | 74 | |
| 75 | 75 | foreach ($properties as $property) { |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | $content .= $this->eol; |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - $content .= '$this->' . $property . ' = $' . $property . ';'; |
|
| 80 | + $content .= '$this->'.$property.' = $'.$property.';'; |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | { |
| 102 | 102 | $spaces = str_repeat($this->tab, $tabs); |
| 103 | 103 | |
| 104 | - return $spaces . str_replace($this->eol, $this->eol.$spaces, $code); |
|
| 104 | + return $spaces.str_replace($this->eol, $this->eol.$spaces, $code); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /** |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | * |
| 160 | 160 | * @return string |
| 161 | 161 | */ |
| 162 | - public function switch($varName, array $cases, $default = null) |
|
| 162 | + public function switch ($varName, array $cases, $default = null) |
|
| 163 | 163 | { |
| 164 | 164 | $code = 'switch ('.$varName.') {'.$this->eol; |
| 165 | 165 | |
@@ -724,13 +724,13 @@ |
||
| 724 | 724 | } |
| 725 | 725 | |
| 726 | 726 | $replacements = array( |
| 727 | - '<description>' => ucfirst($type).' '.$variableName, |
|
| 728 | - '<methodTypeHint>' => $methodTypeHint, |
|
| 729 | - '<variableType>' => $variableType, |
|
| 730 | - '<variableName>' => $variableName, |
|
| 731 | - '<methodName>' => $methodName, |
|
| 732 | - '<fieldName>' => $fieldName, |
|
| 733 | - '<variableDefault>' => ($defaultValue !== null ) ? (' = '.$defaultValue) : '' |
|
| 727 | + '<description>' => ucfirst($type).' '.$variableName, |
|
| 728 | + '<methodTypeHint>' => $methodTypeHint, |
|
| 729 | + '<variableType>' => $variableType, |
|
| 730 | + '<variableName>' => $variableName, |
|
| 731 | + '<methodName>' => $methodName, |
|
| 732 | + '<fieldName>' => $fieldName, |
|
| 733 | + '<variableDefault>' => ($defaultValue !== null ) ? (' = '.$defaultValue) : '' |
|
| 734 | 734 | ); |
| 735 | 735 | |
| 736 | 736 | $method = str_replace( |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | $body = str_replace('<spaces>', $this->spaces, $body); |
| 387 | 387 | $last = strrpos($currentCode, '}'); |
| 388 | 388 | |
| 389 | - return substr($currentCode, 0, $last) . $body . (strlen($body) > 0 ? "\n" : '') . "}\n"; |
|
| 389 | + return substr($currentCode, 0, $last).$body.(strlen($body) > 0 ? "\n" : '')."}\n"; |
|
| 390 | 390 | } |
| 391 | 391 | |
| 392 | 392 | /** |
@@ -395,7 +395,7 @@ discard block |
||
| 395 | 395 | protected function generateEntityNamespace(): string |
| 396 | 396 | { |
| 397 | 397 | if ($this->hasNamespace($this->mapperInfo->className())) { |
| 398 | - return 'namespace ' . $this->getNamespace($this->mapperInfo->className()) .';' . "\n\n"; |
|
| 398 | + return 'namespace '.$this->getNamespace($this->mapperInfo->className()).';'."\n\n"; |
|
| 399 | 399 | } |
| 400 | 400 | |
| 401 | 401 | return ''; |
@@ -411,18 +411,18 @@ discard block |
||
| 411 | 411 | $use = []; |
| 412 | 412 | |
| 413 | 413 | if ($this->hasNamespace($this->getClassToExtend())) { |
| 414 | - $use[$this->getClassToExtend()] = 'use ' . $this->getClassToExtend() . ';'; |
|
| 414 | + $use[$this->getClassToExtend()] = 'use '.$this->getClassToExtend().';'; |
|
| 415 | 415 | } |
| 416 | 416 | |
| 417 | 417 | foreach ($this->interfaces as $interface) { |
| 418 | 418 | if ($this->hasNamespace($interface)) { |
| 419 | - $use[$interface] = 'use ' . $interface . ';'; |
|
| 419 | + $use[$interface] = 'use '.$interface.';'; |
|
| 420 | 420 | } |
| 421 | 421 | } |
| 422 | 422 | |
| 423 | 423 | foreach ($this->traits as $trait) { |
| 424 | 424 | if ($this->hasNamespace($trait)) { |
| 425 | - $use[$trait] = 'use ' . $trait . ';'; |
|
| 425 | + $use[$trait] = 'use '.$trait.';'; |
|
| 426 | 426 | } |
| 427 | 427 | } |
| 428 | 428 | |
@@ -452,7 +452,7 @@ discard block |
||
| 452 | 452 | |
| 453 | 453 | sort($use); |
| 454 | 454 | |
| 455 | - return implode("\n", $use) . "\n\n"; |
|
| 455 | + return implode("\n", $use)."\n\n"; |
|
| 456 | 456 | } |
| 457 | 457 | |
| 458 | 458 | /** |
@@ -460,9 +460,9 @@ discard block |
||
| 460 | 460 | */ |
| 461 | 461 | protected function generateEntityClassName() |
| 462 | 462 | { |
| 463 | - return 'class ' . $this->getClassName($this->mapperInfo->className()) . |
|
| 464 | - ($this->classToExtend ? ' extends ' . $this->getClassToExtendName() : null) . |
|
| 465 | - ($this->interfaces ? ' implements ' . $this->getInterfacesToImplement() : null); |
|
| 463 | + return 'class '.$this->getClassName($this->mapperInfo->className()). |
|
| 464 | + ($this->classToExtend ? ' extends '.$this->getClassToExtendName() : null). |
|
| 465 | + ($this->interfaces ? ' implements '.$this->getInterfacesToImplement() : null); |
|
| 466 | 466 | } |
| 467 | 467 | |
| 468 | 468 | /** |
@@ -477,10 +477,10 @@ discard block |
||
| 477 | 477 | $traits = ''; |
| 478 | 478 | |
| 479 | 479 | foreach ($this->traits as $trait) { |
| 480 | - $traits .= $this->spaces . 'use ' . $this->getRelativeClassName($trait) . ';' . "\n"; |
|
| 480 | + $traits .= $this->spaces.'use '.$this->getRelativeClassName($trait).';'."\n"; |
|
| 481 | 481 | } |
| 482 | 482 | |
| 483 | - return $traits . "\n"; |
|
| 483 | + return $traits."\n"; |
|
| 484 | 484 | } |
| 485 | 485 | |
| 486 | 486 | /** |
@@ -585,7 +585,7 @@ discard block |
||
| 585 | 585 | { |
| 586 | 586 | $lines = array(); |
| 587 | 587 | $lines[] = '/**'; |
| 588 | - $lines[] = ' * ' . $this->getClassName($this->mapperInfo->className()); |
|
| 588 | + $lines[] = ' * '.$this->getClassName($this->mapperInfo->className()); |
|
| 589 | 589 | $lines[] = ' */'; |
| 590 | 590 | |
| 591 | 591 | return implode("\n", $lines); |
@@ -685,7 +685,7 @@ discard block |
||
| 685 | 685 | |
| 686 | 686 | if (!$property->isRelation()) { |
| 687 | 687 | $lines[] = $this->generateEmbeddedPropertyDocBlock($property); |
| 688 | - $lines[] = $this->spaces . $this->fieldVisibility . $this->getPropertyTypeHintForObject($property) . ' $'.$property->name().";\n"; |
|
| 688 | + $lines[] = $this->spaces.$this->fieldVisibility.$this->getPropertyTypeHintForObject($property).' $'.$property->name().";\n"; |
|
| 689 | 689 | } else { |
| 690 | 690 | $name = $property->name(); |
| 691 | 691 | $default = ''; |
@@ -701,7 +701,7 @@ discard block |
||
| 701 | 701 | } |
| 702 | 702 | |
| 703 | 703 | $lines[] = $this->generateEmbeddedPropertyDocBlock($property); |
| 704 | - $lines[] = $this->spaces . $this->fieldVisibility . $this->getPropertyTypeHintForObject($property) . ' $' . $name . $default .";\n"; |
|
| 704 | + $lines[] = $this->spaces.$this->fieldVisibility.$this->getPropertyTypeHintForObject($property).' $'.$name.$default.";\n"; |
|
| 705 | 705 | } |
| 706 | 706 | } |
| 707 | 707 | |
@@ -729,7 +729,7 @@ discard block |
||
| 729 | 729 | $variableName = $this->inflector->camelize($fieldName); |
| 730 | 730 | $methodName = $variableName; |
| 731 | 731 | } else { |
| 732 | - $methodName = $type . $this->inflector->classify($fieldName); |
|
| 732 | + $methodName = $type.$this->inflector->classify($fieldName); |
|
| 733 | 733 | $variableName = $this->inflector->camelize($fieldName); |
| 734 | 734 | } |
| 735 | 735 | |
@@ -747,7 +747,7 @@ discard block |
||
| 747 | 747 | if ($propertyInfo->isObject()) { |
| 748 | 748 | /** @var ObjectPropertyInfo $propertyInfo */ |
| 749 | 749 | $variableType = $this->getRelativeClassName($propertyInfo->className()); |
| 750 | - $methodTypeHint = $variableType.' '; |
|
| 750 | + $methodTypeHint = $variableType.' '; |
|
| 751 | 751 | } else { |
| 752 | 752 | /** @var PropertyInfo $propertyInfo */ |
| 753 | 753 | $variableType = $propertyInfo->phpType(); |
@@ -778,7 +778,7 @@ discard block |
||
| 778 | 778 | '<variableName>' => $variableName, |
| 779 | 779 | '<methodName>' => $methodName, |
| 780 | 780 | '<fieldName>' => $fieldName, |
| 781 | - '<variableDefault>' => ($defaultValue !== null ) ? (' = '.$defaultValue) : '' |
|
| 781 | + '<variableDefault>' => ($defaultValue !== null) ? (' = '.$defaultValue) : '' |
|
| 782 | 782 | ); |
| 783 | 783 | |
| 784 | 784 | $method = str_replace( |
@@ -853,9 +853,9 @@ discard block |
||
| 853 | 853 | protected function generateFieldMappingPropertyDocBlock($property) |
| 854 | 854 | { |
| 855 | 855 | $lines = array(); |
| 856 | - $lines[] = $this->spaces . '/**'; |
|
| 857 | - $lines[] = $this->spaces . ' * @var '.$property->phpType(); |
|
| 858 | - $lines[] = $this->spaces . ' */'; |
|
| 856 | + $lines[] = $this->spaces.'/**'; |
|
| 857 | + $lines[] = $this->spaces.' * @var '.$property->phpType(); |
|
| 858 | + $lines[] = $this->spaces.' */'; |
|
| 859 | 859 | |
| 860 | 860 | return implode("\n", $lines); |
| 861 | 861 | } |
@@ -884,9 +884,9 @@ discard block |
||
| 884 | 884 | } |
| 885 | 885 | |
| 886 | 886 | $lines = array(); |
| 887 | - $lines[] = $this->spaces . '/**'; |
|
| 888 | - $lines[] = $this->spaces . ' * @var '.$className; |
|
| 889 | - $lines[] = $this->spaces . ' */'; |
|
| 887 | + $lines[] = $this->spaces.'/**'; |
|
| 888 | + $lines[] = $this->spaces.' * @var '.$className; |
|
| 889 | + $lines[] = $this->spaces.' */'; |
|
| 890 | 890 | |
| 891 | 891 | return implode("\n", $lines); |
| 892 | 892 | } |
@@ -927,7 +927,7 @@ discard block |
||
| 927 | 927 | |
| 928 | 928 | if ($inClass) { |
| 929 | 929 | $inClass = false; |
| 930 | - $lastSeenClass = $lastSeenNamespace . ($lastSeenNamespace ? '\\' : '') . $token[1]; |
|
| 930 | + $lastSeenClass = $lastSeenNamespace.($lastSeenNamespace ? '\\' : '').$token[1]; |
|
| 931 | 931 | $this->staticReflection[$lastSeenClass]['properties'] = array(); |
| 932 | 932 | $this->staticReflection[$lastSeenClass]['methods'] = array(); |
| 933 | 933 | } |
@@ -935,16 +935,16 @@ discard block |
||
| 935 | 935 | if ($token[0] == T_NAMESPACE) { |
| 936 | 936 | $lastSeenNamespace = ""; |
| 937 | 937 | $inNamespace = true; |
| 938 | - } elseif ($token[0] == T_CLASS && $tokens[$i-1][0] != T_DOUBLE_COLON) { |
|
| 938 | + } elseif ($token[0] == T_CLASS && $tokens[$i - 1][0] != T_DOUBLE_COLON) { |
|
| 939 | 939 | $inClass = true; |
| 940 | 940 | } elseif ($token[0] == T_FUNCTION) { |
| 941 | - if ($tokens[$i+2][0] == T_STRING) { |
|
| 942 | - $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+2][1]); |
|
| 943 | - } elseif ($tokens[$i+2] == "&" && $tokens[$i+3][0] == T_STRING) { |
|
| 944 | - $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+3][1]); |
|
| 941 | + if ($tokens[$i + 2][0] == T_STRING) { |
|
| 942 | + $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 2][1]); |
|
| 943 | + } elseif ($tokens[$i + 2] == "&" && $tokens[$i + 3][0] == T_STRING) { |
|
| 944 | + $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 3][1]); |
|
| 945 | 945 | } |
| 946 | - } elseif (in_array($token[0], array(T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED)) && $tokens[$i+2][0] != T_FUNCTION) { |
|
| 947 | - $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i+2][1], 1); |
|
| 946 | + } elseif (in_array($token[0], array(T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED)) && $tokens[$i + 2][0] != T_FUNCTION) { |
|
| 947 | + $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i + 2][1], 1); |
|
| 948 | 948 | } |
| 949 | 949 | } |
| 950 | 950 | } |
@@ -1019,7 +1019,7 @@ discard block |
||
| 1019 | 1019 | if ($this->hasNamespace($className)) { |
| 1020 | 1020 | return $this->getClassName($className); |
| 1021 | 1021 | } else { |
| 1022 | - return '\\' . $className; |
|
| 1022 | + return '\\'.$className; |
|
| 1023 | 1023 | } |
| 1024 | 1024 | } |
| 1025 | 1025 | |
@@ -1120,8 +1120,8 @@ discard block |
||
| 1120 | 1120 | $lines = explode("\n", $code); |
| 1121 | 1121 | |
| 1122 | 1122 | foreach ($lines as $key => $value) { |
| 1123 | - if ( ! empty($value)) { |
|
| 1124 | - $lines[$key] = str_repeat($this->spaces, $num) . $lines[$key]; |
|
| 1123 | + if (!empty($value)) { |
|
| 1124 | + $lines[$key] = str_repeat($this->spaces, $num).$lines[$key]; |
|
| 1125 | 1125 | } |
| 1126 | 1126 | } |
| 1127 | 1127 | |
@@ -1150,7 +1150,7 @@ discard block |
||
| 1150 | 1150 | } |
| 1151 | 1151 | |
| 1152 | 1152 | if (is_string($value)) { |
| 1153 | - return "'" . $value . "'"; |
|
| 1153 | + return "'".$value."'"; |
|
| 1154 | 1154 | } |
| 1155 | 1155 | |
| 1156 | 1156 | if (is_bool($value)) { |
@@ -1183,7 +1183,7 @@ discard block |
||
| 1183 | 1183 | $type = self::PROPERTY_TYPE_MAP[$type] ?? $type; |
| 1184 | 1184 | } |
| 1185 | 1185 | |
| 1186 | - return ($nullable ? '?' : '') . $type; |
|
| 1186 | + return ($nullable ? '?' : '').$type; |
|
| 1187 | 1187 | } |
| 1188 | 1188 | |
| 1189 | 1189 | /** |
@@ -1202,7 +1202,7 @@ discard block |
||
| 1202 | 1202 | return ''; |
| 1203 | 1203 | } |
| 1204 | 1204 | |
| 1205 | - return ' ' . $this->getPropertyTypeHint($property->phpType(), $property->isNullable()); |
|
| 1205 | + return ' '.$this->getPropertyTypeHint($property->phpType(), $property->isNullable()); |
|
| 1206 | 1206 | } |
| 1207 | 1207 | |
| 1208 | 1208 | /** |
@@ -1236,7 +1236,7 @@ discard block |
||
| 1236 | 1236 | } |
| 1237 | 1237 | } |
| 1238 | 1238 | |
| 1239 | - return ' ' . $this->getPropertyTypeHint($type, $property->isRelation()); |
|
| 1239 | + return ' '.$this->getPropertyTypeHint($type, $property->isRelation()); |
|
| 1240 | 1240 | } |
| 1241 | 1241 | |
| 1242 | 1242 | //---------------------- mutators |
@@ -1366,7 +1366,7 @@ discard block |
||
| 1366 | 1366 | public function setFieldVisibility(string $visibility): void |
| 1367 | 1367 | { |
| 1368 | 1368 | if ($visibility !== static::FIELD_VISIBLE_PRIVATE && $visibility !== static::FIELD_VISIBLE_PROTECTED) { |
| 1369 | - throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): ' . $visibility); |
|
| 1369 | + throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): '.$visibility); |
|
| 1370 | 1370 | } |
| 1371 | 1371 | |
| 1372 | 1372 | $this->fieldVisibility = $visibility; |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | * |
| 40 | 40 | * @param string $type |
| 41 | 41 | */ |
| 42 | - public function declare(string $type): void |
|
| 42 | + public function declare(string$type): void |
|
| 43 | 43 | { |
| 44 | 44 | if (isset($this->declaredTypes[$type])) { |
| 45 | 45 | return; |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | |
| 65 | 65 | // Replace 'adapter' with 'driver' and add 'pdo_' |
| 66 | 66 | if (isset($parameters['adapter'])) { |
| 67 | - $parameters['driver'] = 'pdo_' . $parameters['adapter']; |
|
| 67 | + $parameters['driver'] = 'pdo_'.$parameters['adapter']; |
|
| 68 | 68 | unset($parameters['adapter']); |
| 69 | 69 | } |
| 70 | 70 | |
@@ -44,8 +44,8 @@ |
||
| 44 | 44 | { |
| 45 | 45 | if ($this->cacheKey === null) { |
| 46 | 46 | $this->cacheKey = new CacheKey( |
| 47 | - function () { return $this->cacheNamespace(); }, |
|
| 48 | - $key ?? function () { return $this->cacheKey(); }, |
|
| 47 | + function() { return $this->cacheNamespace(); }, |
|
| 48 | + $key ?? function() { return $this->cacheKey(); }, |
|
| 49 | 49 | $lifetime |
| 50 | 50 | ); |
| 51 | 51 | |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | foreach ($query->statements['tables'] as $table) { |
| 187 | 187 | return $query->state()->compiled = 'UPDATE ' |
| 188 | 188 | . $this->quoteIdentifier($query, $table['table']) |
| 189 | - . ' SET ' . implode(', ', $values) |
|
| 189 | + . ' SET '.implode(', ', $values) |
|
| 190 | 190 | . $this->compileWhere($query) |
| 191 | 191 | ; |
| 192 | 192 | } |
@@ -524,7 +524,7 @@ discard block |
||
| 524 | 524 | $from['sql'] = $this->quoteIdentifier($query, $databasePrefix.$from['table']); |
| 525 | 525 | $compiled[$from['table']] = $from; |
| 526 | 526 | } else { |
| 527 | - $from['sql'] = $this->quoteIdentifier($query, $databasePrefix.$from['table']) . ' ' . $this->quoteIdentifier($query, $from['alias']); |
|
| 527 | + $from['sql'] = $this->quoteIdentifier($query, $databasePrefix.$from['table']).' '.$this->quoteIdentifier($query, $from['alias']); |
|
| 528 | 528 | $compiled[$from['alias']] = $from; |
| 529 | 529 | } |
| 530 | 530 | } |
@@ -697,7 +697,7 @@ discard block |
||
| 697 | 697 | if (is_array($value)) { |
| 698 | 698 | return $this->compileIntoExpression($query, $value, $column, 'REGEXP', $converted); |
| 699 | 699 | } |
| 700 | - return $this->quoteIdentifier($query, $column).' REGEXP '.$this->compileExpressionValue($query, (string)$value, $converted); |
|
| 700 | + return $this->quoteIdentifier($query, $column).' REGEXP '.$this->compileExpressionValue($query, (string) $value, $converted); |
|
| 701 | 701 | |
| 702 | 702 | // LIKE |
| 703 | 703 | case ':like': |
@@ -770,7 +770,7 @@ discard block |
||
| 770 | 770 | |
| 771 | 771 | // Unsupported operator |
| 772 | 772 | default: |
| 773 | - throw new UnexpectedValueException("Unsupported operator '" . $operator . "' in WHERE clause"); |
|
| 773 | + throw new UnexpectedValueException("Unsupported operator '".$operator."' in WHERE clause"); |
|
| 774 | 774 | } |
| 775 | 775 | } |
| 776 | 776 | |
@@ -858,7 +858,7 @@ discard block |
||
| 858 | 858 | $sql = '('.$this->compileSelect($query).')'; |
| 859 | 859 | |
| 860 | 860 | if ($alias) { |
| 861 | - $sql = $sql . ' as ' . $this->quoteIdentifier($clause, $alias); |
|
| 861 | + $sql = $sql.' as '.$this->quoteIdentifier($clause, $alias); |
|
| 862 | 862 | } |
| 863 | 863 | |
| 864 | 864 | $this->addQueryBindings($clause, $query); |
@@ -1016,12 +1016,12 @@ discard block |
||
| 1016 | 1016 | if ($lock !== null && !$query->statements['aggregate']) { |
| 1017 | 1017 | // Lock for update |
| 1018 | 1018 | if ($lock === LockMode::PESSIMISTIC_WRITE) { |
| 1019 | - return ' ' . $this->platform()->grammar()->getWriteLockSQL(); |
|
| 1019 | + return ' '.$this->platform()->grammar()->getWriteLockSQL(); |
|
| 1020 | 1020 | } |
| 1021 | 1021 | |
| 1022 | 1022 | // Shared Lock: other process can read the row but not update it. |
| 1023 | 1023 | if ($lock === LockMode::PESSIMISTIC_READ) { |
| 1024 | - return ' ' . $this->platform()->grammar()->getReadLockSQL(); |
|
| 1024 | + return ' '.$this->platform()->grammar()->getReadLockSQL(); |
|
| 1025 | 1025 | } |
| 1026 | 1026 | } |
| 1027 | 1027 | |