Skip to content

False positive on return null|void #2643

@dereuromark

Description

@dereuromark

Bug report

	/**
	 * Overview action
	 *
	 * @return \Cake\Http\Response|null|void
	 */
	public function index() { ... }

Framework controller actions usually don't have to return, the |void addition should suffice to silence PHPStan.

But it complains with

Method DatabaseLog\Controller\Admin\LogsController::index() should
return Cake\Http\Response|void|null but return statement is missing.

Expected output

No error here. Only with \Cake\Http\Response|null I would expect the above message.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions