Deciding whether an array was a list or a map had been done with array_keys($a) === range(0, count($a) – 1), which allocates two arrays to answer a question…
An inventory maintained by hand is out of date the day it is written; one generated by the build is correct by construction. Three sources are needed because…
The same match over order status appeared in a controller, two Blade templates, a mailer and an exporter, and adding a case updated four of the five. Moving…
readonly prevents reassignment of the property and says nothing about what the property points at, which is obvious for objects and surprising for arrays. The array case works…
Enums are final, cannot extend anything and cannot be extended, which removes a set of designs that class constants had allowed. Implementing an interface is what makes an…
A readonly property is not initialised-at-declaration; it is write-once from inside the declaring class, and the difference decides what a wither method can do. The property has no…
Tests that pass in file order and fail in any other order are testing the order, and the coupling is invisible until something is added. The seed being…