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
Problem: Interface
Dedi\SyliusSEOPlugin\Domain\SEO\Model\RichSnippetInterface
is missingaddData()
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 interfaceOther solution: Since Product & Breadcrumb implementation do not have the same method to add. Perhaps another solution is to introduce 2 new interfaces
ProductRichSnippetInterface
andBreadcrumbRichSnippetInterface
and typehint their factories to those new interfaces instead of the generic one