From 89b6063daa42870bc08e4ce6e670f2ae62634bba Mon Sep 17 00:00:00 2001 From: murtukov Date: Tue, 4 May 2021 18:39:00 +0200 Subject: [PATCH] Fix CS --- src/Argument.php | 8 ++++---- src/Method.php | 2 +- src/ScopedContentTrait.php | 5 +---- src/Signature.php | 4 ++-- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/Argument.php b/src/Argument.php index 21a631f..f0ba60f 100644 --- a/src/Argument.php +++ b/src/Argument.php @@ -13,10 +13,10 @@ class Argument extends DependencyAwareGenerator implements FunctionMemberInterfa private string $type; private string $name; - private bool $isSpread = false; + private bool $isSpread = false; private bool $isByReference = false; - private bool $isNullable = false; - private string $modifier = Modifier::NONE; + private bool $isNullable = false; + private string $modifier = Modifier::NONE; /** * @var mixed @@ -58,7 +58,7 @@ public function generate(): string $code = ''; if (Modifier::NONE !== $this->modifier) { - $code .= $this->modifier . ' '; + $code .= $this->modifier.' '; } if ($this->type) { diff --git a/src/Method.php b/src/Method.php index d4624b7..a6590f4 100644 --- a/src/Method.php +++ b/src/Method.php @@ -26,7 +26,7 @@ public static function new(string $name, string $modifier = Modifier::PUBLIC, st public function generate(): string { if ($this->signature->isMultiline) { - return $this->buildDocBlock() . $this->signature->generate(false) . " {{$this->generateWrappedContent()}}"; + return $this->buildDocBlock().$this->signature->generate(false)." {{$this->generateWrappedContent()}}"; } return <<content); @@ -121,6 +118,6 @@ protected function generateWrappedContent(string $left = "\n", string $right = " return ''; } - return $left . $content . $right; + return $left.$content.$right; } } diff --git a/src/Signature.php b/src/Signature.php index 677e192..28db076 100644 --- a/src/Signature.php +++ b/src/Signature.php @@ -178,7 +178,7 @@ public function bindVars(string ...$names): self public function generate(bool $withDocBlock = true): string { if ($this->isMultiline) { - $args = "\n" . Utils::indent(join(",\n", $this->args)) . "\n"; + $args = "\n".Utils::indent(join(",\n", $this->args))."\n"; } else { $args = join(', ', $this->args); } @@ -189,7 +189,7 @@ public function generate(bool $withDocBlock = true): string $returnType = ''; if (!empty($this->uses)) { - $uses = ' use ('. join(', ', $this->uses).')'; + $uses = ' use ('.join(', ', $this->uses).')'; } if ('' !== $this->returnType) {