Passed
Pull Request — 2.0 (#50)
by Vincent
14:06 queued 07:25
created
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.
src/Schema/Comparator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      */
31 31
     public function setListDropColumn($flag): void
32 32
     {
33
-        $this->listDropColumn = (bool)$flag;
33
+        $this->listDropColumn = (bool) $flag;
34 34
     }
35 35
     
36 36
     /**
Please login to merge, or discard this patch.
src/Schema/Adapter/Metadata/MetadataIndexSet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      */
43 43
     public function all(): array
44 44
     {
45
-        $indexes =  $this->extractIndexes($this->metadata->indexes);
45
+        $indexes = $this->extractIndexes($this->metadata->indexes);
46 46
 
47 47
         $primary = $this->primary();
48 48
         $indexes[$primary->name()] = $primary;
Please login to merge, or discard this patch.
src/Migration/MigrationManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
             return $migrations;
113 113
         }
114 114
 
115
-        return array_filter($migrations, function (MigrationInterface $migration) use ($stage) {
115
+        return array_filter($migrations, function(MigrationInterface $migration) use ($stage) {
116 116
             return $migration->stage() === $stage;
117 117
         });
118 118
     }
Please login to merge, or discard this patch.