-
-
Notifications
You must be signed in to change notification settings - Fork 154
False positive for missing method param #2730
Copy link
Copy link
Closed
Description
This code snippet here results in Method "array" is missing @param $input even though it is specified in the PHPDoc. It likely has something to do with the definition syntax that PHPStan supports.
declare(strict_types=1);
namespace App;
class Asd
{
/**
* @param array{0: 'w', 1: 'o', 2: 'r', 3: 'l', 4: 'd'} $input
*
* @return 'world'
*/
public function hello(array $input): string
{
return implode('', $input);
}
}Possibly related to #2264
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels