A trait extracted in 2023 for one class, on the grounds that a second would arrive, and the second one arriving and not fitting.
trait Timestamps
{
public private(set) ?DateTimeImmutable $updatedAt = null;
public function touch(ClockInterface $clock): void
{
$this->updatedAt = $clock->now();
}
}
// the second user needed the timestamp set from a
// payload rather than from a clock, which is a
// different method with the same name.
A trait extracted in anticipation is a guess about what the second implementation will need, and the guess was wrong in the smallest possible way — same concept, different source of the value. Both classes now have four lines each, which is eight lines against a trait of eleven and a conditional.