Skip to content

Commit 92fb843

Browse files
author
Kirill Nesmeyanov
committed
Apply phpcs
1 parent bb1b41c commit 92fb843

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/Node/Literal/FloatLiteralNode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function __construct(
2020
public readonly float $value,
2121
string $raw = null,
2222
) {
23-
parent::__construct($raw ?? (string)$this->value);
23+
parent::__construct($raw ?? (string) $this->value);
2424
}
2525

2626
/**
@@ -33,7 +33,7 @@ public function __construct(
3333
*/
3434
public static function parse(string $value): static
3535
{
36-
return new static((float)$value, $value);
36+
return new static((float) $value, $value);
3737
}
3838

3939
public function getValue(): float

src/Node/Literal/IntLiteralNode.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function __construct(
2020
public readonly int $value,
2121
string $raw = null,
2222
) {
23-
parent::__construct($raw ?? (string)$this->value);
23+
parent::__construct($raw ?? (string) $this->value);
2424
}
2525

2626
/**
@@ -53,7 +53,7 @@ private static function split(string $literal): array
5353

5454
// One of: [ 0123, 0o23, 0x00, 0b01 ]
5555
if ($literal[0] === '0' && isset($literal[1])) {
56-
return [$isNegative, (int)(match ($literal[1]) {
56+
return [$isNegative, (int) (match ($literal[1]) {
5757
// hexadecimal
5858
'x', 'X' => \hexdec(\substr($literal, 2)),
5959
// binary
@@ -65,7 +65,7 @@ private static function split(string $literal): array
6565
})];
6666
}
6767

68-
return [$isNegative, (int)$literal];
68+
return [$isNegative, (int) $literal];
6969
}
7070

7171
public function getValue(): int

src/Node/Literal/StringLiteralNode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ private static function renderEscapeSequences(string $body): string
146146
*/
147147
private static function renderHexadecimalSequences(string $body): string
148148
{
149-
$callee = static fn(array $matches): string => \chr(\hexdec((string)$matches[1]));
149+
$callee = static fn(array $matches): string => \chr(\hexdec((string) $matches[1]));
150150

151151
/** @psalm-suppress InvalidArgument */
152152
return @\preg_replace_callback(self::HEX_SEQUENCE_PATTERN, $callee, $body) ?? $body;
@@ -161,7 +161,7 @@ private static function renderHexadecimalSequences(string $body): string
161161
private static function renderUtfSequences(string $body): string
162162
{
163163
$callee = static function (array $matches): string {
164-
$code = \hexdec((string)$matches[1]);
164+
$code = \hexdec((string) $matches[1]);
165165

166166
if (\function_exists('\\mb_chr')
167167
&& ($result = \mb_chr($code)) !== false

src/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function parse(#[Language('PHP')] mixed $source): ?TypeStatement
125125
/** @psalm-suppress PossiblyInvalidArgument */
126126
$source = File::new($source);
127127

128-
$allowedNestingLevel = (int)\ini_get('xdebug.max_nesting_level');
128+
$allowedNestingLevel = (int) \ini_get('xdebug.max_nesting_level');
129129

130130
try {
131131
\ini_set('xdebug.max_nesting_level', -1);

src/Traverser/DumperVisitor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function enter(Node $node): ?Command
3333
$suffix = \str_replace($this->prefix, '', $node::class);
3434

3535
if ($node instanceof \Stringable) {
36-
$suffix .= \sprintf('(%s)', (string)$node);
36+
$suffix .= \sprintf('(%s)', (string) $node);
3737
}
3838

3939
$this->write($prefix . $suffix . "\n");

0 commit comments

Comments
 (0)