We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ace7eee commit 8943bb3Copy full SHA for 8943bb3
src/Node/Literal/IntLiteralNode.php
@@ -21,18 +21,12 @@ public function __construct(
21
22
public static function parse(string $value): static
23
{
24
- if (!\is_numeric($value)) {
25
- return new static(0, $value);
26
- }
27
-
28
[$isNegative, $decimal] = self::split($value);
29
30
return new static($isNegative ? -$decimal : $decimal, $value);
31
}
32
33
/**
34
- * @param numeric-string $literal
35
- *
36
* @return array{bool, int}
37
*/
38
private static function split(string $literal): array
0 commit comments