Passed
Push — master ( 050c29...4fa43a )
by Thomas
58s
created
src/Dbal/Type/Set.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,12 +18,12 @@
 block discarded – undo
18 18
     public function validate($value)
19 19
     {
20 20
         if (!is_string($value)) {
21
-            return new NoString([ 'type' => 'set' ]);
21
+            return new NoString(['type' => 'set']);
22 22
         } else {
23 23
             $values = explode(',', $value);
24 24
             foreach ($values as $value) {
25 25
                 if (!in_array($value, $this->allowedValues)) {
26
-                    return new NotAllowed([ 'value' => $value, 'type' => 'set' ]);
26
+                    return new NotAllowed(['value' => $value, 'type' => 'set']);
27 27
                 }
28 28
             }
29 29
         }
Please login to merge, or discard this patch.
src/Dbal/Type/Enum.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@
 block discarded – undo
41 41
     public function validate($value)
42 42
     {
43 43
         if (!is_string($value)) {
44
-            return new NoString([ 'type' => 'enum' ]);
44
+            return new NoString(['type' => 'enum']);
45 45
         } elseif (!in_array($value, $this->allowedValues)) {
46
-            return new NotAllowed([ 'value' => $value, 'type' => 'enum' ]);
46
+            return new NotAllowed(['value' => $value, 'type' => 'enum']);
47 47
         }
48 48
 
49 49
         return true;
Please login to merge, or discard this patch.
src/Entity.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -575,7 +575,7 @@
 block discarded – undo
575 575
         if (!empty($attribute)) {
576 576
             $col = static::getColumnName($attribute);
577 577
             return (isset($this->data[$col]) ? $this->data[$col] : null) !==
578
-                   (isset($this->originalData[$col]) ? $this->originalData[$col] : null);
578
+                    (isset($this->originalData[$col]) ? $this->originalData[$col] : null);
579 579
         }
580 580
 
581 581
         ksort($this->data);
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
      */
173 173
     public static function getPrimaryKeyVars()
174 174
     {
175
-        return !is_array(static::$primaryKey) ? [ static::$primaryKey ] : static::$primaryKey;
175
+        return !is_array(static::$primaryKey) ? [static::$primaryKey] : static::$primaryKey;
176 176
     }
177 177
 
178 178
     /**
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
         $em     = EM::getInstance(static::class);
317 317
         $getter = $em->getNamer()->getMethodName('get' . ucfirst($attribute), self::$namingSchemeMethods);
318 318
 
319
-        if (method_exists($this, $getter) && is_callable([ $this, $getter ])) {
319
+        if (method_exists($this, $getter) && is_callable([$this, $getter])) {
320 320
             return $this->$getter();
321 321
         } else {
322 322
             $col    = static::getColumnName($attribute);
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
         $em     = EM::getInstance(static::class);
354 354
         $setter = $em->getNamer()->getMethodName('set' . ucfirst($attribute), self::$namingSchemeMethods);
355 355
 
356
-        if (method_exists($this, $setter) && is_callable([ $this, $setter ])) {
356
+        if (method_exists($this, $setter) && is_callable([$this, $setter])) {
357 357
             $oldValue   = $this->__get($attribute);
358 358
             $md5OldData = md5(serialize($this->data));
359 359
             $this->$setter($value);
@@ -769,7 +769,7 @@  discard block
 block discarded – undo
769 769
      */
770 770
     public function serialize()
771 771
     {
772
-        return serialize([ $this->data, $this->relatedObjects ]);
772
+        return serialize([$this->data, $this->relatedObjects]);
773 773
     }
774 774
 
775 775
     /**
Please login to merge, or discard this patch.
src/EntityFetcher.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
 
64 64
         $this->tableName = $entityManager->escapeIdentifier($class::getTableName());
65 65
         $this->alias     = 't0';
66
-        $this->columns   = [ 't0.*' ];
67
-        $this->modifier  = [ 'DISTINCT' ];
66
+        $this->columns   = ['t0.*'];
67
+        $this->modifier  = ['DISTINCT'];
68 68
 
69 69
         $this->classMapping['byClass'][$class] = 't0';
70 70
         $this->classMapping['byAlias']['t0']   = $class;
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
             $alias = $this->alias;
192 192
         }
193 193
 
194
-        call_user_func([ $class, 'getRelation' ], $relation)->addJoin($this, $join, $alias);
194
+        call_user_func([$class, 'getRelation'], $relation)->addJoin($this, $join, $alias);
195 195
         return $this;
196 196
     }
197 197
 
@@ -289,11 +289,11 @@  discard block
 block discarded – undo
289 289
     public function count()
290 290
     {
291 291
         // set the columns and reset after get query
292
-        $this->columns  = [ 'COUNT(DISTINCT t0.*)' ];
292
+        $this->columns  = ['COUNT(DISTINCT t0.*)'];
293 293
         $this->modifier = [];
294 294
         $query          = $this->getQuery();
295
-        $this->columns  = [ 't0.*' ];
296
-        $this->modifier = [ 'DISTINCT' ];
295
+        $this->columns  = ['t0.*'];
296
+        $this->modifier = ['DISTINCT'];
297 297
 
298 298
         return (int) $this->entityManager->getConnection()->query($query)->fetchColumn();
299 299
     }
Please login to merge, or discard this patch.
src/Namer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -305,7 +305,7 @@
 block discarded – undo
305 305
             }
306 306
 
307 307
             $array = substr($accessor, -1) === '*' ?
308
-                array_slice($array, $from) : [ $array[$from] ];
308
+                array_slice($array, $from) : [$array[$from]];
309 309
         }
310 310
 
311 311
         return implode($glue, $array);
Please login to merge, or discard this patch.
src/Dbal/Error/NotNullable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,6 @@
 block discarded – undo
19 19
 
20 20
     public function __construct(Column $column)
21 21
     {
22
-        parent::__construct([ 'column' => $column->name ]);
22
+        parent::__construct(['column' => $column->name]);
23 23
     }
24 24
 }
Please login to merge, or discard this patch.
src/Dbal/Type/Json.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@
 block discarded – undo
24 24
     public function validate($value)
25 25
     {
26 26
         if (!is_string($value)) {
27
-            return new NoString([ 'type' => 'json' ]);
27
+            return new NoString(['type' => 'json']);
28 28
         } elseif ($value !== 'null' && json_decode($value) === null) {
29
-            return new InvalidJson([ 'value' => (string) $value ]);
29
+            return new InvalidJson(['value' => (string) $value]);
30 30
         }
31 31
 
32 32
         return true;
Please login to merge, or discard this patch.
src/Dbal/Type/VarChar.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,9 +48,9 @@
 block discarded – undo
48 48
     public function validate($value)
49 49
     {
50 50
         if (!is_string($value)) {
51
-            return new NoString([ 'type' => $this->type ]);
51
+            return new NoString(['type' => $this->type]);
52 52
         } elseif ($this->maxLength !== 0 && mb_strlen($value) > $this->maxLength) {
53
-            return new TooLong([ 'value' => $value, 'max' => $this->maxLength ]);
53
+            return new TooLong(['value' => $value, 'max' => $this->maxLength]);
54 54
         }
55 55
 
56 56
         return true;
Please login to merge, or discard this patch.
src/Dbal/Type/Boolean.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
                 ($value !== $this->getBoolean(true) && $value !== $this->getBoolean(false))
52 52
             ) {
53 53
                 // value is not boolean, not int and (not string OR string value for boolean)
54
-                return new NoBoolean([ 'value' => (string) $value ]);
54
+                return new NoBoolean(['value' => (string) $value]);
55 55
             }
56 56
         }
57 57
 
Please login to merge, or discard this patch.