Passed
Push — master ( 6c900b...b2b78e )
by Vincent
09:01 queued 13s
created
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;
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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];
Please login to merge, or discard this patch.
src/Entity/Criteria.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
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
         
Please login to merge, or discard this patch.
src/Entity/Extensions/ArrayInjector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/Entity/Hydrator/Generator/CodeGenerator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Entity/Hydrator/Generator/TypeAccessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Connection/Factory/ConnectionFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Query/Extension/CachableTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,8 +44,8 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Query/Compiler/SqlCompiler.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Collection/EntityCollection.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     #[ReadOperation]
78 78
     public function load($relations)
79 79
     {
80
-        foreach (Relation::sanitizeRelations((array)$relations) as $relationName => $meta) {
80
+        foreach (Relation::sanitizeRelations((array) $relations) as $relationName => $meta) {
81 81
             $this->repository->relation($relationName)->load(
82 82
                 EntityIndexer::fromArray($this->repository->mapper(), $this->storage->all()),
83 83
                 $meta['relations'],
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     #[WriteOperation]
143 143
     public function delete()
144 144
     {
145
-        $this->repository->transaction(function (RepositoryInterface $repository) {
145
+        $this->repository->transaction(function(RepositoryInterface $repository) {
146 146
             /** @var RepositoryInterface&RepositoryEventsSubscriberInterface $repository */
147 147
             $writer = new BufferedWriter($repository);
148 148
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     #[WriteOperation]
166 166
     public function save()
167 167
     {
168
-        $this->repository->transaction(function (RepositoryInterface $repository) {
168
+        $this->repository->transaction(function(RepositoryInterface $repository) {
169 169
             foreach ($this as $entity) {
170 170
                 $repository->save($entity);
171 171
             }
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
     #[WriteOperation]
187 187
     public function saveAll($relations)
188 188
     {
189
-        $relations = Relation::sanitizeRelations((array)$relations);
189
+        $relations = Relation::sanitizeRelations((array) $relations);
190 190
 
191 191
         return $this->repository->transaction(function(RepositoryInterface $repository) use($relations) {
192 192
             $nb = 0;
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     #[WriteOperation]
216 216
     public function deleteAll($relations)
217 217
     {
218
-        $relations = Relation::sanitizeRelations((array)$relations);
218
+        $relations = Relation::sanitizeRelations((array) $relations);
219 219
 
220 220
         return $this->repository->transaction(function(RepositoryInterface $repository) use($relations) {
221 221
             $nb = 0;
Please login to merge, or discard this patch.