Completed
Push — master ( db5f77...4370c7 )
by Thomas
30s queued 10s
created
src/Dbal/Dbal.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         if ($value instanceof DateTime) {
99 99
             $type = 'DateTime';
100 100
         }
101
-        $method = [ $this, 'escape' . ucfirst($type) ];
101
+        $method = [$this, 'escape' . ucfirst($type)];
102 102
 
103 103
         if (is_callable($method)) {
104 104
             return call_user_func($method, $value);
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
         $var    = $entity::getPrimaryKeyVars()[0];
304 304
         $column = $entity::getColumnName($var);
305 305
 
306
-        $entity->setOriginalData(array_merge($entity->getData(), [ $column => $value ]));
306
+        $entity->setOriginalData(array_merge($entity->getData(), [$column => $value]));
307 307
         $entity->__set($var, $value);
308 308
     }
309 309
 
@@ -320,8 +320,7 @@  discard block
 block discarded – undo
320 320
         $primary = array_combine($vars, $cols);
321 321
 
322 322
         $query = "SELECT * FROM " . $this->escapeIdentifier($entity::getTableName()) . " WHERE ";
323
-        $query .= count($cols) > 1 ? $this->buildCompositeWhereInStatement($cols, $entities) :
324
-            $this->escapeIdentifier($cols[0]) . ' IN (' . implode(',', array_map(function (Entity $entity) {
323
+        $query .= count($cols) > 1 ? $this->buildCompositeWhereInStatement($cols, $entities) : $this->escapeIdentifier($cols[0]) . ' IN (' . implode(',', array_map(function (Entity $entity) {
325 324
                 return $this->escapeValue(array_values($entity->getPrimaryKey())[0]);
326 325
             }, $entities)) . ')';
327 326
 
Please login to merge, or discard this patch.
src/Entity.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
      */
190 190
     public static function getPrimaryKeyVars()
191 191
     {
192
-        return !is_array(static::$primaryKey) ? [ static::$primaryKey ] : static::$primaryKey;
192
+        return !is_array(static::$primaryKey) ? [static::$primaryKey] : static::$primaryKey;
193 193
     }
194 194
 
195 195
     /**
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
         $em     = EM::getInstance(static::class);
256 256
         $getter = $em->getNamer()->getMethodName('get' . ucfirst($attribute), self::$namingSchemeMethods);
257 257
 
258
-        if (method_exists($this, $getter) && is_callable([ $this, $getter ])) {
258
+        if (method_exists($this, $getter) && is_callable([$this, $getter])) {
259 259
             return $this->$getter();
260 260
         } else {
261 261
             $col    = static::getColumnName($attribute);
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
         $em     = EM::getInstance(static::class);
281 281
         $getter = $em->getNamer()->getMethodName('get' . ucfirst($attribute), self::$namingSchemeMethods);
282 282
 
283
-        if (method_exists($this, $getter) && is_callable([ $this, $getter ])) {
283
+        if (method_exists($this, $getter) && is_callable([$this, $getter])) {
284 284
             return $this->$getter() !== null;
285 285
         } else {
286 286
             $col = static::getColumnName($attribute);
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
         $em     = EM::getInstance(static::class);
330 330
         $setter = $em->getNamer()->getMethodName('set' . ucfirst($attribute), self::$namingSchemeMethods);
331 331
 
332
-        if (method_exists($this, $setter) && is_callable([ $this, $setter ])) {
332
+        if (method_exists($this, $setter) && is_callable([$this, $setter])) {
333 333
             $oldValue   = $this->__get($attribute);
334 334
             $md5OldData = md5(serialize($this->data));
335 335
             $this->$setter($value);
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
             return $this->getAttribute($attribute);
613 613
         }, $attributes);
614 614
 
615
-        $result = (array)array_combine($attributes, $values);
615
+        $result = (array) array_combine($attributes, $values);
616 616
 
617 617
         if ($includeRelations) {
618 618
             foreach ($this->relatedObjects as $relation => $relatedObject) {
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
      */
638 638
     public function serialize()
639 639
     {
640
-        return serialize([ $this->data, $this->relatedObjects ]);
640
+        return serialize([$this->data, $this->relatedObjects]);
641 641
     }
642 642
 
643 643
     /**
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.