Type hinting will make clear to the programmer how to use the methods and will make aberrant uses caught more quickly before they lead to other sneaky errors.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | type_hinting.patch | 21.94 KB | falcon |
Type hinting will make clear to the programmer how to use the methods and will make aberrant uses caught more quickly before they lead to other sneaky errors.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | type_hinting.patch | 21.94 KB | falcon |
Comments
Comment #1
falcon commentedThe php type hinting isn't very useful to us IMO. Hopefully php will support type hinting for primitive types in the future. Attached is a patch showing how type hinting has been added to the question-types.
Comment #2
falcon commentedComment #3
turadg commentedI'm reopening this since there are a lot more signatures that can use it.
Unfortunately PHP probably won't ever have type hinting for scalars. We could start using asserts though. They don't cost performance in production (assuming assertion checking is turned off) and they act as type documentation.
Comment #4
falcon commentedComment #5
djdevinThis issue is being closed because it was filed against a version that is no longer supported. If the issue still persists in the latest version of Quiz, please open a new issue.