O is for the Open-Closed Principle
The "O" in
SOLID stands for the Open-Closed Principle.
You should be able to extend a class’s behaviour,
without modifying it.
If your class/unit
of code is simple and keeping to the Single Responsibility Principle, it should
be easy to reuse it and create a new class/unit of code to add the new
behaviour required. A little like the if this then that flow of working.
Simple.