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

Bug #20029 ForbiddenFunction sniff incorrectly recognizes methods in "use" clauses
Submitted: 2013-08-06 00:10 UTC
From: luke_stoysnet Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.4.6)
PHP Version: Irrelevant OS: Debian GNU/Linux 7 (wheezy)
Roadmaps: (Not assigned)    
Comments Add Comment Add patch

Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem : 46 + 29 = ?

 [2013-08-06 00:10 UTC] luke_stoysnet (Lucas Green)
Description: ------------ ForbiddenFunction sniff recognizes method renames in use clause as if they were functions. Test script: --------------- <? trait DelProvider { public function delete() { //irrelevant } } class MethodIsNotFunctionTest { use DelProvider { delete as protected unsetter; } } Actual result: -------------- The use of function delete() is forbidden; use unset() instead


 [2013-08-06 00:11 UTC] luke_stoysnet (Lucas Green)
Working on a patch today.
 [2013-08-06 00:34 UTC] luke_stoysnet (Lucas Green)
 [2013-08-07 12:27 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
Fixed in github repo: 6bdef9fd3b7dc6 Can discuss anything else on the PR.