Closed ili101 closed 10 months ago
Thanks, I'll check it.
There you go, fixed in the latest release.
May you please run the command "phpfmt: Upgrade fmt.phar ot fmt.stub.php"?
Thank you the attribute problem is solve as I see. regarding the null it still adds extra spaces. Also if you add additional function it not only add the extra space before the "?" but also one before the ":"
<?php
class User
{
public function setId(): ?static
{
return $this;
}
public function setId2(): ?static
{
return $this;
}
public function setId3(): ?static
{
return $this;
}
}
After:
<?php
class User
{
public function setId(): ?static
{
return $this;
}
public function setId2() : ?static
{
return $this;
}
public function setId3() : ?static
{
return $this;
}
}
Thanks, fixed
Thank you! looks good
Hello, it's still has extra spaces in this case. How can I fix this ?
My vscode setting.json
"phpfmt.exclude": [
"PSR2ModifierVisibilityStaticOrder"
]
<?php
class User
{
public function setEnable(bool $enable): static
{
$this->enable = $enable;
return $this;
}
public function getCreatedAt(): ? \DateTimeInterface // this still has extra spaces
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt) : static // this still has extra spaces
{
$this->createdAt = $createdAt;
return $this;
}
}
?>
Thanks, I'll check.
Confirmed, fixed
Thank you!
Null-safe return, extra space added before and after the "?". after adding the attribute with the parameters all the indentations got messed up. (PHP 8.2) Before: After: