Liskov principle: violation by type-hinting
- by Elias Van Ootegem
According to the Liskov principle, a construction like the one below is invalid, as it strengthens a pre-condition.
I know the example is pointless/nonsense, but when I last asked a question like this, and used a more elaborate code sample, it seemed to distract people too much from the actual question.
//Data models
abstract class Argument
{
…