FAQ
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.

------------------------------------------------------------------------

Search Discussions

  • Clbustos at May 28, 2010 at 8:48 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=16195&edit=1

    ID: 16195
    Updated by: clbustos@surnet.cl
    Reported By: hm2k at php dot net
    Summary: Function name "package_function" is prefixed with a
    package name but does not..
    -Status: Open
    +Status: Bogus
    Type: Bug
    Package: PHP_Beautifier
    PHP Version: 5.2.9
    Roadmap Versions:
    New Comment:

    -Status: Open
    +Status: Bogus
    Sorry, but your problem does not imply a bug in PEAR itself. For a
    list of more appropriate places to ask for help using PEAR, please
    visit http://pear.php.net/support/ as this bug system is not the
    appropriate forum for asking support questions.

    Thank you for your interest in PEAR.

    This will be refactoring, not appropriate for a Beautifier


    Previous Comments:
    ------------------------------------------------------------------------

    [2010-05-27 07:15:45] jespino

    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.

    ------------------------------------------------------------------------

    [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.

    ------------------------------------------------------------------------

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedMay 27, '10 at 6:22a
activeMay 28, '10 at 8:48p
posts2
users2
websitepear.php.net

2 users in discussion

Jespinog: 1 post Clbustos: 1 post

People

Translate

site design / logo © 2022 Grokbase