Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#130·clean-code-php

"Prefer composition over inheritance": Why you don't use traits?

Author: phackwerCreated Oct 23, 2017Updated Oct 16, 2023

You could really add a good multi-inheritance or composition example by mentioning threads. Although they may force a developer to jump into polimorphic tables, they are a great way to handle this.

I can't find an example of use of trait anywhere on your "clean-code-php" guide.

Source: piotrplenik/clean-code-php

View original on GitHubView discussion on GitHub