@@ -50,7 +50,7 @@ |
||
50 | 50 | switch ($platform->name()) { |
51 | 51 | case 'mysql': |
52 | 52 | $connection->executeUpdate('UPDATE '.$metadata->sequence['table'] |
53 | - .' SET '. $metadata->sequence['column'].' = LAST_INSERT_ID('.$metadata->sequence['column'].'+1)'); |
|
53 | + .' SET '.$metadata->sequence['column'].' = LAST_INSERT_ID('.$metadata->sequence['column'].'+1)'); |
|
54 | 54 | return (string) $connection->lastInsertId(); |
55 | 55 | |
56 | 56 | case 'sqlite': |
@@ -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 | } |
@@ -98,16 +98,16 @@ |
||
98 | 98 | */ |
99 | 99 | public function compiler(string $query): object |
100 | 100 | { |
101 | - if (!isset($this->compilers[$query])) { |
|
102 | - return $this->defaultCompiler; |
|
103 | - } |
|
101 | + if (!isset($this->compilers[$query])) { |
|
102 | + return $this->defaultCompiler; |
|
103 | + } |
|
104 | 104 | |
105 | - $compiler = $this->compilers[$query]; |
|
105 | + $compiler = $this->compilers[$query]; |
|
106 | 106 | |
107 | - if (is_string($compiler)) { |
|
108 | - return $this->compilers[$query] = new $compiler($this->connection); |
|
109 | - } |
|
107 | + if (is_string($compiler)) { |
|
108 | + return $this->compilers[$query] = new $compiler($this->connection); |
|
109 | + } |
|
110 | 110 | |
111 | - return $compiler; |
|
111 | + return $compiler; |
|
112 | 112 | } |
113 | 113 | } |
@@ -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; |