[TYPO3-core] RFC: #7350:PHP5ize class.t3lib_div.php
Oliver Hader
oh at inpublica.de
Sat Feb 2 00:51:23 CET 2008
Hi Masi,
Martin Kutschker schrieb:
> This is a SVN patch request.
>
> Branches: trunk only
>
> BT reference: http://bugs.typo3.org/view.php?id=7350
>
> Type: code clean up
>
> Issue: PHP 5.1 allows to declare a method of a class static and it
> allows to use type hinting for funciton parameters, especially arrays.
> To move on in style (and to set an example) t3lib_div gets these features.
>
> Notes: yes I know, stupid coders won't check the arguments they use in
> calling t3lib_div functions and those will now get PHP errors - oh
> horrible loss of compatibility. But hey, this is by design and they
> should be thankful for it. Instead of a silent failure they can now
> start debugging their code with a helpful PHP error.
This sounds good: +1
Additionally, could you please:
* change the tab between function arguments and curly brace to a single
space character
* correct the format of the function arguments be separated by a space:
e.g. "...($var1, $var2, $var3)" instead of "...($var1,$var2,$var3)"
* add type hints for "array" and instances to the function arguments:
e.g. "... function inArray(array $in_array, $item) {"
Thanks in advance!
olly
--
Oliver Hader
http://inpublica.de/
More information about the TYPO3-team-core
mailing list