A class named Utils, Helpers or Common has no definition, so nothing can be excluded from it. It grows monotonically, it is imported everywhere, and it ends up…
PSR-0 mapped the entire namespace onto the path, so AppReportBuilder had to live at src/App/Report/Builder.php — the vendor and package name repeated inside a directory that was already…
Business logic in a controller is reachable from exactly one place: an HTTP request. The first time the same operation is needed from a console command, a queue…
Applying a transformation to every scalar in a nested array — trimming decoded JSON, casting numeric strings — usually produces a small recursive function that gets copied between…
Building a string out of several variables in JavaScript has meant a chain of + and a careful audit of the spaces. Backtick strings interpolate directly and, more…
indexOf only works when you already have the value you are looking for. Finding the first element matching a predicate has meant either a filter() that builds a…
Two hundred and forty require_once calls where load order was load-bearing, moved onto an autoloader one namespace at a time without a big-bang rewrite.