FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=18191&edit=1

ID: 18191
Comment by: fmazerolle
Reported By: fmazerolle at idealtechnology dot net
Summary: Squiz.PHP.LowercasePHPFunctions does not work with "new
Date()"
Status: Closed
Type: Bug
Package: PHP_CodeSniffer
Package Version: 1.3.0RC1
PHP Version: Irrelevant
Assigned To: squiz
New Comment:

I've copied the file from the GIT repository, and replaced the file (
https://github.com/pear/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php
) of my current installation, and I still have the issue.

Also, I see nothing in the code that check if an object exist, check if
the "function" is preceeded by a new tags, or an exclude list.

Are you sure it's fixed, what's the patch ?


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

[2011-01-13 23:23:38] squiz

<div id="changeset">
<span class="removed">-Status: Open</span>
<span class="added">+Status: Closed</span>
<span class="removed">-Assigned To:</span>
<span class="added">+Assigned To: squiz</span>
</div>This bug has been fixed in SVN.

If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should
be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.

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

[2011-01-13 10:09:55] buchi

Description:
------------
Squiz.PHP.LowercasePHPFunctions denotes an error when instantiating the
PEAR class Date: "new Date()"

Error message:
Calls to inbuilt PHP functions must be lowercase; expected
"date" but found "Date"

This is wrong becuse this is no function call of a built-in PHP
function.

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

Search Discussions

  • Gsherwood at Nov 21, 2011 at 5:14 am
    Edit report at http://pear.php.net/bugs/bug.php?id=18191&edit=1

    ID: 18191
    Updated by: gsherwood@squiz.net
    Reported By: gerald dot buchgraber at gmail dot com
    Summary: Squiz.PHP.LowercasePHPFunctions does not work with
    "new Date()"
    -Status: Closed
    +Status: Feedback
    Type: Bug
    Package: PHP_CodeSniffer
    Package Version: 1.3.0RC1
    PHP Version: Irrelevant
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    -Status: Closed
    +Status: Feedback
    The commit is here:
    https://github.com/squizlabs/PHP_CodeSniffer/commit/35efd21ee16ebd0fcae09feb20
    9aa30a36906865

    That commit included a unit test with sample code to ensure no error was
    being
    thrown when using a NEW keyword because class names should be ignored.

    If you have new sample code that fails with the latest PHP_CodeSniffer
    version,
    please let me know.


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

    [2011-11-15 19:09:38] fmazerolle

    I've copied the file from the GIT repository, and replaced the file (
    https://github.com/pear/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php
    ) of my current installation, and I still have the issue.

    Also, I see nothing in the code that check if an object exist, check if
    the "function" is preceeded by a new tags, or an exclude list.

    Are you sure it's fixed, what's the patch ?

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

    [2011-01-13 23:23:38] squiz

    -Status: Open
    +Status: Closed
    -Assigned To:
    +Assigned To: squiz
    This bug has been fixed in SVN.

    If this was a documentation problem, the fix will appear on pear.php.net
    by the end of next Sunday (CET).

    If this was a problem with the pear.php.net website, the change should
    be live shortly.

    Otherwise, the fix will appear in the package's next release.

    Thank you for the report and for helping us make PEAR better.

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

    [2011-01-13 10:09:55] buchi

    Description:
    ------------
    Squiz.PHP.LowercasePHPFunctions denotes an error when instantiating the
    PEAR class Date: "new Date()"

    Error message:
    Calls to inbuilt PHP functions must be lowercase; expected
    "date" but found "Date"

    This is wrong becuse this is no function call of a built-in PHP
    function.

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedNov 15, '11 at 6:11p
activeNov 21, '11 at 5:14a
posts2
users2
websitepear.php.net

2 users in discussion

Fmazerolle: 1 post Gsherwood: 1 post

People

Translate

site design / logo © 2021 Grokbase