Remove useless cast (string) and @var doc

This commit is contained in:
Abdul Malik Ikhsan 2025-01-17 02:48:25 +07:00 committed by Nikita Popov
parent 7d3039c378
commit d4fce83c2c
2 changed files with 1 additions and 2 deletions

View File

@ -8,7 +8,6 @@ use PhpParser\NodeAbstract;
class MatchArm extends NodeAbstract {
/** @var null|list<Node\Expr> */
public ?array $conds;
/** @var Node\Expr */
public Expr $body;
/**

View File

@ -145,7 +145,7 @@ class NodeDumper {
} elseif ($node instanceof Comment) {
$this->res .= \str_replace("\n", $this->nl, $node->getReformattedText());
} elseif (\is_string($node)) {
$this->res .= \str_replace("\n", $this->nl, (string)$node);
$this->res .= \str_replace("\n", $this->nl, $node);
} elseif (\is_int($node) || \is_float($node)) {
$this->res .= $node;
} elseif (null === $node) {