Bug #19398 [Opn->Dup]: Bogus "Missing @return tag"
| From: | gsherwood at squiz dot net | Date: | Thu, 26 Apr 2012 05:08:08 +0000 |
| Subject: | Bug #19398 [Opn->Dup]: Bogus "Missing @return tag" | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-8577@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=19398&edit=1
ID: 19398
Updated by: gsherwood@squiz.net
Reported By: anthon at piwik dot org
Summary: Bogus "Missing @return tag"
-Status: Open
+Status: Duplicate
Type: Bug
Package: PHP_CodeSniffer
Operating System: Ubuntu
Package Version: 1.3.3
PHP Version: 5.3.2
Roadmap Versions:
New Comment:
-Status: Open
+Status: Duplicate
Same as bug #19399
Marking this as dupe as reporter field is correct in other issue.
Previous Comments:
------------------------------------------------------------------------
[2012-04-26 05:59:43] #54be65b16a0b0538532
Description:
------------
phpcs reports "Missing @return tag" if the method contains an
anonymous function that does a return in its body.
Test script:
---------------
<?php
/**
* @package foo
*/
/**
* foo
*/
class Foo
{
/**
* bar
*/
public function bar()
{
array_filter(array(), function ($val)
{
return true;
});
}
}
Expected result:
----------------
No error
Actual result:
--------------
---------------------------------------------------------------------------
-----
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
---------------------------------------------------------------------------
-----
12 | ERROR | Missing @return tag in function comment
---------------------------------------------------------------------------
-----
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=19398&edit=1