Skip to content

Squiz.Commenting.FunctionComment false positive when function contains closure #1550

@josephzidell

Description

@josephzidell

There is a false positive in src\Standards\Squiz\Sniffs\Commenting\FunctionCommentSniff.php

This code throws error: Function return type is not void, but function is returning void here

/**  * Test function  *  * @return array  */ public function test() { function () { return;	}; return []; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions