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

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)    
Subscription  
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:
MUST BE VALID
Solve the problem : 29 - 27 = ?

 
 [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

Comments

 [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: https://github.com/squizlabs/PHP_CodeSniffer/commit/7c7493bac94e170dbc80c4a4f4 6bdef9fd3b7dc6 Can discuss anything else on the PR.