Passed
Push — 2.0 ( b1b619...99ad58 )
by Vincent
06:02
created
src/Query/Query.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
         $this->statements['offset'] = null;
275 275
         $this->statements['aggregate'] = ['pagination', $this->getPaginationColumns($column)];
276 276
 
277
-        $count = (int)$this->execute()->current()['aggregate'];
277
+        $count = (int) $this->execute()->current()['aggregate'];
278 278
 
279 279
         $this->compilerState->invalidate(['columns', 'orders']);
280 280
         $this->statements = $statements;
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
     #[ReadOperation]
321 321
     public function count(?string $column = null): int
322 322
     {
323
-        return (int)$this->aggregate(__FUNCTION__, $column);
323
+        return (int) $this->aggregate(__FUNCTION__, $column);
324 324
     }
325 325
 
326 326
     /**
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
     #[ReadOperation]
330 330
     public function avg(?string $column = null): float
331 331
     {
332
-        return (float)$this->aggregate(__FUNCTION__, $column);
332
+        return (float) $this->aggregate(__FUNCTION__, $column);
333 333
     }
334 334
 
335 335
     /**
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
     #[ReadOperation]
357 357
     public function sum(?string $column = null): float
358 358
     {
359
-        return (float)$this->aggregate(__FUNCTION__, $column);
359
+        return (float) $this->aggregate(__FUNCTION__, $column);
360 360
     }
361 361
 
362 362
     /**
@@ -619,7 +619,7 @@  discard block
 block discarded – undo
619 619
         # build a regular expression for each parameter
620 620
         foreach ($values as $key => $value) {
621 621
             if (is_string($key)) {
622
-                $keys[] = '/:' . $key . '/';
622
+                $keys[] = '/:'.$key.'/';
623 623
             } else {
624 624
                 $keys[] = '/[?]/';
625 625
             }
Please login to merge, or discard this patch.
src/Query/Clause.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
                     $this->addCommand($key, $value);
127 127
                 } else {
128 128
                     // Column with operator
129
-                    $key  = explode(' ', trim($key), 2);
129
+                    $key = explode(' ', trim($key), 2);
130 130
                     $parts[] = [
131 131
                         'column'    => $key[0],
132 132
                         'operator'  => isset($key[1]) ? $key[1] : '=',
Please login to merge, or discard this patch.
src/Relations/Info/NullRelationInfo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
      */
37 37
     public static function instance(): self
38 38
     {
39
-        if (self::$instance === null)  {
39
+        if (self::$instance === null) {
40 40
             return self::$instance = new self;
41 41
         }
42 42
 
Please login to merge, or discard this patch.
src/Mapper/Mapper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
     public function setGenerator($generator): void
305 305
     {
306 306
         if (!is_string($generator) && !$generator instanceof GeneratorInterface) {
307
-            throw new LogicException('Trying to set an invalid generator in "' . get_class($this) . '"');
307
+            throw new LogicException('Trying to set an invalid generator in "'.get_class($this).'"');
308 308
         }
309 309
         
310 310
         $this->generator = $generator;
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
         $relations = $this->relations();
547 547
         
548 548
         if (!isset($relations[$relationName])) {
549
-            throw new RelationNotFoundException('Relation "' . $relationName . '" is not set in ' . $this->metadata->entityName);
549
+            throw new RelationNotFoundException('Relation "'.$relationName.'" is not set in '.$this->metadata->entityName);
550 550
         }
551 551
         
552 552
         return $relations[$relationName];
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
      */
729 729
     public function scopes(): array
730 730
     {
731
-        throw new LogicException('No scopes have been defined in "' . get_class($this) . '"');
731
+        throw new LogicException('No scopes have been defined in "'.get_class($this).'"');
732 732
     }
733 733
 
734 734
     /**
Please login to merge, or discard this patch.
src/Mapper/Builder/FieldBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -635,7 +635,7 @@
 block discarded – undo
635 635
     public function field(string $name)
636 636
     {
637 637
         if (!isset($this->fields[$name])) {
638
-            throw new \RuntimeException('Field ' . $name . ' not found');
638
+            throw new \RuntimeException('Field '.$name.' not found');
639 639
         }
640 640
 
641 641
         $this->current = $name;
Please login to merge, or discard this patch.
src/Mapper/NameResolver/SuffixResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      */
26 26
     public function resolve(string $entityClass): string
27 27
     {
28
-        return $entityClass . $this->suffix;
28
+        return $entityClass.$this->suffix;
29 29
     }
30 30
     
31 31
     /**
Please login to merge, or discard this patch.
src/Mapper/SingleTableInheritanceMapper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
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;
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         $discriminatorField = $this->metadata()->attributes[$this->discriminatorColumn]['field'];
156 156
 
157 157
         if (empty($data[$discriminatorField])) {
158
-            throw new \Exception('Discriminator field "' . $discriminatorField . '" not found');
158
+            throw new \Exception('Discriminator field "'.$discriminatorField.'" not found');
159 159
         }
160 160
 
161 161
         return $data[$discriminatorField];
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     public function getDiscriminatorType($discriminatorValue): string
175 175
     {
176 176
         if (empty($this->discriminatorMap[$discriminatorValue])) {
177
-            throw new \Exception('Unknown discriminator type "' . $discriminatorValue . '"');
177
+            throw new \Exception('Unknown discriminator type "'.$discriminatorValue.'"');
178 178
         }
179 179
 
180 180
         return $this->discriminatorMap[$discriminatorValue];
Please login to merge, or discard this patch.
src/Schema/Util/Name.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
      */
21 21
     public static function generate(string $prefix, array $parts, int $length = self::DEFAULT_LENGTH)
22 22
     {
23
-        $hash = implode('', array_map(function ($part) {
23
+        $hash = implode('', array_map(function($part) {
24 24
             return dechex(crc32($part));
25 25
         }, $parts));
26 26
 
Please login to merge, or discard this patch.
src/Schema/RepositoryUpgrader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     public function diff(bool $listDrop = true): array
72 72
     {
73 73
         $queries = $this->schema()
74
-            ->simulate(function (SchemaManagerInterface $schema) use ($listDrop) {
74
+            ->simulate(function(SchemaManagerInterface $schema) use ($listDrop) {
75 75
                 $schema->useDrop($listDrop);
76 76
                 $schema->add($this->table());
77 77
             })
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         }
83 83
 
84 84
         $sequenceQueries = $schemaSequence
85
-            ->simulate(function (SchemaManagerInterface $schema) use ($listDrop) {
85
+            ->simulate(function(SchemaManagerInterface $schema) use ($listDrop) {
86 86
                 $schema->useDrop($listDrop);
87 87
                 $schema->add($this->sequence());
88 88
             })
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 
160 160
         /** @var ConnectionInterface&\Doctrine\DBAL\Connection $connection */
161 161
         $connection = $this->connection($this->metadata->sequence['connection']);
162
-        $table  = $this->metadata->sequence['table'];
162
+        $table = $this->metadata->sequence['table'];
163 163
 
164 164
         /** @psalm-suppress UndefinedInterfaceMethod */
165 165
         $nb = $connection->from($table)->count();
Please login to merge, or discard this patch.