Skip to content

[Bug]: Wrong weird return type #1306

@neatpro

Description

@neatpro

Bug description

Hello,

New to PhpStorm and Laravel Idea.

Either something is not right with return types or I'm doing something wrong:

namespace App\Queries;

use App\Models\Accessibility;
use LaravelIdea\Helper\App\Models\_IH_Accessibility_C;

class GetAccessibilitie
{
	/**
	 * @param $enrollment_id
	 * @return _IH_Accessibility_C|array
	 */
	public static function execute($enrollment_id): _IH_Accessibility_C|array
	{
		return Accessibility::select('id', 'description', 'active')->get();
	}
}

Why _IH_Accessibility_C?

Why not just return Collection:

namespace App\Queries;

use App\Models\Accessibility;
use Illuminate\Support\Collection;

class GetAccessibilitie
{
	/**
	 * @param $enrollment_id
	 * @return Collection
	 */
	public static function execute($enrollment_id): Collection
	{
		return Accessibility::select('id', 'description', 'active')->get();
	}
}

Also, we are still facing this issue: #955

Image

Thanks, great plugin by the way!

Plugin version

11.5.0.252

Operating system

Linux

Steps to reproduce

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions