Should I use PHPStan generics for type-safe collections or hand-write a class per type?
Default to list<Order> docblocks with strict PHPStan in CI; add one generic Collection<T> for behavior, a concrete class only at a trust boundary.
Tag
Checking code without running it: type checks, raising levels and applying it to legacy code. questions under this tag, answered directly.
1 answered questions carry this tag.
Default to list<Order> docblocks with strict PHPStan in CI; add one generic Collection<T> for behavior, a concrete class only at a trust boundary.