Solid, Solid Principles, PHP, Software Development, Software Engineering.
can see, the pre-requirements for a method’s return types are the inverse of the parameter types. LSP — Method return type Precondition A subclass should not enforce preconditions. LSP — PreCondition There are other rules like: A subclass should not weaken postconditions. The invariants of a parent