@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | { |
135 | 135 | $result = ''; |
136 | 136 | if (!$this->docComment->isEmpty()) { |
137 | - $result .= $this->docComment->render($indentLevel) . "\n"; |
|
137 | + $result .= $this->docComment->render($indentLevel)."\n"; |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | $method = "{$this->getAccess()} function {$this->getName()}"; |
@@ -144,11 +144,11 @@ discard block |
||
144 | 144 | $method .= "()"; |
145 | 145 | } |
146 | 146 | |
147 | - $result .= $this->addIndent($method, $indentLevel) . "\n"; |
|
148 | - $result .= $this->addIndent('{', $indentLevel) . "\n"; |
|
147 | + $result .= $this->addIndent($method, $indentLevel)."\n"; |
|
148 | + $result .= $this->addIndent('{', $indentLevel)."\n"; |
|
149 | 149 | |
150 | 150 | if (!$this->source->isEmpty()) { |
151 | - $result .= $this->source->render($indentLevel + 1) . "\n"; |
|
151 | + $result .= $this->source->render($indentLevel + 1)."\n"; |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | $result .= $this->addIndent("}", $indentLevel); |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | $result = ''; |
294 | 294 | |
295 | 295 | if (!$this->docComment->isEmpty()) { |
296 | - $result .= $this->docComment->render($indentLevel) . "\n"; |
|
296 | + $result .= $this->docComment->render($indentLevel)."\n"; |
|
297 | 297 | } |
298 | 298 | |
299 | 299 | //Class header |
@@ -309,27 +309,27 @@ discard block |
||
309 | 309 | $header .= " implements {$interfaces}"; |
310 | 310 | } |
311 | 311 | |
312 | - $result .= $this->addIndent($header, $indentLevel) . "\n"; |
|
313 | - $result .= $this->addIndent("{", $indentLevel) . "\n"; |
|
312 | + $result .= $this->addIndent($header, $indentLevel)."\n"; |
|
313 | + $result .= $this->addIndent("{", $indentLevel)."\n"; |
|
314 | 314 | |
315 | 315 | //Rendering content |
316 | 316 | if (!empty($this->traits)) { |
317 | - $result .= $this->renderTraits($indentLevel + 1) . "\n\n"; |
|
317 | + $result .= $this->renderTraits($indentLevel + 1)."\n\n"; |
|
318 | 318 | } |
319 | 319 | |
320 | 320 | if (!$this->constants->isEmpty()) { |
321 | - $result .= $this->constants->render($indentLevel + 1) . "\n\n"; |
|
321 | + $result .= $this->constants->render($indentLevel + 1)."\n\n"; |
|
322 | 322 | } |
323 | 323 | |
324 | 324 | if (!$this->properties->isEmpty()) { |
325 | - $result .= $this->properties->render($indentLevel + 1) . "\n\n"; |
|
325 | + $result .= $this->properties->render($indentLevel + 1)."\n\n"; |
|
326 | 326 | } |
327 | 327 | |
328 | 328 | if (!$this->methods->isEmpty()) { |
329 | - $result .= $this->methods->render($indentLevel + 1) . "\n\n"; |
|
329 | + $result .= $this->methods->render($indentLevel + 1)."\n\n"; |
|
330 | 330 | } |
331 | 331 | |
332 | - $result = rtrim($result, "\n") . "\n"; |
|
332 | + $result = rtrim($result, "\n")."\n"; |
|
333 | 333 | $result .= $this->addIndent("}", $indentLevel); |
334 | 334 | |
335 | 335 | return $result; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | if ($this->isCloseTag($token)) { |
74 | 74 | $blockID = $this->uniqueID(); |
75 | 75 | |
76 | - $this->phpBlocks[$blockID] = $phpBlock . $token[1]; |
|
76 | + $this->phpBlocks[$blockID] = $phpBlock.$token[1]; |
|
77 | 77 | $isolated .= $this->placeholder($blockID); |
78 | 78 | |
79 | 79 | $phpBlock = ''; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | { |
139 | 139 | return preg_replace_callback( |
140 | 140 | $this->blockRegex(), |
141 | - function ($match) use ($partial, $blockIDs) { |
|
141 | + function($match) use ($partial, $blockIDs) { |
|
142 | 142 | if ($partial && !in_array($match['id'], $blockIDs)) { |
143 | 143 | return $match[0]; |
144 | 144 | } |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | */ |
180 | 180 | private function blockRegex(): string |
181 | 181 | { |
182 | - return '/' . |
|
182 | + return '/'. |
|
183 | 183 | preg_quote($this->prefix) |
184 | 184 | . '(?P<id>[0-9a-z]+)' |
185 | 185 | . preg_quote($this->postfix) |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | */ |
192 | 192 | private function uniqueID(): string |
193 | 193 | { |
194 | - return md5(count($this->phpBlocks) . uniqid(true)); |
|
194 | + return md5(count($this->phpBlocks).uniqid(true)); |
|
195 | 195 | } |
196 | 196 | |
197 | 197 | /** |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | */ |
202 | 202 | private function placeholder(string $blockID): string |
203 | 203 | { |
204 | - return $this->prefix . $blockID . $this->postfix; |
|
204 | + return $this->prefix.$blockID.$this->postfix; |
|
205 | 205 | } |
206 | 206 | |
207 | 207 | /** |
@@ -75,7 +75,7 @@ |
||
75 | 75 | $this->resolver->resolveArguments($method, $parameters)); |
76 | 76 | } catch (\Throwable $e) { |
77 | 77 | throw new RuleException( |
78 | - '[' . get_class($this) . '] ' . $e->getMessage(), |
|
78 | + '['.get_class($this).'] '.$e->getMessage(), |
|
79 | 79 | $e->getCode(), |
80 | 80 | $e |
81 | 81 | ); |
@@ -124,7 +124,7 @@ |
||
124 | 124 | |
125 | 125 | if (!$rule instanceof RuleInterface) { |
126 | 126 | throw new RuleException( |
127 | - "Rule '{$name}' must point to RuleInterface, '" . get_class($rule) . "' given" |
|
127 | + "Rule '{$name}' must point to RuleInterface, '".get_class($rule)."' given" |
|
128 | 128 | ); |
129 | 129 | } |
130 | 130 |
@@ -174,7 +174,7 @@ |
||
174 | 174 | { |
175 | 175 | //We do support 3 mutators: getter, setter and accessor, all of them can be |
176 | 176 | //referenced to valid field name by adding "s" at the end |
177 | - $mutator = $mutator . 's'; |
|
177 | + $mutator = $mutator.'s'; |
|
178 | 178 | |
179 | 179 | if (isset($this->{$mutator}[$field])) { |
180 | 180 | return $this->{$mutator}[$field]; |
@@ -424,7 +424,7 @@ |
||
424 | 424 | |
425 | 425 | if (!$injector instanceof InjectorInterface) { |
426 | 426 | throw new InjectionException( |
427 | - "Class '" . get_class($injector) . "' must be an instance of InjectorInterface for '{$reflection->getName()}'" |
|
427 | + "Class '".get_class($injector)."' must be an instance of InjectorInterface for '{$reflection->getName()}'" |
|
428 | 428 | ); |
429 | 429 | } |
430 | 430 |
@@ -426,7 +426,7 @@ |
||
426 | 426 | ): AccessorInterface { |
427 | 427 | if (!is_string($accessor) || !class_exists($accessor)) { |
428 | 428 | throw new EntityException( |
429 | - "Unable to create accessor for field {$name} in " . static::class |
|
429 | + "Unable to create accessor for field {$name} in ".static::class |
|
430 | 430 | ); |
431 | 431 | } |
432 | 432 |
@@ -127,7 +127,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | ]; |