Completed
Push — master ( 04ec92...1a0fab )
by Anton
02:11
created
source/Spiral/Models/DynamicEntity.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
     {
120 120
         //We do support 3 mutators: getter, setter and accessor, all of them can be
121 121
         //referenced to valid field name by adding "s" at the end
122
-        $mutator = $mutator . 's';
122
+        $mutator = $mutator.'s';
123 123
 
124 124
         if (isset($this->{$mutator}[$field])) {
125 125
             return $this->{$mutator}[$field];
Please login to merge, or discard this patch.
source/Spiral/Support/Serializer.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
         }
52 52
 
53 53
         //Delimiters between rows and sub-arrays.
54
-        $subIndent = "\n" . str_repeat(self::INDENT, $level + 2);
55
-        $keyIndent = "\n" . str_repeat(self::INDENT, $level + 1);
54
+        $subIndent = "\n".str_repeat(self::INDENT, $level + 2);
55
+        $keyIndent = "\n".str_repeat(self::INDENT, $level + 1);
56 56
 
57 57
         //No keys for associated array
58 58
         $associated = array_diff_key($array, array_keys(array_keys($array)));
@@ -74,28 +74,28 @@  discard block
 block discarded – undo
74 74
                         var_export($key, true),
75 75
                         $innerIndent, ' ',
76 76
                         STR_PAD_RIGHT
77
-                    ) . " => ";
77
+                    )." => ";
78 78
             }
79 79
 
80 80
             if (!is_array($value)) {
81
-                $result[] = $prefix . $this->packValue($value);
81
+                $result[] = $prefix.$this->packValue($value);
82 82
                 continue;
83 83
             }
84 84
 
85 85
             if ($value === []) {
86
-                $result[] = $prefix . "[]";
86
+                $result[] = $prefix."[]";
87 87
                 continue;
88 88
             }
89 89
 
90 90
             $subArray = $this->packArray($value, $level + 1);
91
-            $result[] = $prefix . "[{$subIndent}" . $subArray . "{$keyIndent}]";
91
+            $result[] = $prefix."[{$subIndent}".$subArray."{$keyIndent}]";
92 92
         }
93 93
 
94 94
         if ($level !== 0) {
95 95
             return $result ? join(",{$keyIndent}", $result) : "";
96 96
         }
97 97
 
98
-        return "[{$keyIndent}" . join(",{$keyIndent}", $result) . "\n]";
98
+        return "[{$keyIndent}".join(",{$keyIndent}", $result)."\n]";
99 99
     }
100 100
 
101 101
     /**
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         if (is_string($value) && class_exists($value)) {
134 134
             $reflection = new \ReflectionClass($value);
135 135
 
136
-            return '\\' . $reflection->getName() . '::class';
136
+            return '\\'.$reflection->getName().'::class';
137 137
         }
138 138
 
139 139
         return var_export($value, true);
Please login to merge, or discard this patch.
source/Spiral/Debug/Dumper.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
         if (!$hideHeader && !empty($name)) {
129 129
             //Showing element name (if any provided)
130
-            $header = $indent . $this->style->apply($name, 'name');
130
+            $header = $indent.$this->style->apply($name, 'name');
131 131
 
132 132
             //Showing equal sing
133 133
             $header .= $this->style->apply(' = ', 'syntax', '=');
@@ -137,24 +137,24 @@  discard block
 block discarded – undo
137 137
 
138 138
         if ($level > $this->maxLevel) {
139 139
             //Dumper is not reference based, we can't dump too deep values
140
-            return $indent . $this->style->apply('-too deep-', 'maxLevel') . "\n";
140
+            return $indent.$this->style->apply('-too deep-', 'maxLevel')."\n";
141 141
         }
142 142
 
143 143
         $type = strtolower(gettype($value));
144 144
 
145 145
         if ($type == 'array') {
146
-            return $header . $this->dumpArray($value, $level, $hideHeader);
146
+            return $header.$this->dumpArray($value, $level, $hideHeader);
147 147
         }
148 148
 
149 149
         if ($type == 'object') {
150
-            return $header . $this->dumpObject($value, $level, $hideHeader);
150
+            return $header.$this->dumpObject($value, $level, $hideHeader);
151 151
         }
152 152
 
153 153
         if ($type == 'resource') {
154 154
             //No need to dump resource value
155
-            $element = get_resource_type($value) . ' resource ';
155
+            $element = get_resource_type($value).' resource ';
156 156
 
157
-            return $header . $this->style->apply($element, 'type', 'resource') . "\n";
157
+            return $header.$this->style->apply($element, 'type', 'resource')."\n";
158 158
         }
159 159
 
160 160
         //Value length
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         }
182 182
 
183 183
         //Including value
184
-        return $header . ' ' . $this->style->apply($element, 'value', $type) . "\n";
184
+        return $header.' '.$this->style->apply($element, 'value', $type)."\n";
185 185
     }
186 186
 
187 187
     /**
@@ -199,8 +199,8 @@  discard block
 block discarded – undo
199 199
             $count = count($array);
200 200
 
201 201
             //Array size and scope
202
-            $output = $this->style->apply("array({$count})", 'type', 'array') . "\n";
203
-            $output .= $indent . $this->style->apply('[', 'syntax', '[') . "\n";
202
+            $output = $this->style->apply("array({$count})", 'type', 'array')."\n";
203
+            $output .= $indent.$this->style->apply('[', 'syntax', '[')."\n";
204 204
         } else {
205 205
             $output = '';
206 206
         }
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 
220 220
         if (!$hideHeader) {
221 221
             //Closing array scope
222
-            $output .= $indent . $this->style->apply(']', 'syntax', ']') . "\n";
222
+            $output .= $indent.$this->style->apply(']', 'syntax', ']')."\n";
223 223
         }
224 224
 
225 225
         return $output;
@@ -242,10 +242,10 @@  discard block
 block discarded – undo
242 242
         $indent = $this->style->indent($level);
243 243
 
244 244
         if (!$hideHeader) {
245
-            $type = ($class ?: get_class($object)) . ' object ';
245
+            $type = ($class ?: get_class($object)).' object ';
246 246
 
247
-            $header = $this->style->apply($type, 'type', 'object') . "\n";
248
-            $header .= $indent . $this->style->apply('(', 'syntax', '(') . "\n";
247
+            $header = $this->style->apply($type, 'type', 'object')."\n";
248
+            $header .= $indent.$this->style->apply('(', 'syntax', '(')."\n";
249 249
         } else {
250 250
             $header = '';
251 251
         }
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 
271 271
             return $header
272 272
                 . $this->dumpValue($debugInfo, '', $level + (is_scalar($object)), true)
273
-                . $indent . $this->style->apply(')', 'syntax', ')') . "\n";
273
+                . $indent.$this->style->apply(')', 'syntax', ')')."\n";
274 274
         }
275 275
 
276 276
         $refection = new \ReflectionObject($object);
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
         }
282 282
 
283 283
         //Header, content, footer
284
-        return $header . $output . $indent . $this->style->apply(')', 'syntax', ')') . "\n";
284
+        return $header.$output.$indent.$this->style->apply(')', 'syntax', ')')."\n";
285 285
     }
286 286
 
287 287
     /**
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
             $name = $this->style->apply($property->getName(), 'dynamic');
317 317
         } else {
318 318
             //Property name includes access level
319
-            $name = $property->getName() . $this->style->apply(':' . $access, 'access', $access);
319
+            $name = $property->getName().$this->style->apply(':'.$access, 'access', $access);
320 320
         }
321 321
 
322 322
         return $this->dumpValue($property->getValue($object), $name, $level + 1);
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
         $reflection = new \ReflectionFunction($closure);
335 335
 
336 336
         return [
337
-            'name' => $reflection->getName() . " (lines {$reflection->getStartLine()}:{$reflection->getEndLine()})",
337
+            'name' => $reflection->getName()." (lines {$reflection->getStartLine()}:{$reflection->getEndLine()})",
338 338
             'file' => $reflection->getFileName(),
339 339
             'this' => $reflection->getClosureThis()
340 340
         ];
Please login to merge, or discard this patch.
source/Spiral/Reactor/Prototypes/Declaration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      */
32 32
     protected function addIndent(string $string, int $indent = 0): string
33 33
     {
34
-        return str_repeat(self::INDENT, max($indent, 0)) . $string;
34
+        return str_repeat(self::INDENT, max($indent, 0)).$string;
35 35
     }
36 36
 
37 37
     /**
Please login to merge, or discard this patch.
source/Spiral/Reactor/NamespaceDeclaration.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,22 +86,22 @@
 block discarded – undo
86 86
         $indentShift = 0;
87 87
 
88 88
         if (!$this->docComment->isEmpty()) {
89
-            $result .= $this->docComment->render($indentLevel) . "\n";
89
+            $result .= $this->docComment->render($indentLevel)."\n";
90 90
         }
91 91
 
92 92
         if (!empty($this->getName())) {
93
-            $result = $this->addIndent("namespace {$this->getName()} {", $indentLevel) . "\n";
93
+            $result = $this->addIndent("namespace {$this->getName()} {", $indentLevel)."\n";
94 94
             $indentShift = 1;
95 95
         }
96 96
 
97 97
         if (!empty($this->uses)) {
98
-            $result .= $this->renderUses($indentLevel + $indentShift) . "\n\n";
98
+            $result .= $this->renderUses($indentLevel + $indentShift)."\n\n";
99 99
         }
100 100
 
101 101
         $result .= $this->elements->render($indentLevel + $indentShift);
102 102
 
103 103
         if (!empty($this->getName())) {
104
-            $result .= "\n" . $this->addIndent("}", $indentLevel);
104
+            $result .= "\n".$this->addIndent("}", $indentLevel);
105 105
         }
106 106
 
107 107
         return $result;
Please login to merge, or discard this patch.
source/Spiral/Reactor/ClassDeclaration/ParameterDeclaration.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -147,15 +147,15 @@
 block discarded – undo
147 147
     {
148 148
         $type = '';
149 149
         if (!empty($this->type)) {
150
-            $type = $this->type . " ";
150
+            $type = $this->type." ";
151 151
         }
152 152
 
153
-        $result = $type . ($this->pdb ? '&' : '') . "$" . $this->getName();
153
+        $result = $type.($this->pdb ? '&' : '')."$".$this->getName();
154 154
 
155 155
         if (!$this->isOptional) {
156 156
             return $result;
157 157
         }
158 158
 
159
-        return $result . ' = ' . $this->getSerializer()->serialize($this->defaultValue);
159
+        return $result.' = '.$this->getSerializer()->serialize($this->defaultValue);
160 160
     }
161 161
 }
162 162
\ No newline at end of file
Please login to merge, or discard this patch.
source/Spiral/Reactor/ClassDeclaration/PropertyDeclaration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
     {
108 108
         $result = '';
109 109
         if (!$this->docComment->isEmpty()) {
110
-            $result .= $this->docComment->render($indentLevel) . "\n";
110
+            $result .= $this->docComment->render($indentLevel)."\n";
111 111
         }
112 112
 
113 113
         $result .= $this->addIndent("{$this->access} \${$this->getName()}", $indentLevel);
Please login to merge, or discard this patch.
source/Spiral/Reactor/ClassDeclaration/ConstantDeclaration.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,12 +79,12 @@
 block discarded – undo
79 79
     {
80 80
         $result = '';
81 81
         if (!$this->docComment->isEmpty()) {
82
-            $result .= $this->docComment->render($indentLevel) . "\n";
82
+            $result .= $this->docComment->render($indentLevel)."\n";
83 83
         }
84 84
 
85 85
         $result .= $this->addIndent("const {$this->getName()} = ", $indentLevel);
86 86
 
87 87
         //todo: make indent level work
88
-        return $result . $this->getSerializer()->serialize($this->value);
88
+        return $result.$this->getSerializer()->serialize($this->value);
89 89
     }
90 90
 }
91 91
\ No newline at end of file
Please login to merge, or discard this patch.
source/Spiral/Reactor/ClassDeclaration/MethodDeclaration.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     {
142 142
         $result = '';
143 143
         if (!$this->docComment->isEmpty()) {
144
-            $result .= $this->docComment->render($indentLevel) . "\n";
144
+            $result .= $this->docComment->render($indentLevel)."\n";
145 145
         }
146 146
 
147 147
         $method = "{$this->getAccess()} function {$this->getName()}";
@@ -151,11 +151,11 @@  discard block
 block discarded – undo
151 151
             $method .= "()";
152 152
         }
153 153
 
154
-        $result .= $this->addIndent($method, $indentLevel) . "\n";
155
-        $result .= $this->addIndent('{', $indentLevel) . "\n";
154
+        $result .= $this->addIndent($method, $indentLevel)."\n";
155
+        $result .= $this->addIndent('{', $indentLevel)."\n";
156 156
 
157 157
         if (!$this->source->isEmpty()) {
158
-            $result .= $this->source->render($indentLevel + 1) . "\n";
158
+            $result .= $this->source->render($indentLevel + 1)."\n";
159 159
         }
160 160
 
161 161
         $result .= $this->addIndent("}", $indentLevel);
Please login to merge, or discard this patch.