Passed
Push — master ( 33ac6d...9d1064 )
by Kirill
04:07
created
src/Attributes/src/FallbackAttributeReader.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     {
71 71
         // 1) Can not parse internal classes
72 72
         // 2) Anonymous classes don't support attributes (PHP semantic)
73
-        if ($class->isInternal() || $class->isAnonymous()) {
73
+        if ($class->isInternal() || $class->isAnonymous()){
74 74
             return [];
75 75
         }
76 76
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     protected function getFunctionAttributes(\ReflectionFunctionAbstract $function, ?string $name): iterable
86 86
     {
87 87
         // Can not parse internal functions
88
-        if ($function->isInternal()) {
88
+        if ($function->isInternal()){
89 89
             return [];
90 90
         }
91 91
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         $class = $property->getDeclaringClass();
104 104
 
105 105
         // Can not parse property of internal class
106
-        if ($class->isInternal()) {
106
+        if ($class->isInternal()){
107 107
             return [];
108 108
         }
109 109
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $class = $const->getDeclaringClass();
121 121
 
122 122
         // Can not parse internal classes
123
-        if ($class->isInternal()) {
123
+        if ($class->isInternal()){
124 124
             return [];
125 125
         }
126 126
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         $function = $param->getDeclaringFunction();
138 138
 
139 139
         // Can not parse parameter of internal function
140
-        if ($function->isInternal()) {
140
+        if ($function->isInternal()){
141 141
             return [];
142 142
         }
143 143
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
          */
178 178
         $line = $function->getEndLine();
179 179
 
180
-        if ($result = $attributes[$line] ?? null) {
180
+        if ($result = $attributes[$line] ?? null){
181 181
             return $result;
182 182
         }
183 183
 
@@ -202,8 +202,8 @@  discard block
 block discarded – undo
202 202
          *  $ast->getEndLine(); // 2 (last significant character of a function)
203 203
          * </code>
204 204
          */
205
-        while ($line-- > 0) {
206
-            if ($result = $attributes[$line] ?? null) {
205
+        while ($line-- > 0){
206
+            if ($result = $attributes[$line] ?? null){
207 207
                 return $result;
208 208
             }
209 209
         }
@@ -218,8 +218,8 @@  discard block
 block discarded – undo
218 218
      */
219 219
     private function format(iterable $attributes, ?string $name): iterable
220 220
     {
221
-        foreach ($attributes as $prototype) {
222
-            if ($name !== null && ! \is_subclass_of($prototype->name, $name) && $prototype->name !== $name) {
221
+        foreach ($attributes as $prototype){
222
+            if ($name !== null && !\is_subclass_of($prototype->name, $name) && $prototype->name !== $name){
223 223
                 continue;
224 224
             }
225 225
 
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
      */
246 246
     private function parseAttributes(string $file, int $context): array
247 247
     {
248
-        if (!isset($this->attributes[$file])) {
248
+        if (!isset($this->attributes[$file])){
249 249
             $found = $this->parser->parse($file);
250 250
 
251 251
             $this->attributes[$file] = [
Please login to merge, or discard this patch.