Static Factory Methods: Part 1 — Readability

Nuno Maduro
Jan 20 · 1 min read

Just published a new video explaining how “static factory methods” can improve the code readability in PHP.

Constructors don’t have meaningful names, so they are always restricted to the standard naming convention imposed by the language. Static factory methods can have meaningful names, hence explicitly conveying what they do.

Feel free to contact me on twitter: @enunomaduro.

If you found this video useful, please comment below and clap, if you like.

Nuno Maduro

Written by

Software engineer @Algolia. Laravel @laravelphp evangelist. Open Source Enthusiast. Created @LaravelZero, Collision, Larastan and more.