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  


 [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.