@@ -88,7 +88,7 @@ |
||
| 88 | 88 | */ |
| 89 | 89 | protected function classReflection(string $class): \ReflectionClass |
| 90 | 90 | { |
| 91 | - $loader = function ($class) { |
|
| 91 | + $loader = function($class) { |
|
| 92 | 92 | throw new LocatorException("Class '{$class}' can not be loaded"); |
| 93 | 93 | }; |
| 94 | 94 | |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | { |
| 91 | 91 | if (defined('static::GUARD_NAMESPACE')) { |
| 92 | 92 | //Yay! Isolation |
| 93 | - $permission = constant(get_called_class() . '::' . 'GUARD_NAMESPACE') . '.' . $permission; |
|
| 93 | + $permission = constant(get_called_class().'::'.'GUARD_NAMESPACE').'.'.$permission; |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | return $permission; |
@@ -116,7 +116,7 @@ |
||
| 116 | 116 | public function render(int $indentLevel = 0): string |
| 117 | 117 | { |
| 118 | 118 | $lines = $this->lines; |
| 119 | - array_walk($lines, function (&$line) use ($indentLevel) { |
|
| 119 | + array_walk($lines, function(&$line) use ($indentLevel) { |
|
| 120 | 120 | $line = $this->addIndent($line, $indentLevel); |
| 121 | 121 | }); |
| 122 | 122 | |
@@ -107,7 +107,7 @@ |
||
| 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); |
@@ -31,7 +31,7 @@ |
||
| 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 | /** |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | |
| 41 | 41 | $name = $context->getName(); |
| 42 | 42 | if ($context instanceof \ReflectionMethod) { |
| 43 | - $name = $context->class . '::' . $name; |
|
| 43 | + $name = $context->class.'::'.$name; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | parent::__construct("Unable to resolve '{$parameter->name}' argument in '{$name}'"); |
@@ -392,7 +392,7 @@ discard block |
||
| 392 | 392 | $path = str_replace(['//', '\\'], '/', $path); |
| 393 | 393 | |
| 394 | 394 | //Potentially open links and ../ type directories? |
| 395 | - return rtrim($path, '/') . ($asDirectory ? '/' : ''); |
|
| 395 | + return rtrim($path, '/').($asDirectory ? '/' : ''); |
|
| 396 | 396 | } |
| 397 | 397 | |
| 398 | 398 | /** |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | $relative = array_pad($relative, $padLength, '..'); |
| 424 | 424 | break; |
| 425 | 425 | } else { |
| 426 | - $relative[0] = './' . $relative[0]; |
|
| 426 | + $relative[0] = './'.$relative[0]; |
|
| 427 | 427 | } |
| 428 | 428 | } |
| 429 | 429 | } |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | $result = ''; |
| 319 | 319 | |
| 320 | 320 | if (!$this->docComment->isEmpty()) { |
| 321 | - $result .= $this->docComment->render($indentLevel) . "\n"; |
|
| 321 | + $result .= $this->docComment->render($indentLevel)."\n"; |
|
| 322 | 322 | } |
| 323 | 323 | |
| 324 | 324 | //Class header |
@@ -334,13 +334,13 @@ discard block |
||
| 334 | 334 | $header .= " implements {$interfaces}"; |
| 335 | 335 | } |
| 336 | 336 | |
| 337 | - $result .= $this->addIndent($header, $indentLevel) . "\n"; |
|
| 338 | - $result .= $this->addIndent("{", $indentLevel) . "\n"; |
|
| 337 | + $result .= $this->addIndent($header, $indentLevel)."\n"; |
|
| 338 | + $result .= $this->addIndent("{", $indentLevel)."\n"; |
|
| 339 | 339 | |
| 340 | 340 | //Rendering class body |
| 341 | 341 | $result .= $this->renderBody($indentLevel); |
| 342 | 342 | |
| 343 | - $result = rtrim($result, "\n") . "\n"; |
|
| 343 | + $result = rtrim($result, "\n")."\n"; |
|
| 344 | 344 | $result .= $this->addIndent("}", $indentLevel); |
| 345 | 345 | |
| 346 | 346 | return $result; |
@@ -370,19 +370,19 @@ discard block |
||
| 370 | 370 | { |
| 371 | 371 | $result = ''; |
| 372 | 372 | if (!empty($this->traits)) { |
| 373 | - $result .= $this->renderTraits($indentLevel + 1) . "\n\n"; |
|
| 373 | + $result .= $this->renderTraits($indentLevel + 1)."\n\n"; |
|
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | if (!$this->constants->isEmpty()) { |
| 377 | - $result .= $this->constants->render($indentLevel + 1) . "\n\n"; |
|
| 377 | + $result .= $this->constants->render($indentLevel + 1)."\n\n"; |
|
| 378 | 378 | } |
| 379 | 379 | |
| 380 | 380 | if (!$this->properties->isEmpty()) { |
| 381 | - $result .= $this->properties->render($indentLevel + 1) . "\n\n"; |
|
| 381 | + $result .= $this->properties->render($indentLevel + 1)."\n\n"; |
|
| 382 | 382 | } |
| 383 | 383 | |
| 384 | 384 | if (!$this->methods->isEmpty()) { |
| 385 | - $result .= $this->methods->render($indentLevel + 1) . "\n\n"; |
|
| 385 | + $result .= $this->methods->render($indentLevel + 1)."\n\n"; |
|
| 386 | 386 | } |
| 387 | 387 | |
| 388 | 388 | return $result; |