File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77use Loevgaard \SyliusBrandPlugin \Model \BrandAwareInterface ;
88use Loevgaard \SyliusBrandPlugin \Model \BrandInterface ;
9- use Loevgaard \SyliusBrandPlugin \Repository \BrandRepositoryInterface ;
109use Sylius \Bundle \CoreBundle \Fixture \OptionsResolver \LazyOption ;
10+ use Sylius \Resource \Doctrine \Persistence \RepositoryInterface ;
1111use Symfony \Component \OptionsResolver \OptionsResolver ;
1212
1313trait BrandAwareExampleFactoryTrait
1414{
15- protected BrandRepositoryInterface $ brandRepository ;
16-
17- public function __construct (BrandRepositoryInterface $ brandRepository )
15+ /**
16+ * @param RepositoryInterface<BrandInterface> $brandRepository
17+ */
18+ public function __construct (protected readonly RepositoryInterface $ brandRepository )
1819 {
19- $ this ->brandRepository = $ brandRepository ;
2020 }
2121
2222 protected function configureBrandOptions (OptionsResolver $ resolver , int $ chanceOfRandomBrand = 90 ): void
Original file line number Diff line number Diff line change 88use Faker \Generator ;
99use Loevgaard \SyliusBrandPlugin \Model \BrandAwareInterface ;
1010use Loevgaard \SyliusBrandPlugin \Model \BrandInterface ;
11- use Loevgaard \SyliusBrandPlugin \Repository \BrandRepositoryInterface ;
1211use Sylius \Bundle \CoreBundle \Fixture \OptionsResolver \LazyOption ;
12+ use Sylius \Resource \Doctrine \Persistence \RepositoryInterface ;
1313use Symfony \Component \OptionsResolver \OptionsResolver ;
1414use Webmozart \Assert \Assert ;
1515
1616trait BrandsAwareExampleFactoryTrait
1717{
18- protected BrandRepositoryInterface $ brandRepository ;
19-
2018 protected Generator $ faker ;
2119
22- public function __construct (BrandRepositoryInterface $ brandRepository )
20+ /**
21+ * @param RepositoryInterface<BrandInterface> $brandRepository
22+ */
23+ public function __construct (protected readonly RepositoryInterface $ brandRepository )
2324 {
24- $ this ->brandRepository = $ brandRepository ;
2525 $ this ->faker = Factory::create ();
2626 }
2727
You can’t perform that action at this time.
0 commit comments