rfc:returntypehint2
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:returntypehint2 [2011/12/24 20:58] – [Changelog] fitchwh | rfc:returntypehint2 [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2011-12-13 | * Date: 2011-12-13 | ||
* Author: Will Fitch < | * Author: Will Fitch < | ||
- | * Status: | + | * Status: |
Line 28: | Line 28: | ||
This implementation of return type hinting follows the same approach. | This implementation of return type hinting follows the same approach. | ||
- | ** Update: allowing | + | === Returning |
+ | |||
+ | By default, if you specify | ||
=== Example Implementations === | === Example Implementations === | ||
Line 61: | Line 63: | ||
{ | { | ||
return ' | return ' | ||
+ | } | ||
+ | | ||
+ | // The nullable keyword allows you to return null | ||
+ | protected nullable ArrayObject getArrayObject() | ||
+ | { | ||
+ | return null; | ||
} | } | ||
| | ||
Line 161: | Line 169: | ||
=== Tests === | === Tests === | ||
- | A total of 22 tests were added to tests/ | + | A total of 21 tests were added to tests/ |
* Determine that non-namespaced and namespaced class name don't produce a syntax error | * Determine that non-namespaced and namespaced class name don't produce a syntax error | ||
Line 172: | Line 180: | ||
===== Patch ===== | ===== Patch ===== | ||
- | The downloadable | + | The patch for this is now outdated and gone. |
- | + | ||
- | Patch: http:// | + | |
- | + | ||
- | Patch with nullable token: http:// | + | |
- | + | ||
- | Github: https:// | + | |
Line 188: | Line 190: | ||
- Updated to remove allowing NULL to be returned unconditionally when declaring return types | - Updated to remove allowing NULL to be returned unconditionally when declaring return types | ||
- Added a new patch which includes a " | - Added a new patch which includes a " | ||
+ | - Updated the RFC to take " | ||
rfc/returntypehint2.1324760306.txt.gz · Last modified: 2017/09/22 13:28 (external edit)