Passed
Push — master ( da9214...2cc30f )
by oxidmod
01:55
created
src/TypeCheckerFactory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -5,53 +5,53 @@
 block discarded – undo
5 5
 
6 6
 class TypeCheckerFactory
7 7
 {
8
-    private static array $checkers = [];
8
+    private static array $checkers=[];
9 9
 
10 10
     public static function arrayChecker(): \Closure
11 11
     {
12
-        return self::$checkers['array'] = self::$checkers['array'] ?? \Closure::fromCallable(
12
+        return self::$checkers['array']=self::$checkers['array'] ?? \Closure::fromCallable(
13 13
             fn($value) => is_array($value)
14 14
         );
15 15
     }
16 16
 
17 17
     public static function booleanChecker(): \Closure
18 18
     {
19
-        return self::$checkers['boolean'] = self::$checkers['boolean'] ?? \Closure::fromCallable(
19
+        return self::$checkers['boolean']=self::$checkers['boolean'] ?? \Closure::fromCallable(
20 20
             fn($value) => is_bool($value)
21 21
         );
22 22
     }
23 23
 
24 24
     public static function floatChecker(): \Closure
25 25
     {
26
-        return self::$checkers['float'] = self::$checkers['float'] ?? \Closure::fromCallable(
26
+        return self::$checkers['float']=self::$checkers['float'] ?? \Closure::fromCallable(
27 27
             fn($value) => is_float($value)
28 28
         );
29 29
     }
30 30
 
31 31
     public static function integerChecker(): \Closure
32 32
     {
33
-        return self::$checkers['integer'] = self::$checkers['integer'] ?? \Closure::fromCallable(
33
+        return self::$checkers['integer']=self::$checkers['integer'] ?? \Closure::fromCallable(
34 34
             fn($value) => is_int($value)
35 35
         );
36 36
     }
37 37
 
38 38
     public static function objectChecker(): \Closure
39 39
     {
40
-        return self::$checkers['object'] = self::$checkers['object'] ?? \Closure::fromCallable(
40
+        return self::$checkers['object']=self::$checkers['object'] ?? \Closure::fromCallable(
41 41
             fn($value) => is_object($value)
42 42
         );
43 43
     }
44 44
 
45 45
     public static function stringChecker(): \Closure
46 46
     {
47
-        return self::$checkers['string'] = self::$checkers['string'] ?? \Closure::fromCallable(
47
+        return self::$checkers['string']=self::$checkers['string'] ?? \Closure::fromCallable(
48 48
             fn($value) => is_string($value)
49 49
         );
50 50
     }
51 51
 
52 52
     public static function customTypeChecker(string $type): \Closure
53 53
     {
54
-        return self::$checkers[$type] = self::$checkers[$type] ?? \Closure::fromCallable(
54
+        return self::$checkers[$type]=self::$checkers[$type] ?? \Closure::fromCallable(
55 55
             fn($value) => $value instanceof $type
56 56
         );
57 57
     }
Please login to merge, or discard this patch.
src/SimpleCollection/ObjectCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
  */
11 11
 class ObjectCollection extends AbstractCollection
12 12
 {
13
-    public function __construct(array $items = [])
13
+    public function __construct(array $items=[])
14 14
     {
15 15
         parent::__construct(TypeCheckerFactory::objectChecker(), $items);
16 16
     }
Please login to merge, or discard this patch.
src/SimpleCollection/AbstractCollection.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@  discard block
 block discarded – undo
7 7
 {
8 8
     private \Closure $typeChecker;
9 9
 
10
-    protected array $items = [];
10
+    protected array $items=[];
11 11
 
12
-    public function __construct(\Closure $typeChecker, array $items = [])
12
+    public function __construct(\Closure $typeChecker, array $items=[])
13 13
     {
14
-        $this->typeChecker = $typeChecker;
14
+        $this->typeChecker=$typeChecker;
15 15
 
16 16
         foreach ($items as $k => $v) {
17 17
             $this->assertType($v);
18
-            $this->items[$k] = $v;
18
+            $this->items[$k]=$v;
19 19
         }
20 20
     }
21 21
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $this->assertType($value);
35 35
 
36
-        null === $offset ? $this->items[] = $value : $this->items[$offset] = $value;
36
+        null === $offset ? $this->items[]=$value : $this->items[$offset]=$value;
37 37
     }
38 38
 
39 39
     public function offsetUnset($offset): void
Please login to merge, or discard this patch.
src/SimpleCollection/FloatCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
  */
11 11
 class FloatCollection extends AbstractCollection
12 12
 {
13
-    public function __construct(array $items = [])
13
+    public function __construct(array $items=[])
14 14
     {
15 15
         parent::__construct(TypeCheckerFactory::floatChecker(), $items);
16 16
     }
Please login to merge, or discard this patch.
src/SimpleCollection/StringCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
  */
11 11
 class StringCollection extends AbstractCollection
12 12
 {
13
-    public function __construct(array $items = [])
13
+    public function __construct(array $items=[])
14 14
     {
15 15
         parent::__construct(TypeCheckerFactory::stringChecker(), $items);
16 16
     }
Please login to merge, or discard this patch.
src/SimpleCollection/ArrayCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
  */
11 11
 class ArrayCollection extends AbstractCollection
12 12
 {
13
-    public function __construct(array $items = [])
13
+    public function __construct(array $items=[])
14 14
     {
15 15
         parent::__construct(TypeCheckerFactory::arrayChecker(), $items);
16 16
     }
Please login to merge, or discard this patch.
src/SimpleCollection/BooleanCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
  */
11 11
 class BooleanCollection extends AbstractCollection
12 12
 {
13
-    public function __construct(array $items = [])
13
+    public function __construct(array $items=[])
14 14
     {
15 15
         parent::__construct(TypeCheckerFactory::booleanChecker(), $items);
16 16
     }
Please login to merge, or discard this patch.
src/SimpleCollection/IntegerCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
  */
11 11
 class IntegerCollection extends AbstractCollection
12 12
 {
13
-    public function __construct(array $items = [])
13
+    public function __construct(array $items=[])
14 14
     {
15 15
         parent::__construct(TypeCheckerFactory::integerChecker(), $items);
16 16
     }
Please login to merge, or discard this patch.
src/SimpleCollection/AbstractCustomTypeCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 
8 8
 abstract class AbstractCustomTypeCollection extends AbstractCollection
9 9
 {
10
-    public function __construct(array $items = [])
10
+    public function __construct(array $items=[])
11 11
     {
12 12
         parent::__construct(
13 13
             TypeCheckerFactory::customTypeChecker(static::getType()),
Please login to merge, or discard this patch.