Edit report at https://pear.php.net/bugs/bug.php?id=19188&edit=1
ID: 19188
Updated by: [email protected]
Reported By: fabrice dot bellingard at sonarsource dot com
Summary: Lots of PHP Notices when analyzing the Symfony
framework
-Status: Open
+Status: Closed
Type: Bug
Package: PHP_CodeSniffer
Operating System: Linux ubuntu 2.6.38-8-generic
Package Version: 1.3.2
PHP Version: 5.3.5
-Assigned To:
+Assigned To: squiz
Roadmap Versions:
New Comment:
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: squiz
Committed some fixes to the git repo. No notices are generated any more.
Previous Comments:
------------------------------------------------------------------------
[2012-01-04 14:17:43] bellingard
Description:
------------
While analyzing the Symfony PHP framework using the Squiz standard, lots
of PHP Notices are printed out.
Test script:
---------------
git checkout git://github.com/symfony/symfony.git
cd symfony
phpcs --standard=Squiz src
Expected result:
----------------
No notices should appear.
Actual result:
--------------
Here's the exhaustive list of notices that are printed out:
- PHP Notice: Undefined index: scope_opener in
/usr/share/php/PHP/CodeSniffer/Tokenizers/PHP.php on line 482
- PHP Notice: Undefined offset: 1811 in
/usr/share/php/PHP/CodeSniffer/Standards/Squiz/Sniffs/CSS/MissingColonSniff.php
on line 65 (+ lines 70/80/83/85)
- PHP Notice: Undefined index: scope_closer in
/usr/share/php/PHP/CodeSniffer/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php
on line 72
------------------------------------------------------------------------