Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.5.8

Bug #19546 Error thrown for __call() method in traits
Submitted: 2012-08-06 07:31 UTC
From: hinikato Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version SVN)
PHP Version: 5.4.0 OS: Windows 7
Roadmaps: (Not assigned)    

 [2012-08-06 07:31 UTC] hinikato (Hinikato Dubrai)
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


 [2012-08-06 07:54 UTC] squiz (Greg Sherwood)
-Summary: Recognizing __call() method in traits. +Summary: Error thrown for __call() method in traits -Assigned To: +Assigned To: squiz
 [2012-08-06 08:00 UTC] squiz (Greg Sherwood)
-Status: Assigned +Status: Closed
Committed a fix to the github repo. You'll need both these: 5ed5c5082dc91 2d3cf32566747b