Back to basics: SOLID – Liskov Substitution Principle (LSP)
SOLID: Liskov Substitution Principle (LSP)
Yeah, this is our third article about SOLID principles!
If you have not checked the previous ones, just look at them, they’re about SRP and OCP, and are very useful when combined with LSP (that’s why all SOLID principles have to stay together).
About half of the path has been made, you’re about to learn very cool things about programming, so stay tuned!
“L” for LSP
Liskov Substitution Principle explains how you should be able to replace any class by any of its parents.
All the SOLID articles on KNPLabs: