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

ID: 19418
Updated by: gsherwood@squiz.net
Reported By: sb at sebastian-bergmann dot de
Summary: Traits are not handled properly
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: PHP_CodeSniffer
Operating System: Irrelevant
Package Version: 1.3.3
PHP Version: 5_4 SVN-2012-05-13
Assigned To: squiz
Roadmap Versions:
New Comment:

-Status: Feedback
+Status: No Feedback



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

[2012-05-14 02:12:05] squiz

-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: squiz
This is a duplicate of bug #19381. Was fixed recently but is not
released yet.

Please try the latest version from the github repo and see if that works
for you:
https://github.com/squizlabs/PHP_CodeSniffer

Alternatively, the patch was fairly small, so you could apply it
manually if needed:
https://github.com/squizlabs/PHP_CodeSniffer/commit/f6e857c4baa702493da80efb2c
de212ae75389e3

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

[2012-05-13 07:13:53] sebastian

Description:
------------
PHP_CodeSniffer / Not all PHP_CodeSniffer sniffs handle(s) traits
properly.

Test script:
---------------
<?php
trait Foo
{
public function jsonSerialize()
{


Expected result:
----------------
No violations reported

Actual result:
--------------
2 | ERROR | Constants must be uppercase; expected FOO but found Foo
4 | ERROR | Line indented incorrectly; expected 0 spaces, found 4

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJun 19, '12 at 4:11a
activeJun 19, '12 at 4:11a
posts1
users1
websitepear.php.net

1 user in discussion

Gsherwood: 1 post

People

Translate

site design / logo © 2022 Grokbase