Fix static analysis issues

This commit is contained in:
Ben Ramsey
2020-10-28 21:19:26 -05:00
parent e4562b089b
commit 0a25f73ae0
4 changed files with 11 additions and 5 deletions
+8 -2
View File
@@ -36,7 +36,7 @@ use function substr;
final class Integer implements NumberInterface
{
/**
* @var string
* @psalm-var numeric-string
*/
private $value;
@@ -80,7 +80,10 @@ final class Integer implements NumberInterface
$this->isNegative = true;
}
$this->value = $value;
/** @psalm-var numeric-string $numericValue */
$numericValue = $value;
$this->value = $numericValue;
}
public function isNegative(): bool
@@ -88,6 +91,9 @@ final class Integer implements NumberInterface
return $this->isNegative;
}
/**
* @psalm-return numeric-string
*/
public function toString(): string
{
return $this->value;