https://github.com/jordanrl/never-argument-type
https://github.com/jordanrl/never-argument-type
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jordanrl/never-argument-type
- Owner: JordanRL
- Created: 2021-08-13T22:20:20.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-15T11:16:13.000Z (almost 5 years ago)
- Last Synced: 2025-04-06T01:27:38.021Z (about 1 year ago)
- Size: 37.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PHP RFC: Never For Parameter Types
**THIS DOCUMENT HAS BEEN RETIRED. SEE THE FULL RFC: https://wiki.php.net/rfc/never_for_parameter_types**
## Introduction
Arguments in PHP are [contravariant](https://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science)) to preserve Liskov substitution. This means that if class B extends class A, then redefines a function call, the entire type of that argument from class A must be present in the type of the argument in class B:
```php