Skip to content

Commit

Permalink
Add fix for phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
SzymonKostrubiec committed Jul 9, 2024
1 parent 8ec106a commit efa641a
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/Repository/ProductVariantRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ public function __construct(

public function findOneByOptionValue(ProductOptionValueInterface $productOptionValue): ?ProductVariantInterface
{
/** @var EntityRepository $productOptionValue */
$productOptionValue = $this->baseProductVariantRepository;

return $productOptionValue->createQueryBuilder('o')
/** @phpstan-ignore-next-line */
return $this->baseProductVariantRepository->createQueryBuilder('o')
->where(':optionValue MEMBER OF o.optionValues')
->setParameter('optionValue', $productOptionValue)
->getQuery()
Expand All @@ -40,10 +38,8 @@ public function findOneByOptionValue(ProductOptionValueInterface $productOptionV

public function findByOptionValue(ProductOptionValueInterface $productOptionValue): array
{
/** @var EntityRepository $productOptionValue */
$productOptionValue = $this->baseProductVariantRepository;

return $productOptionValue->createQueryBuilder('o')
/** @phpstan-ignore-next-line */
return $this->baseProductVariantRepository->createQueryBuilder('o')
->where(':optionValue MEMBER OF o.optionValues')
->setParameter('optionValue', $productOptionValue)
->getQuery()
Expand Down

0 comments on commit efa641a

Please sign in to comment.