Passed
Pull Request — master (#58)
by Thomas
01:37
created
src/Relation/Owner.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     /** {@inheritdoc} */
39 39
     public function fetch(Entity $self, EntityManager $entityManager)
40 40
     {
41
-        $key = array_map([$self, '__get' ], array_keys($this->reference));
41
+        $key = array_map([$self, '__get'], array_keys($this->reference));
42 42
 
43 43
         if (in_array(null, $key)) {
44 44
             return null;
@@ -82,6 +82,6 @@  discard block
 block discarded – undo
82 82
             $expression[] = $alias . '.' . $myVar . ' = ' . $this->name . '.' . $hisVar;
83 83
         }
84 84
 
85
-        call_user_func([ $fetcher, $join ], $this->class, implode(' AND ', $expression), $this->name, [], true);
85
+        call_user_func([$fetcher, $join], $this->class, implode(' AND ', $expression), $this->name, [], true);
86 86
     }
87 87
 }
Please login to merge, or discard this patch.
src/EntityFetcher.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
 
62 62
         $this->tableName = $entityManager->escapeIdentifier($class::getTableName());
63 63
         $this->alias     = 't0';
64
-        $this->columns   = [ 't0.*' ];
65
-        $this->modifier  = [ 'DISTINCT' ];
64
+        $this->columns   = ['t0.*'];
65
+        $this->modifier  = ['DISTINCT'];
66 66
 
67 67
         $this->classMapping['byClass'][$class] = 't0';
68 68
         $this->classMapping['byAlias']['t0']   = $class;
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
             $alias = $this->alias;
184 184
         }
185 185
 
186
-        call_user_func([ $class, 'getRelation' ], $relation)->addJoin($this, $join, $alias);
186
+        call_user_func([$class, 'getRelation'], $relation)->addJoin($this, $join, $alias);
187 187
         return $this;
188 188
     }
189 189
 
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
             return null;
231 231
         }
232 232
 
233
-        $class         = $this->class;
233
+        $class = $this->class;
234 234
         $newEntity = new $class($data, $this->entityManager, true);
235 235
         $entity    = $this->entityManager->map($newEntity);
236 236
 
@@ -275,11 +275,11 @@  discard block
 block discarded – undo
275 275
     public function count()
276 276
     {
277 277
         // set the columns and reset after get query
278
-        $this->columns  = [ 'COUNT(DISTINCT t0.*)' ];
278
+        $this->columns  = ['COUNT(DISTINCT t0.*)'];
279 279
         $this->modifier = [];
280 280
         $query          = $this->getQuery();
281
-        $this->columns  = [ 't0.*' ];
282
-        $this->modifier = [ 'DISTINCT' ];
281
+        $this->columns  = ['t0.*'];
282
+        $this->modifier = ['DISTINCT'];
283 283
 
284 284
         return (int) $this->entityManager->getConnection()->query($query)->fetchColumn();
285 285
     }
Please login to merge, or discard this patch.
src/EntityManager.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -384,8 +384,7 @@  discard block
 block discarded – undo
384 384
         }
385 385
 
386 386
         return $useAutoIncrement && $entity::isAutoIncremented() ?
387
-            $this->getDbal()->insertAndSyncWithAutoInc($entity) :
388
-            $this->getDbal()->insertAndSync($entity);
387
+            $this->getDbal()->insertAndSyncWithAutoInc($entity) : $this->getDbal()->insertAndSync($entity);
389 388
     }
390 389
 
391 390
     /**
@@ -501,7 +500,7 @@  discard block
 block discarded – undo
501 500
             return new EntityFetcher($this, $class);
502 501
         }
503 502
 
504
-        $primaryKey = $this::buildPrimaryKey($class, (array)$primaryKey);
503
+        $primaryKey = $this::buildPrimaryKey($class, (array) $primaryKey);
505 504
         $checksum = $this::buildChecksum($primaryKey);
506 505
 
507 506
         if (isset($this->map[$class][$checksum])) {
Please login to merge, or discard this patch.
src/Testing/EntityManagerMock.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
             return new EntityFetcherMock($this, $class);
21 21
         }
22 22
 
23
-        $primaryKey = $this->buildPrimaryKey($class, (array)$primaryKey);
23
+        $primaryKey = $this->buildPrimaryKey($class, (array) $primaryKey);
24 24
         $checksum = $this->buildChecksum($primaryKey);
25 25
 
26 26
         if (isset($this->map[$class][$checksum])) {
Please login to merge, or discard this patch.
src/Testing/MocksEntityManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -176,7 +176,7 @@
 block discarded – undo
176 176
         $em = $this->ormGetEntityManagerInstance($class);
177 177
 
178 178
         /** @var m\MockInterface|EntityFetcher $fetcher */
179
-        $fetcher = m::mock(EntityFetcher::class, [ $em, $class ])->makePartial();
179
+        $fetcher = m::mock(EntityFetcher::class, [$em, $class])->makePartial();
180 180
         $expectation = $em->shouldReceive('fetch')->with($class)->andReturn($fetcher);
181 181
 
182 182
         $fetcher->shouldReceive('count')->with()->andReturn(count($entities))->byDefault();
Please login to merge, or discard this patch.