Skip to content

Commit e52f894

Browse files
committed
Line length fixes
1 parent 128117c commit e52f894

23 files changed

Lines changed: 115 additions & 59 deletions

src/Sylius/Bundle/CoreBundle/Checkout/CheckoutRedirectListener.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@
2222

2323
final class CheckoutRedirectListener
2424
{
25-
public function __construct(private RequestStack $requestStack, private CheckoutStateUrlGeneratorInterface $checkoutStateUrlGenerator, private RequestMatcherInterface $requestMatcher)
26-
{
25+
public function __construct(
26+
private RequestStack $requestStack,
27+
private CheckoutStateUrlGeneratorInterface $checkoutStateUrlGenerator,
28+
private RequestMatcherInterface $requestMatcher
29+
) {
2730
}
2831

2932
public function handleCheckoutRedirect(ResourceControllerEvent $resourceControllerEvent): void

src/Sylius/Bundle/CoreBundle/Checkout/CheckoutResolver.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@
2525

2626
final class CheckoutResolver implements EventSubscriberInterface
2727
{
28-
public function __construct(private CartContextInterface $cartContext, private CheckoutStateUrlGeneratorInterface $urlGenerator, private RequestMatcherInterface $requestMatcher, private FactoryInterface $stateMachineFactory)
29-
{
28+
public function __construct(
29+
private CartContextInterface $cartContext,
30+
private CheckoutStateUrlGeneratorInterface $urlGenerator,
31+
private RequestMatcherInterface $requestMatcher,
32+
private FactoryInterface $stateMachineFactory
33+
) {
3034
}
3135

3236
public function onKernelRequest(RequestEvent $event): void

src/Sylius/Bundle/CoreBundle/Context/CustomerAndChannelBasedCartContext.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@
2323

2424
final class CustomerAndChannelBasedCartContext implements CartContextInterface
2525
{
26-
public function __construct(private CustomerContextInterface $customerContext, private ChannelContextInterface $channelContext, private OrderRepositoryInterface $orderRepository)
27-
{
26+
public function __construct(
27+
private CustomerContextInterface $customerContext,
28+
private ChannelContextInterface $channelContext,
29+
private OrderRepositoryInterface $orderRepository
30+
) {
2831
}
2932

3033
public function getCart(): OrderInterface

src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Inventory/Operator/OrderInventoryOperator.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222

2323
final class OrderInventoryOperator implements OrderInventoryOperatorInterface
2424
{
25-
public function __construct(private OrderInventoryOperatorInterface $decoratedOperator, private EntityManagerInterface $productVariantManager)
26-
{
25+
public function __construct(
26+
private OrderInventoryOperatorInterface $decoratedOperator,
27+
private EntityManagerInterface $productVariantManager
28+
) {
2729
}
2830

2931
/**

src/Sylius/Bundle/CoreBundle/EventListener/ImagesRemoveListener.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ final class ImagesRemoveListener
2828
/** @var string[] */
2929
private array $imagesToDelete = [];
3030

31-
public function __construct(private ImageUploaderInterface $imageUploader, private CacheManager $cacheManager, private FilterManager $filterManager)
32-
{
31+
public function __construct(
32+
private ImageUploaderInterface $imageUploader,
33+
private CacheManager $cacheManager,
34+
private FilterManager $filterManager
35+
) {
3336
}
3437

3538
public function onFlush(OnFlushEventArgs $event): void

src/Sylius/Bundle/CoreBundle/EventListener/MailerListener.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@
2626

2727
final class MailerListener
2828
{
29-
public function __construct(private SenderInterface $emailSender, private ChannelContextInterface $channelContext, private LocaleContextInterface $localeContext)
30-
{
29+
public function __construct(
30+
private SenderInterface $emailSender,
31+
private ChannelContextInterface $channelContext,
32+
private LocaleContextInterface $localeContext
33+
) {
3134
}
3235

3336
public function sendResetPasswordTokenEmail(GenericEvent $event): void

src/Sylius/Bundle/CoreBundle/Fixture/Factory/AdminUserExampleFactory.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@
1313

1414
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
1515

16-
use Faker\Generator;
1716
use Faker\Factory;
17+
use Faker\Generator;
1818
use Sylius\Component\Core\Model\AdminUserInterface;
1919
use Sylius\Component\Core\Model\AvatarImage;
20-
use Sylius\Component\Core\Uploader\ImageUploaderInterface;
2120
use Sylius\Component\Resource\Factory\FactoryInterface;
22-
use Symfony\Component\Config\FileLocatorInterface;
2321
use Symfony\Component\HttpFoundation\File\UploadedFile;
2422
use Symfony\Component\OptionsResolver\Options;
2523
use Symfony\Component\OptionsResolver\OptionsResolver;
@@ -85,8 +83,8 @@ public function create(array $options = []): AdminUserInterface
8583
protected function configureOptions(OptionsResolver $resolver): void
8684
{
8785
$resolver
88-
->setDefault('email', fn(Options $options): string => $this->faker->email)
89-
->setDefault('username', fn(Options $options): string => $this->faker->firstName . ' ' . $this->faker->lastName)
86+
->setDefault('email', fn (Options $options): string => $this->faker->email)
87+
->setDefault('username', fn (Options $options): string => $this->faker->firstName . ' ' . $this->faker->lastName)
9088
->setDefault('enabled', true)
9189
->setAllowedTypes('enabled', 'bool')
9290
->setDefault('password', 'password123')

src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductExampleFactory.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
1515

16-
use Faker\Generator;
1716
use Faker\Factory;
17+
use Faker\Generator;
1818
use Sylius\Bundle\CoreBundle\Fixture\OptionsResolver\LazyOption;
1919
use Sylius\Component\Attribute\AttributeType\SelectAttributeType;
2020
use Sylius\Component\Core\Formatter\StringInflector;
@@ -34,7 +34,6 @@
3434
use Sylius\Component\Resource\Factory\FactoryInterface;
3535
use Sylius\Component\Resource\Repository\RepositoryInterface;
3636
use Sylius\Component\Taxation\Model\TaxCategoryInterface;
37-
use Symfony\Component\Config\FileLocatorInterface;
3837
use Symfony\Component\HttpFoundation\File\UploadedFile;
3938
use Symfony\Component\OptionsResolver\Options;
4039
use Symfony\Component\OptionsResolver\OptionsResolver;
@@ -105,17 +104,17 @@ protected function configureOptions(OptionsResolver $resolver): void
105104
return $words;
106105
})
107106

108-
->setDefault('code', fn(Options $options): string => StringInflector::nameToCode($options['name']))
107+
->setDefault('code', fn (Options $options): string => StringInflector::nameToCode($options['name']))
109108

110109
->setDefault('enabled', true)
111110
->setAllowedTypes('enabled', 'bool')
112111

113112
->setDefault('tracked', false)
114113
->setAllowedTypes('tracked', 'bool')
115114

116-
->setDefault('slug', fn(Options $options): string => $this->slugGenerator->generate($options['name']))
115+
->setDefault('slug', fn (Options $options): string => $this->slugGenerator->generate($options['name']))
117116

118-
->setDefault('short_description', fn(Options $options): string => $this->faker->paragraph)
117+
->setDefault('short_description', fn (Options $options): string => $this->faker->paragraph)
119118

120119
->setDefault('description', function (Options $options): string {
121120
/** @var string $paragraphs */
@@ -141,7 +140,7 @@ protected function configureOptions(OptionsResolver $resolver): void
141140

142141
->setDefault('product_attributes', [])
143142
->setAllowedTypes('product_attributes', 'array')
144-
->setNormalizer('product_attributes', fn(Options $options, array $productAttributes): array => $this->setAttributeValues($productAttributes))
143+
->setNormalizer('product_attributes', fn (Options $options, array $productAttributes): array => $this->setAttributeValues($productAttributes))
145144

146145
->setDefault('product_options', [])
147146
->setAllowedTypes('product_options', 'array')
@@ -359,7 +358,7 @@ private function generateProductVariantName(ProductVariantInterface $variant): s
359358
{
360359
return trim(array_reduce(
361360
$variant->getOptionValues()->toArray(),
362-
static fn(?string $variantName, ProductOptionValueInterface $variantOption) => $variantName . sprintf('%s ', $variantOption->getValue()),
361+
static fn (?string $variantName, ProductOptionValueInterface $variantOption) => $variantName . sprintf('%s ', $variantOption->getValue()),
363362
''
364363
));
365364
}

src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionExampleFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
1515

16-
use Faker\Generator;
1716
use Faker\Factory;
17+
use Faker\Generator;
1818
use Sylius\Bundle\CoreBundle\Fixture\OptionsResolver\LazyOption;
1919
use Sylius\Component\Channel\Repository\ChannelRepositoryInterface;
2020
use Sylius\Component\Core\Formatter\StringInflector;
@@ -98,7 +98,7 @@ public function create(array $options = []): PromotionInterface
9898
protected function configureOptions(OptionsResolver $resolver): void
9999
{
100100
$resolver
101-
->setDefault('code', fn(Options $options): string => StringInflector::nameToCode($options['name']))
101+
->setDefault('code', fn (Options $options): string => StringInflector::nameToCode($options['name']))
102102
->setDefault('name', $this->faker->words(3, true))
103103
->setDefault('description', $this->faker->sentence())
104104
->setDefault('usage_limit', null)

src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingMethodExampleFactory.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
1515

16-
use Faker\Generator;
1716
use Faker\Factory;
17+
use Faker\Generator;
1818
use Sylius\Bundle\CoreBundle\Fixture\OptionsResolver\LazyOption;
1919
use Sylius\Component\Addressing\Model\ZoneInterface;
2020
use Sylius\Component\Channel\Repository\ChannelRepositoryInterface;
@@ -93,15 +93,15 @@ public function create(array $options = []): ShippingMethodInterface
9393
protected function configureOptions(OptionsResolver $resolver): void
9494
{
9595
$resolver
96-
->setDefault('code', fn(Options $options): string => StringInflector::nameToCode($options['name']))
96+
->setDefault('code', fn (Options $options): string => StringInflector::nameToCode($options['name']))
9797
->setDefault('name', function (Options $options): string {
9898
/** @var string $words */
9999
$words = $this->faker->words(3, true);
100100

101101
return $words;
102102
})
103-
->setDefault('description', fn(Options $options): string => $this->faker->sentence())
104-
->setDefault('enabled', fn(Options $options): bool => $this->faker->boolean(90))
103+
->setDefault('description', fn (Options $options): string => $this->faker->sentence())
104+
->setDefault('enabled', fn (Options $options): bool => $this->faker->boolean(90))
105105
->setAllowedTypes('enabled', 'bool')
106106
->setDefault('zone', LazyOption::randomOne($this->zoneRepository))
107107
->setAllowedTypes('zone', ['null', 'string', ZoneInterface::class])

0 commit comments

Comments
 (0)