Skip to content

Commit

Permalink
[Core] allow multiple store-values - psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
dpfaffenbauer committed Nov 5, 2024
1 parent 27c34c7 commit c42d111
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,19 @@ class ProductStoreValuesRepository extends EntityRepository implements ProductSt
{
public function findForProduct(ProductInterface $product): array
{
if (!$product instanceof Concrete) {
throw new \InvalidArgumentException('Product must be instance of ' . Concrete::class);
}

return $this->findForObject($product, 'storeValues');
}

public function findForProductAndStore(ProductInterface $product, StoreInterface $store): ?ProductStoreValuesInterface
{
if (!$product instanceof Concrete) {
throw new \InvalidArgumentException('Product must be instance of ' . Concrete::class);
}

return $this->findForObjectAndStore($product, 'storeValues', $store);
}

Expand Down

0 comments on commit c42d111

Please sign in to comment.