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

ID: 19546
Updated by: gsherwood@squiz.net
Reported By: hinikato at mail dot ru
-Summary: Recognizing __call() method in traits.
+Summary: Error thrown for __call() method in traits
Status: Open
Type: Bug
Package: PHP_CodeSniffer
Operating System: Windows 7
Package Version: SVN
PHP Version: 5.4.0
-Assigned To:
+Assigned To: squiz
Roadmap Versions:
New Comment:

-Summary: Recognizing __call() method in traits.
+Summary: Error thrown for __call() method in traits
-Assigned To:
+Assigned To: squiz



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

[2012-08-06 03:31:05] hinikato

Description:
------------
The __call() method in trait recognized with error.


Test script:
---------------
trait Foo
{
function __call($method, $args)
{
}
}


Expected result:
----------------
Errors should not be displayed.

Actual result:
--------------
phpcs --standard=PSR2 d:\system\home\localhost\www\test.php

FILE: D:\system\home\localhost\www\test.php
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
6 | ERROR | Function name "__call" is invalid; only PHP magic methods
should
be prefixed with a double underscore
--------------------------------------------------------------------------------

Time: 0 seconds, Memory: 1.50Mb

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

Search Discussions

  • Gsherwood at Aug 6, 2012 at 1:54 am
    Edit report at https://pear.php.net/bugs/bug.php?id=19546&edit=1

    ID: 19546
    Updated by: gsherwood@squiz.net
    Reported By: hinikato at mail dot ru
    Summary: Error thrown for __call() method in traits
    -Status: Assigned
    +Status: Closed
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: Windows 7
    Package Version: SVN
    PHP Version: 5.4.0
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    -Status: Assigned
    +Status: Closed
    Committed a fix to the github repo. You'll need both these:

    https://github.com/squizlabs/PHP_CodeSniffer/commit/cce7a5775bb3c8c9c2b6ff5a8ff
    5ed5c5082dc91
    https://github.com/squizlabs/PHP_CodeSniffer/commit/5fed8ba528af3c5e6df6db4779
    2d3cf32566747b


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

    [2012-08-06 03:54:40] squiz

    -Summary: Recognizing __call() method in traits.
    +Summary: Error thrown for __call() method in traits
    -Assigned To:
    +Assigned To: squiz


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

    [2012-08-06 03:31:05] hinikato

    Description:
    ------------
    The __call() method in trait recognized with error.


    Test script:
    ---------------
    trait Foo
    {
    function __call($method, $args)
    {
    }
    }


    Expected result:
    ----------------
    Errors should not be displayed.

    Actual result:
    --------------
    phpcs --standard=PSR2 d:\system\home\localhost\www\test.php

    FILE: D:\system\home\localhost\www\test.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
    --------------------------------------------------------------------------------
    6 | ERROR | Function name "__call" is invalid; only PHP magic methods
    should
    be prefixed with a double underscore
    --------------------------------------------------------------------------------

    Time: 0 seconds, Memory: 1.50Mb

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedAug 6, '12 at 1:48a
activeAug 6, '12 at 1:54a
posts2
users1
websitepear.php.net

1 user in discussion

Gsherwood: 2 posts

People

Translate

site design / logo © 2022 Grokbase