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

  ID: 20029
  Updated by: gsherwood@squiz.net
  Reported By: luke@stoysnet.com
  Summary: ForbiddenFunction sniff incorrectly recognizes
                     methods in "use" clauses
-Status: Open
+Status: Closed
  Type: Bug
  Package: PHP_CodeSniffer
  Operating System: Debian GNU/Linux 7 (wheezy)
  Package Version: 1.4.6
  PHP Version: Irrelevant
-Assigned To:
+Assigned To: squiz
  Roadmap Versions:
  New Comment:

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


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

[2013-08-05 20:34:42] luke_stoysnet

Fix delivered here:
https://github.com/squizlabs/PHP_CodeSniffer/pull/143

------------------------------------------------------------------------

[2013-08-05 20:11:00] luke_stoysnet

Working on a patch today.

------------------------------------------------------------------------

[2013-08-05 20:10:38] luke_stoysnet

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

------------------------------------------------------------------------

Search Discussions

Related Discussions

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

1 user in discussion

Gsherwood: 1 post

People

Translate

site design / logo © 2022 Grokbase