dediagency / sylius-seo-plugin

Sylius SEO Plugin by Dedi.
26 stars 24 forks source link

RichSnippetInterface is missing addData #30

Open Roshyo opened 2 years ago

Roshyo commented 2 years ago

Problem: Interface Dedi\SyliusSEOPlugin\Domain\SEO\Model\RichSnippetInterface is missing addData() method which makes it inconsistent when trying to add more information to what factories return.

Solution: Add the method public function addData(array $data): self to the interface

Other solution: Since Product & Breadcrumb implementation do not have the same method to add. Perhaps another solution is to introduce 2 new interfaces ProductRichSnippetInterface and BreadcrumbRichSnippetInterface and typehint their factories to those new interfaces instead of the generic one