A fluent method returning self tells the analyser the base class, so every chained call on a subclass loses its type after the first link. static as a…
iterable accepts an array or a Traversable, and only one of those can be counted without consuming it. A generator has no length until it has finished, which…
PHP does not require an implementation to use the same parameter names as the interface it satisfies, so a named argument through an interface type is only as…
SplObjectStorage is a set of objects with O(1) membership, and it holds a strong reference to everything in it. It is genuinely the right tool for cycle detection…
Two entities with identical fields are different things; two value objects with identical fields are the same value. The practical consequence is that value objects need no table,…
A chain of null checks reads badly and the operator that replaces them is genuinely better — and it makes one specific mistake easier to write. Short-circuiting the…