9 Commits

Author SHA1 Message Date
Antonio del Olmo 1a1f98b037 [4.x] Upgrade brick/math to support versions ^0.14–^0.17 (#638) 2026-04-27 17:11:13 -05:00
Ben Ramsey 4ca249e960 Ignore the "result unused" error in tests from the PHPStan config 2025-06-25 08:24:36 -05:00
Brandon Morrison aa18ce15d5 Fix pure annotations (#605)
Coming from https://github.com/ramsey/uuid/pull/603, this is an attempt
to fix the errors raised by the current phpstan settings.

I went through each of the errors raised by phpstan with the following
approach.

- If a method is part of an `@immutable` class, we can consider it pure,
  assuming it only affects internal variables.
- If a potentially pure method is calling a class's method that is only
  swapped during testing (and not during normal usage), then we can
  consider the calling method pure.
- If a class is marked deprecated, don't bother with attempting to mark
  it pure or immutable.
2025-06-25 08:24:36 -05:00
Ben Ramsey 76cbc566e2 chore(deps-dev): upgrade PHPStan 2025-05-25 16:52:53 -05:00
Ben Ramsey 0bd312f944 Improve test coverage 2020-02-26 20:17:49 -06:00
Ben Ramsey f42afcecbb Rename Type\IntegerValue to Type\Integer
Rename `Type\IntegerValue` to `Type\Integer`. It was originally named
`IntegerValue` because static analysis sees `Integer` in docblock
annotations and treats it as the native `int` type. `Integer` is not a
reserved word in PHP, so it should be named `Integer` for consistency
with other types in this library. When using it, a class alias prevents
static analysis from complaining.
2020-02-21 11:59:49 -06:00
Ben Ramsey a8d52100de Support microtime in returned DateTimeInterface instances
Fixes #90 and supersedes #93.
2020-01-19 23:21:48 -06:00
Ben Ramsey c11c023796 Address static analysis issues and add additional tests 2020-01-18 12:13:59 -06:00
Ben Ramsey cd03f39e9c Depend on brick/math for arbitrary-precision math 2020-01-18 12:13:58 -06:00