Přejít k obsahu
Global sound
No Compromises

No Compromises

How much logic is too much logic in a PHP enum

· 13 min · Epizoda 154

Poznámky k epizodě

Have you ever added a method to an enum and then wondered if you just turned it into something it was never meant to be?
In the latest episode of the No Compromises podcast, we discuss where to draw the line when adding methods and logic to PHP enums.
We trace the evolution from magic strings to constants to interfaces, and explain why enums were the missing piece PHP needed all along.
We also cover when label methods and data structure helpers belong on an enum, why Eloquent queries cross a line, and how to avoid turning a simple enum into a bloated helper class.

• (00:00) - Why magic…

Web: share.transistor.fm

Živě, poslední hodina: 9 823 skladeb na 4 070 stanicích v 134 zemích

Objevte svět prostřednictvím rádia

Další způsoby objevování (9)

Slyšeli jste něco pěkného? Uložte si to, nebo to otevřete rovnou ve Spotify.

Radio 538 luisteren - Live!Právě oblíbené