Completed
Push — master ( 415f77...e0364f )
by Pieter
02:22
created
src/ObjectAccess/FilteredObjectAccess.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     public function getGetterFields(ReflectionClass $reflectionClass): array
33 33
     {
34 34
         $result = $this->objectAccess->getGetterFields($reflectionClass);
35
-        return array_values(array_filter($result, function (string $fieldName) {
35
+        return array_values(array_filter($result, function(string $fieldName) {
36 36
             return isset($this->filteredFields[$fieldName]);
37 37
         }));
38 38
     }
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     public function getSetterFields(ReflectionClass $reflectionClass): array
41 41
     {
42 42
         $result = $this->objectAccess->getSetterFields($reflectionClass);
43
-        return array_values(array_filter($result, function (string $fieldName) {
43
+        return array_values(array_filter($result, function(string $fieldName) {
44 44
             return isset($this->filteredFields[$fieldName]);
45 45
         }));
46 46
     }
Please login to merge, or discard this patch.
src/ObjectAccess/ObjectAccess.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -47,16 +47,16 @@  discard block
 block discarded – undo
47 47
     /**
48 48
      * @var bool
49 49
      */
50
-    private $disabledConstructor ;
50
+    private $disabledConstructor;
51 51
 
52 52
     public function __construct(bool $publicOnly = true, bool $disabledConstructor = false)
53 53
     {
54 54
         $this->methodFlags = $publicOnly
55 55
             ? ReflectionMethod::IS_PUBLIC
56
-            : (ReflectionMethod::IS_PUBLIC|ReflectionMethod::IS_PROTECTED|ReflectionMethod::IS_PRIVATE);
56
+            : (ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PROTECTED | ReflectionMethod::IS_PRIVATE);
57 57
         $this->propertyFlags = $publicOnly
58 58
             ? ReflectionProperty::IS_PUBLIC
59
-            : (ReflectionProperty::IS_PUBLIC|ReflectionProperty::IS_PROTECTED|ReflectionProperty::IS_PRIVATE);
59
+            : (ReflectionProperty::IS_PUBLIC | ReflectionProperty::IS_PROTECTED | ReflectionProperty::IS_PRIVATE);
60 60
         $this->disabledConstructor = $disabledConstructor;
61 61
         $this->phpDocExtractor = new PhpDocExtractor();
62 62
     }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     private function sort(array& $options)
74 74
     {
75
-        usort($options, function ($a, $b) {
75
+        usort($options, function($a, $b) {
76 76
             if ($a instanceof ReflectionProperty) {
77 77
                 return 1;
78 78
             }
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      */
104 104
     protected function getGetterMapping(ReflectionClass $reflectionClass): array
105 105
     {
106
-        $className= $reflectionClass->getName();
106
+        $className = $reflectionClass->getName();
107 107
         if (isset($this->getterCache[$className])) {
108 108
             return $this->getterCache[$className];
109 109
         }
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
      */
142 142
     protected function getSetterMapping(ReflectionClass $reflectionClass): array
143 143
     {
144
-        $className= $reflectionClass->getName();
144
+        $className = $reflectionClass->getName();
145 145
         if (isset($this->setterCache[$className])) {
146 146
             return $this->setterCache[$className];
147 147
         }
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
         } else {
395 395
             $res = $this->getGetterTypes($reflectionClass, $parameter->name);
396 396
         }
397
-        return reset($res) ? : null;
397
+        return reset($res) ?: null;
398 398
     }
399 399
 
400 400
     /**
Please login to merge, or discard this patch.
src/ObjectAccess/CachedObjectAccess.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     {
39 39
         return $this->cacheCheck(
40 40
             __FUNCTION__ . ',' . $reflectionClass->name,
41
-            function (ReflectionClass $reflectionClass) {
41
+            function(ReflectionClass $reflectionClass) {
42 42
                 return $this->internal->getGetterFields($reflectionClass);
43 43
             },
44 44
             $reflectionClass
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     {
53 53
         return $this->cacheCheck(
54 54
             __FUNCTION__ . ',' . $reflectionClass->name,
55
-            function (ReflectionClass $reflectionClass) {
55
+            function(ReflectionClass $reflectionClass) {
56 56
                 return $this->internal->getSetterFields($reflectionClass);
57 57
             },
58 58
             $reflectionClass
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     {
67 67
         return $this->cacheCheck(
68 68
             __FUNCTION__ . ',' . $reflectionClass->name . ',' . $fieldName,
69
-            function (ReflectionClass $reflectionClass, string $fieldName) {
69
+            function(ReflectionClass $reflectionClass, string $fieldName) {
70 70
                 return $this->internal->getGetterTypes($reflectionClass, $fieldName);
71 71
             },
72 72
             $reflectionClass,
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     {
82 82
         return $this->cacheCheck(
83 83
             __FUNCTION__ . ',' . $reflectionClass->name . ',' . $fieldName,
84
-            function (ReflectionClass $reflectionClass, string $fieldName) {
84
+            function(ReflectionClass $reflectionClass, string $fieldName) {
85 85
                 return $this->internal->getSetterTypes($reflectionClass, $fieldName);
86 86
             },
87 87
             $reflectionClass,
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     {
97 97
         return $this->cacheCheck(
98 98
             __FUNCTION__ . ',' . $reflectionClass->name,
99
-            function (ReflectionClass $reflectionClass) {
99
+            function(ReflectionClass $reflectionClass) {
100 100
                 return $this->internal->getConstructorArguments($reflectionClass);
101 101
             },
102 102
             $reflectionClass
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     {
135 135
         return $this->cacheCheck(
136 136
             __FUNCTION__ . ',' . $reflectionClass->name . ',' . $fieldName . ',' . json_encode($preferGetters),
137
-            function (ReflectionClass $reflectionClass, string $fieldName, bool $preferGetters) {
137
+            function(ReflectionClass $reflectionClass, string $fieldName, bool $preferGetters) {
138 138
                 return $this->internal->getDescription($reflectionClass, $fieldName, $preferGetters);
139 139
             },
140 140
             $reflectionClass,
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     {
151 151
         return $this->cacheCheck(
152 152
             __FUNCTION__ . ',' . $reflectionClass->name,
153
-            function (ReflectionClass $reflectionClass) {
153
+            function(ReflectionClass $reflectionClass) {
154 154
                 if ($this->internal instanceof ObjectAccessSupportedInterface) {
155 155
                     return $this->internal->isSupported($reflectionClass);
156 156
                 }
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
     {
169 169
         return $this->cacheCheck(
170 170
             __FUNCTION__ . ',' . $method->name . ',' . ($reflectionClass ? $reflectionClass->name : '(null)'),
171
-            function (ReflectionMethod $method, ?ReflectionClass $reflectionClass = null) {
171
+            function(ReflectionMethod $method, ?ReflectionClass $reflectionClass = null) {
172 172
                 return $this->internal->getMethodArguments($method, $reflectionClass);
173 173
             },
174 174
             $method,
Please login to merge, or discard this patch.
src/Exceptions/ValidationException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
             $tmp = $errors->getExceptions();
27 27
             $tmp = reset($tmp);
28 28
             if ($tmp) {
29
-                $previous = reset($tmp) ? : null;
29
+                $previous = reset($tmp) ?: null;
30 30
             }
31 31
         }
32 32
         parent::__construct(422, 'A validation error occurred', $previous);
Please login to merge, or discard this patch.