Conditions | 1 |
Paths | 1 |
Total Lines | 6 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | protected function configureBrandOptions(OptionsResolver $resolver, int $chanceOfRandomBrand = 90): void |
||
24 | { |
||
25 | $resolver |
||
26 | ->setDefault('brand', LazyOption::randomOneOrNull($this->brandRepository, $chanceOfRandomBrand)) |
||
27 | ->setAllowedTypes('brand', ['null', 'string', BrandInterface::class]) |
||
28 | ->setNormalizer('brand', LazyOption::findOneBy($this->brandRepository, 'code')) |
||
29 | ; |
||
37 |