Completed
Push — master ( 1f9a78...118fca )
by Emily
02:07
created
src/Exception/PropertyNotWritableException.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function __construct($class, $property, $previous = null)
10 10
     {
11
-        parent::__construct
12
-        (
11
+        parent::__construct(
13 12
               'Tried to write to unwritable property '
14 13
             . $class . '::$' . $property,
15 14
             0,
Please login to merge, or discard this patch.
src/Service/PropertyAccessor.php 1 patch
Spacing   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -36,14 +36,12 @@  discard block
 block discarded – undo
36 36
     {
37 37
         if (!$this->reflect->properties->contains($property))
38 38
         {
39
-            throw new CannotWritePropertyException
40
-            (
39
+            throw new CannotWritePropertyException(
41 40
                 get_class($this->object), $property
42 41
             );
43 42
         }
44 43
 
45
-        $this->setAnyValue
46
-        (
44
+        $this->setAnyValue(
47 45
             $this->reflect->properties[$property],
48 46
             $value
49 47
         );
@@ -57,8 +55,7 @@  discard block
 block discarded – undo
57 55
         }
58 56
         else
59 57
         {
60
-            $this->setNonNullValue
61
-            (
58
+            $this->setNonNullValue(
62 59
                 $property->name,
63 60
                 $value,
64 61
                 $property->type
@@ -125,8 +122,7 @@  discard block
 block discarded – undo
125 122
         }
126 123
         elseif (is_object($value) && method_exists([$value, $method]))
127 124
         {
128
-            $this->setScalarValue
129
-            (
125
+            $this->setScalarValue(
130 126
                 $property,
131 127
                 $value->$method(),
132 128
                 $method,
@@ -165,8 +161,7 @@  discard block
 block discarded – undo
165 161
 
166 162
     private function throwError($property, $expected, $value)
167 163
     {
168
-        throw new IllegalPropertyTypeException
169
-        (
164
+        throw new IllegalPropertyTypeException(
170 165
             get_class($this->object),
171 166
             $property,
172 167
             $expected,
Please login to merge, or discard this patch.
src/Service/ConditionalPropertyAccessor.php 1 patch
Spacing   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,8 +15,7 @@  discard block
 block discarded – undo
15 15
         }
16 16
         else
17 17
         {
18
-            throw new PropertyNotWritableException
19
-            (
18
+            throw new PropertyNotWritableException(
20 19
                 get_class($this->object),
21 20
                 $property->name
22 21
             );
@@ -27,16 +26,14 @@  discard block
 block discarded – undo
27 26
     {
28 27
         if (!$this->reflect->properties->contains($property))
29 28
         {
30
-            throw new CannotReadPropertyException
31
-            (
29
+            throw new CannotReadPropertyException(
32 30
                 get_class($this->object),
33 31
                 $property
34 32
             );
35 33
         }
36 34
         elseif (!$this->reflect->properties[$property]->readable)
37 35
         {
38
-            throw new PropertyNotReadableException
39
-            (
36
+            throw new PropertyNotReadableException(
40 37
                 get_class($this->object),
41 38
                 $property
42 39
             );
Please login to merge, or discard this patch.
src/Factory/Reflection/ReflectionCompositeFactory.php 1 patch
Spacing   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -21,13 +21,11 @@  discard block
 block discarded – undo
21 21
             (new ReflectionFileFactory($this->reflector->getFileName()))
22 22
                 ->build();
23 23
         $this->accessor->setRawValue('file', $file);
24
-        $this->accessor->setRawValue
25
-        (
24
+        $this->accessor->setRawValue(
26 25
             'classname',
27 26
             $this->reflector->name
28 27
         );
29
-        $this->accessor->setRawValue
30
-        (
28
+        $this->accessor->setRawValue(
31 29
             'namespace',
32 30
             $file->namespaces[$this->reflector->getNamespaceName()]
33 31
         );
@@ -53,15 +51,13 @@  discard block
 block discarded – undo
53 51
 
54 52
     protected function buildProperty($reflect)
55 53
     {
56
-        $properties = $this->accessor->getRawValue
57
-        (
54
+        $properties = $this->accessor->getRawValue(
58 55
             'properties'
59 56
         );
60 57
 
61 58
         $properties[$reflect->getName()] = 
62 59
             (new ReflectionPropertyFactory($reflect))
63
-                ->build
64
-                (
60
+                ->build(
65 61
                     $this->object,
66 62
                     $this->reflector
67 63
                         ->getDefaultProperties()[$reflect->getName()]
@@ -70,8 +66,7 @@  discard block
 block discarded – undo
70 66
 
71 67
     protected function buildMethod($reflect)
72 68
     {
73
-        $this->accessor->rawAddToValue
74
-        (
69
+        $this->accessor->rawAddToValue(
75 70
             'methods',
76 71
             (new ReflectionMethodFactory($reflect))
77 72
                 ->build($this->object)
Please login to merge, or discard this patch.
src/Traits/PropertyAccessTrait.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@  discard block
 block discarded – undo
26 26
         if (!static::$reflectionComposite)
27 27
         {
28 28
             static::$reflectionComposite =
29
-                ReflectionCompositeFactory::fromClassName
30
-                (
29
+                ReflectionCompositeFactory::fromClassName(
31 30
                     get_called_class()
32 31
                 )
33 32
                 ->build();
@@ -48,8 +47,7 @@  discard block
 block discarded – undo
48 47
 
49 48
     protected function initPropertyAccessTrait()
50 49
     {
51
-        $this->accessor = new ConditionalPropertyAccessor
52
-        (
50
+        $this->accessor = new ConditionalPropertyAccessor(
53 51
             $this,
54 52
             self::getReflectionComposite()
55 53
         );
Please login to merge, or discard this patch.