Passed
Push — master ( 11546f...bc8fa1 )
by Pieter
01:45
created
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   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     {
37 37
         return $this->cacheCheck(
38 38
             __FUNCTION__ . ',' . $reflectionClass->name,
39
-            function (ReflectionClass $reflectionClass) {
39
+            function(ReflectionClass $reflectionClass) {
40 40
                 return $this->internal->getGetterFields($reflectionClass);
41 41
             },
42 42
             $reflectionClass
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     {
51 51
         return $this->cacheCheck(
52 52
             __FUNCTION__ . ',' . $reflectionClass->name,
53
-            function (ReflectionClass $reflectionClass) {
53
+            function(ReflectionClass $reflectionClass) {
54 54
                 return $this->internal->getSetterFields($reflectionClass);
55 55
             },
56 56
             $reflectionClass
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     {
65 65
         return $this->cacheCheck(
66 66
             __FUNCTION__ . ',' . $reflectionClass->name . ',' . $fieldName,
67
-            function (ReflectionClass $reflectionClass, string $fieldName) {
67
+            function(ReflectionClass $reflectionClass, string $fieldName) {
68 68
                 return $this->internal->getGetterTypes($reflectionClass, $fieldName);
69 69
             },
70 70
             $reflectionClass,
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     {
80 80
         return $this->cacheCheck(
81 81
             __FUNCTION__ . ',' . $reflectionClass->name . ',' . $fieldName,
82
-            function (ReflectionClass $reflectionClass, string $fieldName) {
82
+            function(ReflectionClass $reflectionClass, string $fieldName) {
83 83
                 return $this->internal->getSetterTypes($reflectionClass, $fieldName);
84 84
             },
85 85
             $reflectionClass,
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     {
95 95
         return $this->cacheCheck(
96 96
             __FUNCTION__ . ',' . $reflectionClass->name,
97
-            function (ReflectionClass $reflectionClass) {
97
+            function(ReflectionClass $reflectionClass) {
98 98
                 return $this->internal->getConstructorArguments($reflectionClass);
99 99
             },
100 100
             $reflectionClass
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     {
133 133
         return $this->cacheCheck(
134 134
             __FUNCTION__ . ',' . $reflectionClass->name . ',' . $fieldName . ',' . json_encode($preferGetters),
135
-            function (ReflectionClass $reflectionClass, string $fieldName, bool $preferGetters) {
135
+            function(ReflectionClass $reflectionClass, string $fieldName, bool $preferGetters) {
136 136
                 return $this->internal->getDescription($reflectionClass, $fieldName, $preferGetters);
137 137
             },
138 138
             $reflectionClass,
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     {
149 149
         return $this->cacheCheck(
150 150
             __FUNCTION__ . ',' . $reflectionClass->name,
151
-            function (ReflectionClass $reflectionClass) {
151
+            function(ReflectionClass $reflectionClass) {
152 152
                 if ($this->internal instanceof ObjectAccessSupportedInterface) {
153 153
                     return $this->internal->isSupported($reflectionClass);
154 154
                 }
Please login to merge, or discard this patch.