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

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

-Status: Open
+Status: Duplicate
Duplicate submission. See issue #19546


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

[2012-08-06 03:31:29] 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

Related Discussions

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

1 user in discussion

Gsherwood: 1 post

People

Translate

site design / logo © 2022 Grokbase