diff --git a/src/Converter/Number/GenericNumberConverter.php b/src/Converter/Number/GenericNumberConverter.php index c85bc3a..b95d5e0 100644 --- a/src/Converter/Number/GenericNumberConverter.php +++ b/src/Converter/Number/GenericNumberConverter.php @@ -19,7 +19,7 @@ use Ramsey\Uuid\Math\CalculatorInterface; use Ramsey\Uuid\Type\Integer as IntegerObject; /** - * GenericNumberConverter uses the provided calculate to convert decimal + * GenericNumberConverter uses the provided calculator to convert decimal * numbers to and from hexadecimal values * * @psalm-immutable diff --git a/src/Type/Integer.php b/src/Type/Integer.php index 05d420a..540ecbe 100644 --- a/src/Type/Integer.php +++ b/src/Type/Integer.php @@ -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; diff --git a/tests/phpstan-tests.neon b/tests/phpstan-tests.neon index c31d53e..1973ce3 100644 --- a/tests/phpstan-tests.neon +++ b/tests/phpstan-tests.neon @@ -3,7 +3,7 @@ parameters: level: max paths: - . - autoload_files: + bootstrapFiles: - ./phpstan-bootstrap.php checkMissingIterableValueType: false reportUnmatchedIgnoredErrors: false diff --git a/tests/phpstan.neon b/tests/phpstan.neon index 405d2d8..9a01671 100644 --- a/tests/phpstan.neon +++ b/tests/phpstan.neon @@ -5,7 +5,7 @@ parameters: - ../src checkMissingIterableValueType: false reportUnmatchedIgnoredErrors: false - autoload_files: + bootstrapFiles: - ./phpstan-bootstrap.php ignoreErrors: -