Skip to content

Commit

Permalink
fix phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGrimmChester committed Oct 24, 2024
1 parent b00c7f9 commit 55b0453
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Processor/ProductVariant/NameProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Doctrine\ORM\EntityManagerInterface;
use Sylius\Component\Core\Model\ProductVariantInterface;
use Sylius\Component\Product\Model\ProductOptionValueInterface;
use Sylius\Component\Product\Model\ProductOptionValueTranslationInterface;
use Sylius\Component\Product\Model\ProductVariantTranslationInterface;
use Sylius\Component\Resource\Factory\FactoryInterface;
use Sylius\Component\Resource\Repository\RepositoryInterface;
Expand Down Expand Up @@ -38,7 +39,9 @@ public function process(ProductVariantInterface $productVariant, array $resource
if (0 === $key) {
$name .= ' ';
}
$name .= $optionValue->getTranslation($syliusLocale)->getValue() . ' - ';
/** @var ProductOptionValueTranslationInterface $translation */
$translation = $optionValue->getTranslation($syliusLocale);
$name .= $translation->getValue() . ' - ';
}

if (\substr($name, strlen($name) - 3)) {
Expand Down

0 comments on commit 55b0453

Please sign in to comment.