Skip to content

Support iterable type for HasMany #1802

Description

@brendt

Just a scratch:

interface HasIterableType
{
    public TypeReflector $iterableType { get; }
}

class HasMany implements HasIterableType {}

public function getIterableType(): ?TypeReflector
{
    if ($this->hasAttribute(HasIterableType::class)) {
        return $this->getAttribute(HasIterableType::class)->iterableType;
    }

    // Fallback to docblock parsing
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions