Completed
Push — master ( dad5ed...687e58 )
by Igor
15s queued 13s
created

ProductExampleFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
c 1
b 0
f 0
dl 0
loc 11
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Loevgaard\SyliusBarcodePlugin\Fixture\Factory;
6
7
use Sylius\Bundle\CoreBundle\Fixture\Factory\ProductExampleFactory as BaseProductExampleFactory;
8
use Sylius\Component\Core\Model\ProductInterface;
9
10
class ProductExampleFactory extends BaseProductExampleFactory
11
{
12
    use ProductExampleFactoryTrait;
0 ignored issues
show
Bug introduced by
The trait Loevgaard\SyliusBarcodeP...ductExampleFactoryTrait requires the property $ean13 which is not provided by Loevgaard\SyliusBarcodeP...y\ProductExampleFactory.
Loading history...
13
14
    public function create(array $options = []): ProductInterface
15
    {
16
        $product = parent::create($options);
17
18
        $this->setRandomBarcodesToVariants($product);
19
20
        return $product;
21
    }
22
}
23