Skip to content

Commit 8943bb3

Browse files
author
Kirill Nesmeyanov
committed
Fix int literal node parsing
1 parent ace7eee commit 8943bb3

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/Node/Literal/IntLiteralNode.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,12 @@ public function __construct(
2121

2222
public static function parse(string $value): static
2323
{
24-
if (!\is_numeric($value)) {
25-
return new static(0, $value);
26-
}
27-
2824
[$isNegative, $decimal] = self::split($value);
2925

3026
return new static($isNegative ? -$decimal : $decimal, $value);
3127
}
3228

3329
/**
34-
* @param numeric-string $literal
35-
*
3630
* @return array{bool, int}
3731
*/
3832
private static function split(string $literal): array

0 commit comments

Comments
 (0)