Passed
Pull Request — master (#22)
by Vincent
06:37
created
src/Exception/HydratorException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      */
25 25
     public function __construct(string $entityClass, string $message = '', ?Throwable $previous = null)
26 26
     {
27
-        parent::__construct($entityClass . ' : ' . $message, 0, $previous);
27
+        parent::__construct($entityClass.' : '.$message, 0, $previous);
28 28
 
29 29
         $this->entityClass = $entityClass;
30 30
     }
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
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     #[ReadOperation]
69 69
     public function load($relations)
70 70
     {
71
-        foreach (Relation::sanitizeRelations((array)$relations) as $relationName => $meta) {
71
+        foreach (Relation::sanitizeRelations((array) $relations) as $relationName => $meta) {
72 72
             $this->repository->relation($relationName)->load(
73 73
                 EntityIndexer::fromArray($this->repository->mapper(), $this->storage->all()),
74 74
                 $meta['relations'],
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     #[WriteOperation]
134 134
     public function delete()
135 135
     {
136
-        $this->repository->transaction(function (RepositoryInterface $repository) {
136
+        $this->repository->transaction(function(RepositoryInterface $repository) {
137 137
             $writer = new BufferedWriter($repository);
138 138
 
139 139
             foreach ($this as $entity) {
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     #[WriteOperation]
156 156
     public function save()
157 157
     {
158
-        $this->repository->transaction(function (RepositoryInterface $repository) {
158
+        $this->repository->transaction(function(RepositoryInterface $repository) {
159 159
             foreach ($this as $entity) {
160 160
                 $repository->save($entity);
161 161
             }
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
     #[WriteOperation]
177 177
     public function saveAll($relations)
178 178
     {
179
-        $relations = Relation::sanitizeRelations((array)$relations);
179
+        $relations = Relation::sanitizeRelations((array) $relations);
180 180
 
181 181
         return $this->repository->transaction(function(RepositoryInterface $repository) use($relations) {
182 182
             $nb = 0;
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
     #[WriteOperation]
206 206
     public function deleteAll($relations)
207 207
     {
208
-        $relations = Relation::sanitizeRelations((array)$relations);
208
+        $relations = Relation::sanitizeRelations((array) $relations);
209 209
 
210 210
         return $this->repository->transaction(function(RepositoryInterface $repository) use($relations) {
211 211
             $nb = 0;
Please login to merge, or discard this patch.
src/Repository/EntityRepository.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
     #[ReadOperation]
308 308
     public function loadRelations($entity, $relations)
309 309
     {
310
-        foreach (Relation::sanitizeRelations((array)$relations) as $relationName => $meta) {
310
+        foreach (Relation::sanitizeRelations((array) $relations) as $relationName => $meta) {
311 311
             $this->relation($relationName)->loadIfNotLoaded(
312 312
                 new SingleEntityIndexer($this->mapper, $entity),
313 313
                 $meta['relations'],
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
     #[ReadOperation]
331 331
     public function reloadRelations($entity, $relations)
332 332
     {
333
-        foreach (Relation::sanitizeRelations((array)$relations) as $relationName => $meta) {
333
+        foreach (Relation::sanitizeRelations((array) $relations) as $relationName => $meta) {
334 334
             $this->relation($relationName)->load(
335 335
                 new SingleEntityIndexer($this->mapper, $entity),
336 336
                 $meta['relations'],
@@ -376,12 +376,12 @@  discard block
 block discarded – undo
376 376
     #[WriteOperation]
377 377
     public function saveAll($entity, $relations)
378 378
     {
379
-        $relations = Relation::sanitizeRelations((array)$relations);
379
+        $relations = Relation::sanitizeRelations((array) $relations);
380 380
 
381 381
         return $this->transaction(function() use($entity, $relations) {
382 382
             $nb = $this->save($entity);
383 383
 
384
-            foreach ((array)$relations as $relationName => $info) {
384
+            foreach ((array) $relations as $relationName => $info) {
385 385
                 $nb += $this->relation($relationName)->saveAll($entity, $info['relations']);
386 386
             }
387 387
 
@@ -401,12 +401,12 @@  discard block
 block discarded – undo
401 401
     #[WriteOperation]
402 402
     public function deleteAll($entity, $relations)
403 403
     {
404
-        $relations = Relation::sanitizeRelations((array)$relations);
404
+        $relations = Relation::sanitizeRelations((array) $relations);
405 405
 
406 406
         return $this->transaction(function() use($entity, $relations) {
407 407
             $nb = $this->delete($entity);
408 408
 
409
-            foreach ((array)$relations as $relationName => $info) {
409
+            foreach ((array) $relations as $relationName => $info) {
410 410
                 $nb += $this->relation($relationName)->deleteAll($entity, $info['relations']);
411 411
             }
412 412
 
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
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 
181 181
         return $query->state()->compiled = 'UPDATE '
182 182
             . $this->quoteIdentifier($query, $query->statements['tables'][0]['table'])
183
-            . ' SET ' . implode(', ', $values)
183
+            . ' SET '.implode(', ', $values)
184 184
             . $this->compileWhere($query);
185 185
     }
186 186
 
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
                     $from['sql'] = $this->quoteIdentifier($query, $databasePrefix.$from['table']);
510 510
                     $compiled[$from['table']] = $from;
511 511
                 } else {
512
-                    $from['sql'] = $this->quoteIdentifier($query, $databasePrefix.$from['table']) . ' ' . $this->quoteIdentifier($query, $from['alias']);
512
+                    $from['sql'] = $this->quoteIdentifier($query, $databasePrefix.$from['table']).' '.$this->quoteIdentifier($query, $from['alias']);
513 513
                     $compiled[$from['alias']] = $from;
514 514
                 }
515 515
             }
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
                 if (is_array($value)) {
683 683
                     return $this->compileIntoExpression($query, $value, $column, 'REGEXP', $converted);
684 684
                 }
685
-                return $this->quoteIdentifier($query, $column).' REGEXP '.$this->compileExpressionValue($query, (string)$value, $converted);
685
+                return $this->quoteIdentifier($query, $column).' REGEXP '.$this->compileExpressionValue($query, (string) $value, $converted);
686 686
 
687 687
             // LIKE
688 688
             case ':like':
@@ -755,7 +755,7 @@  discard block
 block discarded – undo
755 755
                 
756 756
             // Unsupported operator
757 757
             default:
758
-                throw new UnexpectedValueException("Unsupported operator '" . $operator . "' in WHERE clause");
758
+                throw new UnexpectedValueException("Unsupported operator '".$operator."' in WHERE clause");
759 759
         }
760 760
     }
761 761
 
@@ -843,7 +843,7 @@  discard block
 block discarded – undo
843 843
         $sql = '('.$this->compileSelect($query).')';
844 844
         
845 845
         if ($alias) {
846
-            $sql = $sql . ' as ' . $this->quoteIdentifier($clause, $alias);
846
+            $sql = $sql.' as '.$this->quoteIdentifier($clause, $alias);
847 847
         }
848 848
         
849 849
         $this->addQueryBindings($clause, $query);
@@ -1001,12 +1001,12 @@  discard block
 block discarded – undo
1001 1001
         if ($lock !== null && !$query->statements['aggregate']) {
1002 1002
             // Lock for update
1003 1003
             if ($lock === LockMode::PESSIMISTIC_WRITE) {
1004
-                return ' ' . $this->platform()->grammar()->getWriteLockSQL();
1004
+                return ' '.$this->platform()->grammar()->getWriteLockSQL();
1005 1005
             }
1006 1006
 
1007 1007
             // Shared Lock: other process can read the row but not update it.
1008 1008
             if ($lock === LockMode::PESSIMISTIC_READ) {
1009
-                return ' ' . $this->platform()->grammar()->getReadLockSQL();
1009
+                return ' '.$this->platform()->grammar()->getReadLockSQL();
1010 1010
             }
1011 1011
         }
1012 1012
 
Please login to merge, or discard this patch.