mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-05 20:57:12 +00:00
Code review fixes
This commit is contained in:
parent
f44ca93889
commit
0883a101b5
1 changed files with 1 additions and 5 deletions
|
|
@ -164,17 +164,13 @@ class OrderExampleFactory extends AbstractExampleFactory implements ExampleFacto
|
|||
));
|
||||
}
|
||||
|
||||
$currentLocale = $order->getLocaleCode();
|
||||
$fallbackLocale = $channel->getDefaultLocale()->getCode();
|
||||
|
||||
$generatedItems = [];
|
||||
|
||||
for ($i = 0; $i < $numberOfItems; ++$i) {
|
||||
/** @var ProductInterface $product */
|
||||
$product = $this->faker->randomElement($products);
|
||||
$variant = $this->faker->randomElement($product->getVariants()->toArray());
|
||||
$product->setCurrentLocale($currentLocale);
|
||||
$product->setFallbackLocale($fallbackLocale);
|
||||
$product->setFallbackLocale($product->getTranslations()->first()->getLocale());
|
||||
|
||||
if (array_key_exists($variant->getCode(), $generatedItems)) {
|
||||
/** @var OrderItemInterface $item */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue