FAQ
Edit report at https://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: Feedback
+Status: Closed
Type: Bug
Package: PHP_CodeSniffer
Package Version: 1.3.0RC1
PHP Version: Irrelevant
Assigned To: squiz
Roadmap Versions:
New Comment:

-Status: Feedback
+Status: Closed



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

[2011-11-21 06:14:08] squiz

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

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

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

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedDec 1, '11 at 4:09a
activeDec 1, '11 at 4:09a
posts1
users1
websitepear.php.net

1 user in discussion

Gsherwood: 1 post

People

Translate

site design / logo © 2021 Grokbase