@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | { |
| 102 | 102 | $versions = $this->all(); |
| 103 | 103 | |
| 104 | - return (string)end($versions); |
|
| 104 | + return (string) end($versions); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /** |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | $schemaManager = $this->connection->schema(); |
| 189 | 189 | |
| 190 | 190 | if (!$schemaManager instanceof TableManagerInterface) { |
| 191 | - throw new \LogicException('The connection "' . $this->connection->getName() . '" do not supports table configuration'); |
|
| 191 | + throw new \LogicException('The connection "'.$this->connection->getName().'" do not supports table configuration'); |
|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | $schemaManager->table($this->tableName, function($table) { |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | private function createHydrator(string $className): Closure |
| 79 | 79 | { |
| 80 | 80 | /** @var Closure(array<string, mixed>, T):void */ |
| 81 | - return Closure::bind(static function (array $row, object $entity) { |
|
| 81 | + return Closure::bind(static function(array $row, object $entity) { |
|
| 82 | 82 | foreach ($row as $property => $value) { |
| 83 | 83 | $entity->$property = $value; |
| 84 | 84 | } |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | return $this->asClass($options); |
| 61 | 61 | |
| 62 | 62 | default: |
| 63 | - throw new DBALException('Unsupported fetch mode ' . $mode); |
|
| 63 | + throw new DBALException('Unsupported fetch mode '.$mode); |
|
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | return new UpdateResultSet((int) $this->executeStatement($statement, $query->getBindings())); |
| 296 | 296 | } catch (DriverException $e) { |
| 297 | 297 | throw new QueryExecutionException( |
| 298 | - 'Error on execute : ' . $e->getMessage(), |
|
| 298 | + 'Error on execute : '.$e->getMessage(), |
|
| 299 | 299 | $e->getCode(), |
| 300 | 300 | $e, |
| 301 | 301 | $e->getQuery() ? $e->getQuery()->getSQL() : null, |
@@ -448,7 +448,7 @@ discard block |
||
| 448 | 448 | } |
| 449 | 449 | } catch (DriverException $e) { |
| 450 | 450 | throw new QueryExecutionException( |
| 451 | - 'Error on execute : ' . $e->getMessage(), |
|
| 451 | + 'Error on execute : '.$e->getMessage(), |
|
| 452 | 452 | $e->getCode(), |
| 453 | 453 | $e, |
| 454 | 454 | $e->getQuery() ? $e->getQuery()->getSQL() : null, |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | $values = []; |
| 47 | 47 | $attributes = array_flip($attributes); |
| 48 | 48 | |
| 49 | - $privatePrefix = "\0" . get_class($object) . "\0"; |
|
| 49 | + $privatePrefix = "\0".get_class($object)."\0"; |
|
| 50 | 50 | $privatePrefixLen = strlen($privatePrefix); |
| 51 | 51 | |
| 52 | 52 | foreach ((array) $object as $name => $property) { |
@@ -83,13 +83,13 @@ discard block |
||
| 83 | 83 | return $this->hydratorsCache[$entityClass]; |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - $hydrator = static function ($object, array $data): void { |
|
| 86 | + $hydrator = static function($object, array $data): void { |
|
| 87 | 87 | foreach ($data as $property => $value) { |
| 88 | 88 | try { |
| 89 | 89 | if (isset($object->$property) && $object->$property instanceof ImportableInterface && is_array($value)) { |
| 90 | 90 | $object->$property->import($value); |
| 91 | - } elseif (method_exists($object, 'set' . ucfirst($property))) { |
|
| 92 | - $object->{'set' . ucfirst($property)}($value); |
|
| 91 | + } elseif (method_exists($object, 'set'.ucfirst($property))) { |
|
| 92 | + $object->{'set'.ucfirst($property)}($value); |
|
| 93 | 93 | } elseif (property_exists($object, $property)) { |
| 94 | 94 | $object->$property = $value; |
| 95 | 95 | } |
@@ -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 (($parentClass = $this->getClassToExtend()) && $this->hasNamespace($parentClass)) { |
| 414 | - $use[$parentClass] = 'use ' . $parentClass . ';'; |
|
| 414 | + $use[$parentClass] = 'use '.$parentClass.';'; |
|
| 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( |
@@ -854,9 +854,9 @@ discard block |
||
| 854 | 854 | protected function generateFieldMappingPropertyDocBlock($property) |
| 855 | 855 | { |
| 856 | 856 | $lines = array(); |
| 857 | - $lines[] = $this->spaces . '/**'; |
|
| 858 | - $lines[] = $this->spaces . ' * @var '.$property->phpType(); |
|
| 859 | - $lines[] = $this->spaces . ' */'; |
|
| 857 | + $lines[] = $this->spaces.'/**'; |
|
| 858 | + $lines[] = $this->spaces.' * @var '.$property->phpType(); |
|
| 859 | + $lines[] = $this->spaces.' */'; |
|
| 860 | 860 | |
| 861 | 861 | return implode("\n", $lines); |
| 862 | 862 | } |
@@ -885,9 +885,9 @@ discard block |
||
| 885 | 885 | } |
| 886 | 886 | |
| 887 | 887 | $lines = array(); |
| 888 | - $lines[] = $this->spaces . '/**'; |
|
| 889 | - $lines[] = $this->spaces . ' * @var '.$className; |
|
| 890 | - $lines[] = $this->spaces . ' */'; |
|
| 888 | + $lines[] = $this->spaces.'/**'; |
|
| 889 | + $lines[] = $this->spaces.' * @var '.$className; |
|
| 890 | + $lines[] = $this->spaces.' */'; |
|
| 891 | 891 | |
| 892 | 892 | return implode("\n", $lines); |
| 893 | 893 | } |
@@ -928,7 +928,7 @@ discard block |
||
| 928 | 928 | |
| 929 | 929 | if ($inClass) { |
| 930 | 930 | $inClass = false; |
| 931 | - $lastSeenClass = $lastSeenNamespace . ($lastSeenNamespace ? '\\' : '') . $token[1]; |
|
| 931 | + $lastSeenClass = $lastSeenNamespace.($lastSeenNamespace ? '\\' : '').$token[1]; |
|
| 932 | 932 | $this->staticReflection[$lastSeenClass]['properties'] = array(); |
| 933 | 933 | $this->staticReflection[$lastSeenClass]['methods'] = array(); |
| 934 | 934 | } |
@@ -936,16 +936,16 @@ discard block |
||
| 936 | 936 | if ($token[0] == T_NAMESPACE) { |
| 937 | 937 | $lastSeenNamespace = ""; |
| 938 | 938 | $inNamespace = true; |
| 939 | - } elseif ($token[0] == T_CLASS && $tokens[$i-1][0] != T_DOUBLE_COLON) { |
|
| 939 | + } elseif ($token[0] == T_CLASS && $tokens[$i - 1][0] != T_DOUBLE_COLON) { |
|
| 940 | 940 | $inClass = true; |
| 941 | 941 | } elseif ($token[0] == T_FUNCTION) { |
| 942 | - if ($tokens[$i+2][0] == T_STRING) { |
|
| 943 | - $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+2][1]); |
|
| 944 | - } elseif ($tokens[$i+2] == "&" && $tokens[$i+3][0] == T_STRING) { |
|
| 945 | - $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+3][1]); |
|
| 942 | + if ($tokens[$i + 2][0] == T_STRING) { |
|
| 943 | + $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 2][1]); |
|
| 944 | + } elseif ($tokens[$i + 2] == "&" && $tokens[$i + 3][0] == T_STRING) { |
|
| 945 | + $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 3][1]); |
|
| 946 | 946 | } |
| 947 | - } elseif (in_array($token[0], array(T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED)) && $tokens[$i+2][0] != T_FUNCTION) { |
|
| 948 | - $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i+2][1], 1); |
|
| 947 | + } elseif (in_array($token[0], array(T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED)) && $tokens[$i + 2][0] != T_FUNCTION) { |
|
| 948 | + $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i + 2][1], 1); |
|
| 949 | 949 | } |
| 950 | 950 | } |
| 951 | 951 | } |
@@ -1020,7 +1020,7 @@ discard block |
||
| 1020 | 1020 | if ($this->hasNamespace($className)) { |
| 1021 | 1021 | return $this->getClassName($className); |
| 1022 | 1022 | } else { |
| 1023 | - return '\\' . $className; |
|
| 1023 | + return '\\'.$className; |
|
| 1024 | 1024 | } |
| 1025 | 1025 | } |
| 1026 | 1026 | |
@@ -1121,8 +1121,8 @@ discard block |
||
| 1121 | 1121 | $lines = explode("\n", $code); |
| 1122 | 1122 | |
| 1123 | 1123 | foreach ($lines as $key => $value) { |
| 1124 | - if ( ! empty($value)) { |
|
| 1125 | - $lines[$key] = str_repeat($this->spaces, $num) . $lines[$key]; |
|
| 1124 | + if (!empty($value)) { |
|
| 1125 | + $lines[$key] = str_repeat($this->spaces, $num).$lines[$key]; |
|
| 1126 | 1126 | } |
| 1127 | 1127 | } |
| 1128 | 1128 | |
@@ -1151,7 +1151,7 @@ discard block |
||
| 1151 | 1151 | } |
| 1152 | 1152 | |
| 1153 | 1153 | if (is_string($value)) { |
| 1154 | - return "'" . $value . "'"; |
|
| 1154 | + return "'".$value."'"; |
|
| 1155 | 1155 | } |
| 1156 | 1156 | |
| 1157 | 1157 | if (is_bool($value)) { |
@@ -1184,7 +1184,7 @@ discard block |
||
| 1184 | 1184 | $type = self::PROPERTY_TYPE_MAP[$type] ?? $type; |
| 1185 | 1185 | } |
| 1186 | 1186 | |
| 1187 | - return ($nullable ? '?' : '') . $type; |
|
| 1187 | + return ($nullable ? '?' : '').$type; |
|
| 1188 | 1188 | } |
| 1189 | 1189 | |
| 1190 | 1190 | /** |
@@ -1203,7 +1203,7 @@ discard block |
||
| 1203 | 1203 | return ''; |
| 1204 | 1204 | } |
| 1205 | 1205 | |
| 1206 | - return ' ' . $this->getPropertyTypeHint($property->phpType(), $property->isNullable()); |
|
| 1206 | + return ' '.$this->getPropertyTypeHint($property->phpType(), $property->isNullable()); |
|
| 1207 | 1207 | } |
| 1208 | 1208 | |
| 1209 | 1209 | /** |
@@ -1237,7 +1237,7 @@ discard block |
||
| 1237 | 1237 | } |
| 1238 | 1238 | } |
| 1239 | 1239 | |
| 1240 | - return ' ' . $this->getPropertyTypeHint($type, $property->isRelation()); |
|
| 1240 | + return ' '.$this->getPropertyTypeHint($type, $property->isRelation()); |
|
| 1241 | 1241 | } |
| 1242 | 1242 | |
| 1243 | 1243 | //---------------------- mutators |
@@ -1371,7 +1371,7 @@ discard block |
||
| 1371 | 1371 | public function setFieldVisibility(string $visibility): void |
| 1372 | 1372 | { |
| 1373 | 1373 | if ($visibility !== static::FIELD_VISIBLE_PRIVATE && $visibility !== static::FIELD_VISIBLE_PROTECTED) { |
| 1374 | - throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): ' . $visibility); |
|
| 1374 | + throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): '.$visibility); |
|
| 1375 | 1375 | } |
| 1376 | 1376 | |
| 1377 | 1377 | $this->fieldVisibility = $visibility; |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | public function pushAll(array $items) |
| 197 | 197 | { |
| 198 | 198 | if (!($this->collection instanceof CollectionInterface)) { |
| 199 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
| 199 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
| 200 | 200 | } |
| 201 | 201 | |
| 202 | 202 | $this->collection->pushAll($items); |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | public function push($item) |
| 211 | 211 | { |
| 212 | 212 | if (!($this->collection instanceof CollectionInterface)) { |
| 213 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
| 213 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | $this->collection->push($item); |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | public function put($key, $item) |
| 225 | 225 | { |
| 226 | 226 | if (!($this->collection instanceof CollectionInterface)) { |
| 227 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
| 227 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | $this->collection->put($key, $item); |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | public function get($key, $default = null) |
| 261 | 261 | { |
| 262 | 262 | if (!($this->collection instanceof CollectionInterface)) { |
| 263 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
| 263 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
| 264 | 264 | } |
| 265 | 265 | |
| 266 | 266 | return $this->collection->get($key, $default); |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | public function has($key): bool |
| 282 | 282 | { |
| 283 | 283 | if (!($this->collection instanceof CollectionInterface)) { |
| 284 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
| 284 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | return $this->collection->has($key); |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | public function remove($key) |
| 304 | 304 | { |
| 305 | 305 | if (!($this->collection instanceof CollectionInterface)) { |
| 306 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
| 306 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | $this->collection->remove($key); |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | public function clear() |
| 328 | 328 | { |
| 329 | 329 | if (!($this->collection instanceof CollectionInterface)) { |
| 330 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
| 330 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
| 331 | 331 | } |
| 332 | 332 | |
| 333 | 333 | $this->collection->clear(); |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | public function keys(): array |
| 342 | 342 | { |
| 343 | 343 | if (!($this->collection instanceof CollectionInterface)) { |
| 344 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
| 344 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
| 345 | 345 | } |
| 346 | 346 | |
| 347 | 347 | return $this->collection->keys(); |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | public function isEmpty(): bool |
| 354 | 354 | { |
| 355 | 355 | if (!($this->collection instanceof CollectionInterface)) { |
| 356 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
| 356 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
| 357 | 357 | } |
| 358 | 358 | |
| 359 | 359 | return $this->collection->isEmpty(); |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | public function map($callback) |
| 371 | 371 | { |
| 372 | 372 | if (!($this->collection instanceof CollectionInterface)) { |
| 373 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
| 373 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | /** @var static<M> $this */ |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | public function filter($callback = null) |
| 386 | 386 | { |
| 387 | 387 | if (!($this->collection instanceof CollectionInterface)) { |
| 388 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
| 388 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
| 389 | 389 | } |
| 390 | 390 | |
| 391 | 391 | $this->collection = $this->collection->filter($callback); |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | public function groupBy($groupBy, $mode = PaginatorInterface::GROUPBY) |
| 400 | 400 | { |
| 401 | 401 | if (!($this->collection instanceof CollectionInterface)) { |
| 402 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
| 402 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
| 403 | 403 | } |
| 404 | 404 | |
| 405 | 405 | $this->collection = $this->collection->groupBy($groupBy, $mode); |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | public function contains($element): bool |
| 416 | 416 | { |
| 417 | 417 | if (!($this->collection instanceof CollectionInterface)) { |
| 418 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
| 418 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
| 419 | 419 | } |
| 420 | 420 | |
| 421 | 421 | return $this->collection->contains($element); |
@@ -427,7 +427,7 @@ discard block |
||
| 427 | 427 | public function indexOf($value, $strict = false) |
| 428 | 428 | { |
| 429 | 429 | if (!($this->collection instanceof CollectionInterface)) { |
| 430 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
| 430 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
| 431 | 431 | } |
| 432 | 432 | |
| 433 | 433 | return $this->collection->indexOf($value, $strict); |
@@ -439,7 +439,7 @@ discard block |
||
| 439 | 439 | public function merge($items) |
| 440 | 440 | { |
| 441 | 441 | if (!($this->collection instanceof CollectionInterface)) { |
| 442 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
| 442 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
| 443 | 443 | } |
| 444 | 444 | |
| 445 | 445 | $this->collection = $this->collection->merge($items); |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | public function sort(callable $callback = null) |
| 454 | 454 | { |
| 455 | 455 | if (!($this->collection instanceof CollectionInterface)) { |
| 456 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
| 456 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
| 457 | 457 | } |
| 458 | 458 | |
| 459 | 459 | $this->collection = $this->collection->sort($callback); |
@@ -204,7 +204,7 @@ |
||
| 204 | 204 | $this->statements['offset'] = null; |
| 205 | 205 | $this->statements['aggregate'] = ['count', $column ?: '*']; |
| 206 | 206 | |
| 207 | - $count = (int)$this->execute()->current()['aggregate']; |
|
| 207 | + $count = (int) $this->execute()->current()['aggregate']; |
|
| 208 | 208 | |
| 209 | 209 | $this->compilerState->invalidate(); |
| 210 | 210 | $this->statements = $statements; |
@@ -101,7 +101,7 @@ |
||
| 101 | 101 | return $compiler->compileDelete($this); |
| 102 | 102 | |
| 103 | 103 | default: |
| 104 | - throw new \LogicException('The query ' . static::class . ' do not supports type ' . $type); |
|
| 104 | + throw new \LogicException('The query '.static::class.' do not supports type '.$type); |
|
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | 107 | } |