Completed
Pull Request — master (#6)
by Emily
02:10
created
src/Factory/Reflection/GenericCompositeGenerator.php 2 patches
Unused Use Statements   -7 removed lines patch added patch discarded remove patch
@@ -16,15 +16,8 @@
 block discarded – undo
16 16
 
17 17
 use Spaark\CompositeUtils\Model\Reflection\ReflectionComposite;
18 18
 use Spaark\CompositeUtils\Model\Reflection\ReflectionMethod;
19
-use Spaark\CompositeUtils\Model\Reflection\Type\BooleanType;
20
-use Spaark\CompositeUtils\Model\Reflection\Type\CollectionType;
21
-use Spaark\CompositeUtils\Model\Reflection\Type\IntegerType;
22
-use Spaark\CompositeUtils\Model\Reflection\Type\MixedType;
23 19
 use Spaark\CompositeUtils\Model\Reflection\Type\ObjectType;
24
-use Spaark\CompositeUtils\Model\Reflection\Type\StringType;
25
-use Spaark\CompositeUtils\Model\Reflection\Type\GenericType;
26 20
 use Spaark\CompositeUtils\Model\Generic\GenericContext;
27
-use Spaark\CompositeUtils\Service\RawPropertyAccessor;
28 21
 use Spaark\CompositeUtils\Service\GenericNameProvider;
29 22
 use Spaark\CompositeUtils\Traits\AutoConstructTrait;
30 23
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,8 +73,7 @@
 block discarded – undo
73 73
     public function generateClassCode(...$generics) : string
74 74
     {
75 75
         $object = $this->createObject(...$generics);
76
-        $this->nameProvider = new GenericNameProvider
77
-        (
76
+        $this->nameProvider = new GenericNameProvider(
78 77
             new GenericContext($object, $this->reflect)
79 78
         );
80 79
         $class = $this->nameProvider->inferName($object);
Please login to merge, or discard this patch.
src/Model/Generic/GenericContext.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,6 @@
 block discarded – undo
17 17
 use Spaark\CompositeUtils\Model\Reflection\Type\AbstractType;
18 18
 use Spaark\CompositeUtils\Model\Reflection\Type\ObjectType;
19 19
 use Spaark\CompositeUtils\Model\Reflection\ReflectionComposite;
20
-use Spaark\CompositeUtils\Traits\AllReadableTrait;
21 20
 use Spaark\CompositeUtils\Traits\AutoConstructTrait;
22 21
 
23 22
 /**
Please login to merge, or discard this patch.
src/Service/GenericNameProvider.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,6 @@
 block discarded – undo
20 20
 use Spaark\CompositeUtils\Model\Reflection\Type\FloatType;
21 21
 use Spaark\CompositeUtils\Model\Reflection\Type\MixedType;
22 22
 use Spaark\CompositeUtils\Model\Reflection\Type\IntegerType;
23
-use Spaark\CompositeUtils\Model\Reflection\Type\CollectionType;
24 23
 use Spaark\CompositeUtils\Model\Reflection\Type\StringType;
25 24
 use Spaark\CompositeUtils\Model\Reflection\Type\GenericType;
26 25
 use Spaark\CompositeUtils\Model\Generic\GenericContext;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -68,8 +68,7 @@  discard block
 block discarded – undo
68 68
                 return $this->inferGenericName($reflect);
69 69
         }
70 70
 
71
-        throw new \DomainException
72
-        (
71
+        throw new \DomainException(
73 72
             'Unknown type: ' . get_class($reflect)
74 73
         );
75 74
     }
@@ -88,8 +87,7 @@  discard block
 block discarded – undo
88 87
             throw new MissingContextException();
89 88
         }
90 89
 
91
-        return $this->inferName
92
-        (
90
+        return $this->inferName(
93 91
             $this->context->getGenericType($reflect->name)
94 92
         );
95 93
     }
Please login to merge, or discard this patch.
src/Exception/MissingContextException.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     {
36 36
         parent::__construct
37 37
         (
38
-              'Cannot serialize object containing generics without '
38
+                'Cannot serialize object containing generics without '
39 39
             . 'context',
40 40
             0,
41 41
             $previous
Please login to merge, or discard this patch.
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,13 +28,11 @@
 block discarded – undo
28 28
      *
29 29
      * @param Throwable $previous The exception which caused this
30 30
      */
31
-    public function __construct
32
-    (
31
+    public function __construct(
33 32
         Throwable $previous = null
34 33
     )
35 34
     {
36
-        parent::__construct
37
-        (
35
+        parent::__construct(
38 36
               'Cannot serialize object containing generics without '
39 37
             . 'context',
40 38
             0,
Please login to merge, or discard this patch.
src/Service/TypeComparator.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,8 +31,7 @@  discard block
 block discarded – undo
31 31
      * @param AbstractType $child
32 32
      * @return boolean
33 33
      */
34
-    public function compatible
35
-    (
34
+    public function compatible(
36 35
         AbstractType $parent,
37 36
         AbstractType $child
38 37
     )
@@ -53,8 +52,7 @@  discard block
 block discarded – undo
53 52
                 is_a($child->classname, $parent->classname, true);
54 53
         }
55 54
 
56
-        throw new \DomainException
57
-        (
55
+        throw new \DomainException(
58 56
             'Unknown type: ' . get_class($parent)
59 57
         );
60 58
     }
Please login to merge, or discard this patch.
src/Service/ReflectionCompositeProvider.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
54 54
      *
55 55
      * @param ReflectionCompositeProviderInterface $default
56 56
      */
57
-    public static function setDefault
58
-    (
57
+    public static function setDefault(
59 58
         ReflectionCompositeProviderInterface $default
60 59
     )
61 60
     {
@@ -90,8 +89,7 @@  discard block
 block discarded – undo
90 89
         {
91 90
             $this->cache[$classname] =
92 91
                 (
93
-                    ReflectionCompositeFactory::fromClassName
94
-                    (
92
+                    ReflectionCompositeFactory::fromClassName(
95 93
                         $classname
96 94
                     )
97 95
                 )
Please login to merge, or discard this patch.