Bug #16195 [Com]: Function name "package_function" is prefixed with a package name but does not..
| From: | jespinog@gmail.com | Date: | Thu, 27 May 2010 07:15:45 +0000 |
| Subject: | Bug #16195 [Com]: Function name "package_function" is prefixed with a package name but does not.. | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-3809@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=16195&edit=1
ID: 16195
Comment by: jespinog@gmail.com
Reported By: hm2k at php dot net
Summary: Function name "package_function" is prefixed with a
package name but does not..
Status: Open
Type: Bug
Package: PHP_Beautifier
PHP Version: 5.2.9
Roadmap Versions:
New Comment:
This is not hard to do, but this change the meaning of the code, and i
think thats not the job of PHP_Beautifier.
A problem that you can find with this, is the change of the name of the
function in a file, but not the reference to this function in another
file, or a third party software.
Can be done only for private methods, but this is near to be a
unconsistent behavior.
Another way to solve it, is create a personalized Filter that redefine
the t_function and change the name with your own criteria.
Previous Comments:
------------------------------------------------------------------------
[2009-05-07 01:15:21] hm2k
Description:
------------
Function name "package_function" is prefixed with a package name but
does not begin with a capital letter.
Converting package_function to Package_function is easy enough, but
this is not done atm.
However, if for example the package is PHP_Beautifier, and your
function is php_beautifier_test, you'd want it to convert to:
PHP_Beautifier_test.
If it could establish the package name from the docblock or the method
phpcs uses, it could easily figure out what it is supposed to be.
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=16195&edit=1