Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify the DimensionContentCollection class #178

Open
1 of 2 tasks
niklasnatter opened this issue Jan 13, 2021 · 0 comments
Open
1 of 2 tasks

Simplify the DimensionContentCollection class #178

niklasnatter opened this issue Jan 13, 2021 · 0 comments
Labels
DX Only affecting the end developer

Comments

@niklasnatter
Copy link
Contributor

niklasnatter commented Jan 13, 2021

After #174 is merged, the DimensionContentCollection class will be one of the main classes of the bundle. Because of this, I think it is important to keep the class simple and consistent. Therefore I would propose the following changes:

After these changes, the DimensionContentCollectionInterface should look something like this:

interface DimensionContentCollectionInterface
{
    /**
     * @return DimensionContentInterface[]
     */
    public function getDimensionContents(): array;

    /**
     * @param mixed[] $dimensionAttributes
     */
    public function getDimensionContent(array $dimensionAttributes): ?DimensionContentInterface;

    /**
     * @return class-string<DimensionContentInterface>
     */
    public function getDimensionContentClass(): string;

    /**
     * @return mixed[]
     */
    public function getDimensionAttributes(): array;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX Only affecting the end developer
Projects
None yet
Development

No branches or pull requests

2 participants