Skip to content

Commit

Permalink
Small CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Zales0123 committed Feb 4, 2022
1 parent e52f894 commit 160361f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
use Faker\Generator;
use Sylius\Component\Core\Model\AdminUserInterface;
use Sylius\Component\Core\Model\AvatarImage;
use Sylius\Component\Core\Uploader\ImageUploaderInterface;
use Sylius\Component\Resource\Factory\FactoryInterface;
use Symfony\Component\Config\FileLocatorInterface;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\OptionsResolver\Options;
use Symfony\Component\OptionsResolver\OptionsResolver;
Expand All @@ -31,9 +33,9 @@ class AdminUserExampleFactory extends AbstractExampleFactory implements ExampleF
public function __construct(
private FactoryInterface $userFactory,
private string $localeCode,
private ?\Symfony\Component\Config\FileLocatorInterface $fileLocator = null,
private ?\Sylius\Component\Core\Uploader\ImageUploaderInterface $imageUploader = null,
private ?\Sylius\Component\Resource\Factory\FactoryInterface $avatarImageFactory = null
private ?FileLocatorInterface $fileLocator = null,
private ?ImageUploaderInterface $imageUploader = null,
private ?FactoryInterface $avatarImageFactory = null
) {
$this->faker = Factory::create();
$this->optionsResolver = new OptionsResolver();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public function __construct(
$this->configureOptions($this->optionsResolver);
}


public function create(array $options = []): CatalogPromotionInterface
{
$options = $this->optionsResolver->resolve($options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
use Sylius\Component\Resource\Factory\FactoryInterface;
use Sylius\Component\Resource\Repository\RepositoryInterface;
use Sylius\Component\Taxation\Model\TaxCategoryInterface;
use Symfony\Component\Config\FileLocatorInterface;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\OptionsResolver\Options;
use Symfony\Component\OptionsResolver\OptionsResolver;
Expand All @@ -60,8 +61,8 @@ public function __construct(
private RepositoryInterface $productOptionRepository,
private RepositoryInterface $channelRepository,
private RepositoryInterface $localeRepository,
private ?\Sylius\Component\Resource\Repository\RepositoryInterface $taxCategoryRepository = null,
private ?\Symfony\Component\Config\FileLocatorInterface $fileLocator = null
private ?RepositoryInterface $taxCategoryRepository = null,
private ?FileLocatorInterface $fileLocator = null
) {
if ($this->taxCategoryRepository === null) {
@trigger_error(sprintf('Not passing a $taxCategoryRepository to %s constructor is deprecated since Sylius 1.6 and will be removed in Sylius 2.0.', self::class), \E_USER_DEPRECATED);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct(
private ExampleFactoryInterface $promotionRuleExampleFactory,
private ExampleFactoryInterface $promotionActionExampleFactory,
private ChannelRepositoryInterface $channelRepository,
private ?\Sylius\Component\Resource\Factory\FactoryInterface $couponFactory = null
private ?FactoryInterface $couponFactory = null
) {
$this->faker = Factory::create();
$this->optionsResolver = new OptionsResolver();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(
private RepositoryInterface $shippingCategoryRepository,
private RepositoryInterface $localeRepository,
private ChannelRepositoryInterface $channelRepository,
private ?\Sylius\Component\Resource\Repository\RepositoryInterface $taxCategoryRepository = null
private ?RepositoryInterface $taxCategoryRepository = null
) {
if ($this->taxCategoryRepository === null) {
@trigger_error(sprintf('Not passing a $taxCategoryRepository to %s constructor is deprecated since Sylius 1.4 and will be removed in Sylius 2.0.', self::class), \E_USER_DEPRECATED);
Expand Down

0 comments on commit 160361f

Please sign in to comment.