Re: [PHP] How do I handle covariant parameters and not fall foul of LSP.
[email protected] ("Christoph M. Becker")
| Newsgroups | php.general |
|---|---|
| Message-ID | <[email protected]> |
On 14.02.2017 at 11:20, Richard Quadling wrote: > If anyone has some good examples (real world ideally) where LSP is sane AND > includes inheritance (they seem to be where the conflict lies) then I may > be able to learn why I'm doing it wrong. <https://www.gnu.org/software/sather/docs-1.2/tutorial/type-conformance.html> and <http://www1.icsi.berkeley.edu/~sather/Documentation/EclecticTutorial/node15.html> may be helpful. Also note, that PHP currently only supports parameter invariance (not contravariance). -- Christoph M. Becker