diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingCustomerGroupsContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingCustomerGroupsContext.php
index d5fee737926d..e796c6bc435c 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingCustomerGroupsContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingCustomerGroupsContext.php
@@ -224,8 +224,8 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyDeleted(): void
{
Assert::true(
$this->responseChecker->isDeletionSuccessful(
- $this->client->getLastResponse()
- ),
+ $this->client->getLastResponse()
+ ),
'Customer group could not be deleted'
);
}
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingOrdersContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingOrdersContext.php
index 519bd5a1f860..a5e0139b6a34 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingOrdersContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingOrdersContext.php
@@ -127,10 +127,10 @@ public function iShouldSeeASingleOrderFromCustomer(CustomerInterface $customer):
{
Assert::true(
$this->responseChecker->hasItemWithValue(
- $this->client->getLastResponse(),
- 'customer',
- $this->iriConverter->getIriFromItem($customer)
- ),
+ $this->client->getLastResponse(),
+ 'customer',
+ $this->iriConverter->getIriFromItem($customer)
+ ),
sprintf('There is no order for customer %s', $customer->getEmail())
);
}
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingProductAssociationTypesContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingProductAssociationTypesContext.php
index 620084249efa..38d112e2a8cb 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingProductAssociationTypesContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingProductAssociationTypesContext.php
@@ -145,8 +145,8 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyDeleted(): void
{
Assert::true(
$this->responseChecker->isDeletionSuccessful(
- $this->client->getLastResponse()
- ),
+ $this->client->getLastResponse()
+ ),
'Product association type could not be deleted'
);
}
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingZonesContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingZonesContext.php
index 2133993dbf4f..8a5449c26735 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingZonesContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingZonesContext.php
@@ -405,8 +405,8 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyDeleted(): void
{
Assert::true(
$this->responseChecker->isDeletionSuccessful(
- $this->client->getLastResponse()
- ),
+ $this->client->getLastResponse()
+ ),
'Zone could not be deleted'
);
}
diff --git a/src/Sylius/Behat/Context/Api/Shop/AddressContext.php b/src/Sylius/Behat/Context/Api/Shop/AddressContext.php
index af4148925899..f3d4069157bf 100644
--- a/src/Sylius/Behat/Context/Api/Shop/AddressContext.php
+++ b/src/Sylius/Behat/Context/Api/Shop/AddressContext.php
@@ -384,9 +384,9 @@ public function iShouldBeNotifiedThatTheProvinceNeedsToBeSpecified(): void
{
Assert::true(
$this->responseChecker->hasViolationWithMessage(
- $this->addressClient->getLastResponse(),
- 'Please select proper province.'
- )
+ $this->addressClient->getLastResponse(),
+ 'Please select proper province.'
+ )
);
}
diff --git a/src/Sylius/Behat/Context/Api/Shop/ChannelContext.php b/src/Sylius/Behat/Context/Api/Shop/ChannelContext.php
index d6c33f713675..0373ca0c48b9 100644
--- a/src/Sylius/Behat/Context/Api/Shop/ChannelContext.php
+++ b/src/Sylius/Behat/Context/Api/Shop/ChannelContext.php
@@ -61,9 +61,9 @@ public function iShouldShopUsingTheCurrency(string $currencyCode): void
{
Assert::same(
$this->responseChecker->getValue(
- $this->client->getLastResponse(),
- 'baseCurrency'
- )['code'],
+ $this->client->getLastResponse(),
+ 'baseCurrency'
+ )['code'],
$currencyCode
);
}
diff --git a/src/Sylius/Behat/Context/Api/Shop/LoginContext.php b/src/Sylius/Behat/Context/Api/Shop/LoginContext.php
index 803fa6ca0014..adc213e95f1a 100644
--- a/src/Sylius/Behat/Context/Api/Shop/LoginContext.php
+++ b/src/Sylius/Behat/Context/Api/Shop/LoginContext.php
@@ -13,12 +13,12 @@
namespace Sylius\Behat\Context\Api\Shop;
-use Sylius\Behat\Client\RequestInterface;
use ApiPlatform\Core\Api\IriConverterInterface;
use Behat\Behat\Context\Context;
use Sylius\Behat\Client\ApiClientInterface;
use Sylius\Behat\Client\ApiSecurityClientInterface;
use Sylius\Behat\Client\Request;
+use Sylius\Behat\Client\RequestInterface;
use Sylius\Behat\Client\ResponseCheckerInterface;
use Sylius\Behat\Service\SharedStorageInterface;
use Sylius\Component\Core\Model\CustomerInterface;
diff --git a/src/Sylius/Behat/Context/Cli/CancelUnpaidOrdersContext.php b/src/Sylius/Behat/Context/Cli/CancelUnpaidOrdersContext.php
index 763be2a87526..1e368cf08a9d 100644
--- a/src/Sylius/Behat/Context/Cli/CancelUnpaidOrdersContext.php
+++ b/src/Sylius/Behat/Context/Cli/CancelUnpaidOrdersContext.php
@@ -13,13 +13,13 @@
namespace Sylius\Behat\Context\Cli;
+use Behat\Behat\Context\Context;
use Sylius\Component\Core\OrderPaymentStates;
use Sylius\Component\Core\Repository\OrderRepositoryInterface;
-use Webmozart\Assert\Assert;
-use Behat\Behat\Context\Context;
+use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;
use Symfony\Component\HttpKernel\KernelInterface;
-use Symfony\Bundle\FrameworkBundle\Console\Application;
+use Webmozart\Assert\Assert;
final class CancelUnpaidOrdersContext implements Context
{
@@ -64,6 +64,6 @@ public function onlyOrderWithNumberShouldBeCanceled(string $orderNumber): void
*/
public function shouldBeInformedThatUnpaidOrdersHaveBeenCanceled(): void
{
- Assert::contains($this->commandTester->getDisplay(), "Unpaid orders have been canceled");
+ Assert::contains($this->commandTester->getDisplay(), 'Unpaid orders have been canceled');
}
}
diff --git a/src/Sylius/Behat/Context/Cli/InstallerContext.php b/src/Sylius/Behat/Context/Cli/InstallerContext.php
index c1f136ed78e9..8325f250bf96 100644
--- a/src/Sylius/Behat/Context/Cli/InstallerContext.php
+++ b/src/Sylius/Behat/Context/Cli/InstallerContext.php
@@ -13,11 +13,11 @@
namespace Sylius\Behat\Context\Cli;
-use Symfony\Component\Console\Command\Command;
use Behat\Behat\Context\Context;
use Sylius\Bundle\CoreBundle\Command\InstallSampleDataCommand;
use Sylius\Bundle\CoreBundle\Command\SetupCommand;
use Symfony\Bundle\FrameworkBundle\Console\Application;
+use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Tester\CommandTester;
use Symfony\Component\HttpKernel\KernelInterface;
use Webmozart\Assert\Assert;
diff --git a/src/Sylius/Behat/Context/Cli/ShowingAvailablePluginsContext.php b/src/Sylius/Behat/Context/Cli/ShowingAvailablePluginsContext.php
index 73dc7ef2efcc..b9bca864f878 100644
--- a/src/Sylius/Behat/Context/Cli/ShowingAvailablePluginsContext.php
+++ b/src/Sylius/Behat/Context/Cli/ShowingAvailablePluginsContext.php
@@ -13,10 +13,10 @@
namespace Sylius\Behat\Context\Cli;
-use Symfony\Component\Console\Command\Command;
use Behat\Behat\Context\Context;
use Sylius\Bundle\CoreBundle\Command\SetupCommand;
use Symfony\Bundle\FrameworkBundle\Console\Application;
+use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Tester\CommandTester;
use Symfony\Component\HttpKernel\KernelInterface;
use Webmozart\Assert\Assert;
diff --git a/src/Sylius/Behat/Context/Setup/ProductAttributeContext.php b/src/Sylius/Behat/Context/Setup/ProductAttributeContext.php
index 4860e6b82afb..11e5e9028565 100644
--- a/src/Sylius/Behat/Context/Setup/ProductAttributeContext.php
+++ b/src/Sylius/Behat/Context/Setup/ProductAttributeContext.php
@@ -13,10 +13,10 @@
namespace Sylius\Behat\Context\Setup;
-use Faker\Generator;
-use Faker\Factory;
use Behat\Behat\Context\Context;
use Doctrine\Persistence\ObjectManager;
+use Faker\Factory;
+use Faker\Generator;
use Sylius\Behat\Service\SharedStorageInterface;
use Sylius\Component\Attribute\AttributeType\SelectAttributeType;
use Sylius\Component\Attribute\Factory\AttributeFactoryInterface;
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingOrdersContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingOrdersContext.php
index cfaeb8b02464..26dc00876241 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingOrdersContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingOrdersContext.php
@@ -269,11 +269,11 @@ public function itShouldBeShippedTo(
* @Then the order should be billed to :customerName, :street, :postcode, :city, :countryName
*/
public function itShouldBeBilledToCustomerAtAddress(
- string $customerName,
- string $street,
- string $postcode,
- string $city,
- string $countryName
+ string $customerName,
+ string $street,
+ string $postcode,
+ string $city,
+ string $countryName
) {
$this->itShouldBeBilledTo(null, $customerName, $street, $postcode, $city, $countryName);
}
diff --git a/src/Sylius/Behat/Context/Ui/Shop/LoginContext.php b/src/Sylius/Behat/Context/Ui/Shop/LoginContext.php
index 73c897ee3953..fc2bef0dd186 100644
--- a/src/Sylius/Behat/Context/Ui/Shop/LoginContext.php
+++ b/src/Sylius/Behat/Context/Ui/Shop/LoginContext.php
@@ -14,7 +14,6 @@
namespace Sylius\Behat\Context\Ui\Shop;
use Behat\Behat\Context\Context;
-use FriendsOfBehat\PageObjectExtension\Page\UnexpectedPageException;
use Sylius\Behat\Element\Shop\Account\RegisterElementInterface;
use Sylius\Behat\NotificationType;
use Sylius\Behat\Page\Shop\Account\LoginPageInterface;
diff --git a/src/Sylius/Behat/Context/Ui/Shop/ProductContext.php b/src/Sylius/Behat/Context/Ui/Shop/ProductContext.php
index f32023d57a19..0c0b1a15409a 100644
--- a/src/Sylius/Behat/Context/Ui/Shop/ProductContext.php
+++ b/src/Sylius/Behat/Context/Ui/Shop/ProductContext.php
@@ -218,7 +218,7 @@ public function iCheckListOfProductsForTaxon(TaxonInterface $taxon): void
*/
public function iTryToBrowseProductsFromTaxonWithATrailingSlashInThePath(TaxonInterface $taxon): void
{
- $this->indexPage->tryToOpen(['slug' => $taxon->getSlug().'/']);
+ $this->indexPage->tryToOpen(['slug' => $taxon->getSlug() . '/']);
}
/**
diff --git a/src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php b/src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php
index 95193b4bf233..0ec74c2d4172 100644
--- a/src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php
+++ b/src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php
@@ -57,9 +57,9 @@ private function hasProductWithGivenNameCodePriceAndCurrentStock(
$variantContent = $variant->getParent()->find(
'css',
sprintf(
- '.variants-accordion__content.%s',
- explode(' ', $variant->getAttribute('class'))[1]
- )
+ '.variants-accordion__content.%s',
+ explode(' ', $variant->getAttribute('class'))[1]
+ )
);
if (
diff --git a/src/Sylius/Behat/Page/ErrorPageInterface.php b/src/Sylius/Behat/Page/ErrorPageInterface.php
index e36123e28858..0d650ab483d7 100644
--- a/src/Sylius/Behat/Page/ErrorPageInterface.php
+++ b/src/Sylius/Behat/Page/ErrorPageInterface.php
@@ -14,6 +14,7 @@
namespace Sylius\Behat\Page;
use Behat\Mink\Exception\ElementNotFoundException;
+
interface ErrorPageInterface
{
public function getCode(): int;
diff --git a/src/Sylius/Behat/Page/Shop/Cart/SummaryPageInterface.php b/src/Sylius/Behat/Page/Shop/Cart/SummaryPageInterface.php
index 0d69569691c2..aed7509d1f92 100644
--- a/src/Sylius/Behat/Page/Shop/Cart/SummaryPageInterface.php
+++ b/src/Sylius/Behat/Page/Shop/Cart/SummaryPageInterface.php
@@ -21,6 +21,7 @@ interface SummaryPageInterface extends PageInterface
public function getGrandTotal(): string;
public function getBaseGrandTotal(): string;
+
public function getIncludedTaxTotal(): string;
public function getExcludedTaxTotal(): string;
diff --git a/src/Sylius/Behat/Service/SessionManager.php b/src/Sylius/Behat/Service/SessionManager.php
index 7bd1f57fc842..ab88f13744a9 100644
--- a/src/Sylius/Behat/Service/SessionManager.php
+++ b/src/Sylius/Behat/Service/SessionManager.php
@@ -66,6 +66,7 @@ private function saveAndRestartSession(string $newSessionName): void
$previousSessionName = $this->mink->getDefaultSessionName();
$this->sharedStorage->set('behat_previous_session_name', $previousSessionName);
+
try {
$token = $this->securityService->getCurrentToken();
$this->sharedStorage->set($this->getKeyForToken($previousSessionName), $token);
diff --git a/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryChoiceType.php b/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryChoiceType.php
index 2be7cffd29f4..d0156f99214b 100644
--- a/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryChoiceType.php
+++ b/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryChoiceType.php
@@ -65,7 +65,7 @@ public function configureOptions(OptionsResolver $resolver): void
$countries = array_filter($countries, $options['choice_filter']);
}
- usort($countries, static fn(CountryInterface $firstCountry, CountryInterface $secondCountry): int => $firstCountry->getName() <=> $secondCountry->getName());
+ usort($countries, static fn (CountryInterface $firstCountry, CountryInterface $secondCountry): int => $firstCountry->getName() <=> $secondCountry->getName());
return $countries;
})
diff --git a/src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneType.php b/src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneType.php
index 25c325289d7c..f74aa0d6dcbf 100644
--- a/src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneType.php
+++ b/src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneType.php
@@ -71,7 +71,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
];
if ($zone->getType() === ZoneInterface::TYPE_ZONE) {
- $entryOptions['entry_options']['choice_filter'] = static fn(?ZoneInterface $subZone): bool => $subZone !== null && $zone->getId() !== $subZone->getId();
+ $entryOptions['entry_options']['choice_filter'] = static fn (?ZoneInterface $subZone): bool => $subZone !== null && $zone->getId() !== $subZone->getId();
}
$event->getForm()->add('members', CollectionType::class, [
diff --git a/src/Sylius/Bundle/AddressingBundle/Tests/Form/Type/CountryChoiceTypeTest.php b/src/Sylius/Bundle/AddressingBundle/Tests/Form/Type/CountryChoiceTypeTest.php
index 59d40131b49c..4be4d5385f3e 100644
--- a/src/Sylius/Bundle/AddressingBundle/Tests/Form/Type/CountryChoiceTypeTest.php
+++ b/src/Sylius/Bundle/AddressingBundle/Tests/Form/Type/CountryChoiceTypeTest.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\AddressingBundle\Tests\Form\Type;
-use Prophecy\Prophecy\ObjectProphecy;
use PHPUnit\Framework\Assert;
+use Prophecy\Prophecy\ObjectProphecy;
use Prophecy\Prophecy\ProphecyInterface;
use Sylius\Bundle\AddressingBundle\Form\Type\CountryChoiceType;
use Sylius\Component\Addressing\Model\CountryInterface;
@@ -110,7 +110,7 @@ public function it_returns_filtered_out_countries(): void
$this->poland->reveal(),
]);
- $this->assertChoicesLabels(['Poland'], ['choice_filter' => static fn(?CountryInterface $country): bool => $country !== null && $country->getName() === 'Poland']);
+ $this->assertChoicesLabels(['Poland'], ['choice_filter' => static fn (?CountryInterface $country): bool => $country !== null && $country->getName() === 'Poland']);
}
private function assertChoicesLabels(array $expectedLabels, array $formConfiguration = []): void
@@ -118,6 +118,6 @@ private function assertChoicesLabels(array $expectedLabels, array $formConfigura
$form = $this->factory->create(CountryChoiceType::class, null, $formConfiguration);
$view = $form->createView();
- Assert::assertSame($expectedLabels, array_map(static fn(ChoiceView $choiceView): string => $choiceView->label, $view->vars['choices']));
+ Assert::assertSame($expectedLabels, array_map(static fn (ChoiceView $choiceView): string => $choiceView->label, $view->vars['choices']));
}
}
diff --git a/src/Sylius/Bundle/AddressingBundle/Tests/Form/Type/ZoneChoiceTypeTest.php b/src/Sylius/Bundle/AddressingBundle/Tests/Form/Type/ZoneChoiceTypeTest.php
index e16f1b3b106d..f3d64dfc3d5f 100644
--- a/src/Sylius/Bundle/AddressingBundle/Tests/Form/Type/ZoneChoiceTypeTest.php
+++ b/src/Sylius/Bundle/AddressingBundle/Tests/Form/Type/ZoneChoiceTypeTest.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\AddressingBundle\Tests\Form\Type;
-use Prophecy\Prophecy\ObjectProphecy;
use PHPUnit\Framework\Assert;
+use Prophecy\Prophecy\ObjectProphecy;
use Prophecy\Prophecy\ProphecyInterface;
use Sylius\Bundle\AddressingBundle\Form\Type\ZoneChoiceType;
use Sylius\Component\Addressing\Model\Scope as AddressingScope;
@@ -136,6 +136,6 @@ private function assertChoicesLabels(array $expectedLabels, array $formConfigura
$form = $this->factory->create(ZoneChoiceType::class, null, $formConfiguration);
$view = $form->createView();
- Assert::assertSame($expectedLabels, array_map(fn(ChoiceView $choiceView): string => $choiceView->label, $view->vars['choices']));
+ Assert::assertSame($expectedLabels, array_map(fn (ChoiceView $choiceView): string => $choiceView->label, $view->vars['choices']));
}
}
diff --git a/src/Sylius/Bundle/AddressingBundle/spec/Validator/Constraints/ProvinceAddressConstraintValidatorSpec.php b/src/Sylius/Bundle/AddressingBundle/spec/Validator/Constraints/ProvinceAddressConstraintValidatorSpec.php
index 01c4e1727e27..ad036af453d6 100644
--- a/src/Sylius/Bundle/AddressingBundle/spec/Validator/Constraints/ProvinceAddressConstraintValidatorSpec.php
+++ b/src/Sylius/Bundle/AddressingBundle/spec/Validator/Constraints/ProvinceAddressConstraintValidatorSpec.php
@@ -19,7 +19,6 @@
use Sylius\Bundle\AddressingBundle\Validator\Constraints\ProvinceAddressConstraintValidator;
use Sylius\Component\Addressing\Model\AddressInterface;
use Sylius\Component\Addressing\Model\Country;
-use Sylius\Component\Addressing\Model\CountryInterface;
use Sylius\Component\Addressing\Model\Province;
use Sylius\Component\Resource\Repository\RepositoryInterface;
use Symfony\Component\Validator\Constraint;
diff --git a/src/Sylius/Bundle/AddressingBundle/test/src/Tests/SyliusAddressingBundleTest.php b/src/Sylius/Bundle/AddressingBundle/test/src/Tests/SyliusAddressingBundleTest.php
index d014f639f132..6201814a9fbd 100644
--- a/src/Sylius/Bundle/AddressingBundle/test/src/Tests/SyliusAddressingBundleTest.php
+++ b/src/Sylius/Bundle/AddressingBundle/test/src/Tests/SyliusAddressingBundleTest.php
@@ -30,7 +30,7 @@ public function its_services_are_initializable(): void
$services = $container->getServiceIds();
- $services = array_filter($services, fn(string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
+ $services = array_filter($services, fn (string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
foreach ($services as $id) {
Assert::assertNotNull($container->get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE));
diff --git a/src/Sylius/Bundle/AdminBundle/Controller/NotificationController.php b/src/Sylius/Bundle/AdminBundle/Controller/NotificationController.php
index 5dcba218634b..a1494b7320b3 100644
--- a/src/Sylius/Bundle/AdminBundle/Controller/NotificationController.php
+++ b/src/Sylius/Bundle/AdminBundle/Controller/NotificationController.php
@@ -17,7 +17,6 @@
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\Psr7\Uri;
use Http\Message\MessageFactory;
-use Psr\Http\Message\UriInterface;
use Sylius\Bundle\CoreBundle\Application\Kernel;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
diff --git a/src/Sylius/Bundle/AdminBundle/Tests/Controller/NotificationControllerTest.php b/src/Sylius/Bundle/AdminBundle/Tests/Controller/NotificationControllerTest.php
index 267bd38e2e4d..f21b3c6914a2 100644
--- a/src/Sylius/Bundle/AdminBundle/Tests/Controller/NotificationControllerTest.php
+++ b/src/Sylius/Bundle/AdminBundle/Tests/Controller/NotificationControllerTest.php
@@ -13,12 +13,12 @@
namespace Sylius\Bundle\AdminBundle\Tests\Controller;
-use Prophecy\Prophecy\ObjectProphecy;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\ConnectException;
use Http\Message\MessageFactory;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
+use Prophecy\Prophecy\ObjectProphecy;
use Prophecy\Prophecy\ProphecyInterface;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
diff --git a/src/Sylius/Bundle/AdminBundle/Twig/OrderUnitTaxesExtension.php b/src/Sylius/Bundle/AdminBundle/Twig/OrderUnitTaxesExtension.php
index e45984a04bfb..13dae9e5aa99 100644
--- a/src/Sylius/Bundle/AdminBundle/Twig/OrderUnitTaxesExtension.php
+++ b/src/Sylius/Bundle/AdminBundle/Twig/OrderUnitTaxesExtension.php
@@ -43,7 +43,7 @@ private function getAmount(OrderItemInterface $orderItem, bool $neutral): int
{
$total = array_reduce(
$orderItem->getAdjustmentsRecursively(AdjustmentInterface::TAX_ADJUSTMENT)->toArray(),
- static fn(int $total, BaseAdjustmentInterface $adjustment) => $neutral === $adjustment->isNeutral() ? $total + $adjustment->getAmount() : $total,
+ static fn (int $total, BaseAdjustmentInterface $adjustment) => $neutral === $adjustment->isNeutral() ? $total + $adjustment->getAmount() : $total,
0
);
diff --git a/src/Sylius/Bundle/AdminBundle/Twig/ShopExtension.php b/src/Sylius/Bundle/AdminBundle/Twig/ShopExtension.php
index 35b5f86b9c6b..6c3fcd468385 100644
--- a/src/Sylius/Bundle/AdminBundle/Twig/ShopExtension.php
+++ b/src/Sylius/Bundle/AdminBundle/Twig/ShopExtension.php
@@ -28,7 +28,7 @@ public function __construct(bool $isShopEnabled)
public function getFunctions(): array
{
return [
- new TwigFunction('is_shop_enabled', fn(): bool => $this->isShopEnabled),
+ new TwigFunction('is_shop_enabled', fn (): bool => $this->isShopEnabled),
];
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/Command/Account/ChangePaymentMethod.php b/src/Sylius/Bundle/ApiBundle/Command/Account/ChangePaymentMethod.php
index 3dc0ce9864d4..8d3746e2e688 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/Account/ChangePaymentMethod.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/Account/ChangePaymentMethod.php
@@ -19,19 +19,19 @@
/** @experimental */
class ChangePaymentMethod implements OrderTokenValueAwareInterface, SubresourceIdAwareInterface
{
- /**
- * @var string|null
- */
+ /** @var string|null */
public $orderTokenValue;
/**
* @psalm-immutable
+ *
* @var string|null
*/
public $paymentId;
/**
* @psalm-immutable
+ *
* @var string
*/
public $paymentMethodCode;
diff --git a/src/Sylius/Bundle/ApiBundle/Command/AddProductReview.php b/src/Sylius/Bundle/ApiBundle/Command/AddProductReview.php
index 88c28133d07c..64f3429fed04 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/AddProductReview.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/AddProductReview.php
@@ -18,30 +18,35 @@ class AddProductReview implements CommandAwareDataTransformerInterface
{
/**
* @psalm-immutable
+ *
* @var string|null
*/
public $title;
/**
* @psalm-immutable
+ *
* @var int|null
*/
public $rating;
/**
* @psalm-immutable
+ *
* @var string|null
*/
public $comment;
/**
* @psalm-immutable
+ *
* @var string
*/
public $productCode;
/**
* @psalm-immutable
+ *
* @var string|null
*/
public $email;
diff --git a/src/Sylius/Bundle/ApiBundle/Command/BlameCart.php b/src/Sylius/Bundle/ApiBundle/Command/BlameCart.php
index 8b53e1ce054e..84fd47f42508 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/BlameCart.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/BlameCart.php
@@ -18,12 +18,14 @@ class BlameCart
{
/**
* @psalm-immutable
+ *
* @var string
*/
public $shopUserEmail;
/**
* @psalm-immutable
+ *
* @var string
*/
public $orderTokenValue;
diff --git a/src/Sylius/Bundle/ApiBundle/Command/Cart/AddItemToCart.php b/src/Sylius/Bundle/ApiBundle/Command/Cart/AddItemToCart.php
index 094876212677..d279e0578a48 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/Cart/AddItemToCart.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/Cart/AddItemToCart.php
@@ -18,19 +18,19 @@
/** @experimental */
class AddItemToCart implements OrderTokenValueAwareInterface
{
- /**
- * @var string|null
- */
+ /** @var string|null */
public $orderTokenValue;
/**
* @psalm-immutable
+ *
* @var string
*/
public $productVariantCode;
/**
* @psalm-immutable
+ *
* @var int
*/
public $quantity;
diff --git a/src/Sylius/Bundle/ApiBundle/Command/Cart/ApplyCouponToCart.php b/src/Sylius/Bundle/ApiBundle/Command/Cart/ApplyCouponToCart.php
index 0510c302d28a..b1a3171b446a 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/Cart/ApplyCouponToCart.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/Cart/ApplyCouponToCart.php
@@ -18,14 +18,10 @@
/** @experimental */
class ApplyCouponToCart implements OrderTokenValueAwareInterface
{
- /**
- * @var string|null
- */
+ /** @var string|null */
public $orderTokenValue;
- /**
- * @var string|null
- */
+ /** @var string|null */
public $couponCode;
public function __construct(?string $couponCode)
diff --git a/src/Sylius/Bundle/ApiBundle/Command/Cart/ChangeItemQuantityInCart.php b/src/Sylius/Bundle/ApiBundle/Command/Cart/ChangeItemQuantityInCart.php
index 110c82abe0e1..cace2725f164 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/Cart/ChangeItemQuantityInCart.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/Cart/ChangeItemQuantityInCart.php
@@ -19,18 +19,15 @@
/** @experimental */
class ChangeItemQuantityInCart implements OrderTokenValueAwareInterface, SubresourceIdAwareInterface
{
- /**
- * @var string|null
- */
+ /** @var string|null */
public $orderTokenValue;
- /**
- * @var string|null
- */
+ /** @var string|null */
public $orderItemId;
/**
* @psalm-immutable
+ *
* @var int
*/
public $quantity;
diff --git a/src/Sylius/Bundle/ApiBundle/Command/Cart/PickupCart.php b/src/Sylius/Bundle/ApiBundle/Command/Cart/PickupCart.php
index b3af4ac36730..bc90d2f47f47 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/Cart/PickupCart.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/Cart/PickupCart.php
@@ -18,20 +18,18 @@
/** @experimental */
class PickupCart implements ChannelCodeAwareInterface
{
- /**
- * @psalm-immutable
+ /** @psalm-immutable
* @var string|null */
public $tokenValue;
/**
* @psalm-immutable
+ *
* @var string|null
*/
public $localeCode;
- /**
- * @var string|null
- */
+ /** @var string|null */
private $channelCode;
public function __construct(?string $tokenValue = null, ?string $localeCode = null)
diff --git a/src/Sylius/Bundle/ApiBundle/Command/Cart/RemoveItemFromCart.php b/src/Sylius/Bundle/ApiBundle/Command/Cart/RemoveItemFromCart.php
index 39d021eb4cac..be8d80460cf8 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/Cart/RemoveItemFromCart.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/Cart/RemoveItemFromCart.php
@@ -18,13 +18,12 @@
/** @experimental */
class RemoveItemFromCart implements OrderTokenValueAwareInterface
{
- /**
- * @var string|null
- */
+ /** @var string|null */
public $orderTokenValue;
/**
* @psalm-immutable
+ *
* @var string
*/
public $itemId;
diff --git a/src/Sylius/Bundle/ApiBundle/Command/ChangeShopUserPassword.php b/src/Sylius/Bundle/ApiBundle/Command/ChangeShopUserPassword.php
index ab76e755de78..01d8fe658039 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/ChangeShopUserPassword.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/ChangeShopUserPassword.php
@@ -21,18 +21,21 @@ class ChangeShopUserPassword implements ShopUserIdAwareInterface
/**
* @psalm-immutable
+ *
* @var string|null
*/
public $newPassword;
/**
* @psalm-immutable
+ *
* @var string|null
*/
public $confirmNewPassword;
/**
* @psalm-immutable
+ *
* @var string|null
*/
public $currentPassword;
diff --git a/src/Sylius/Bundle/ApiBundle/Command/Checkout/AddressOrder.php b/src/Sylius/Bundle/ApiBundle/Command/Checkout/AddressOrder.php
index e9cde6e2f275..b6310250d1be 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/Checkout/AddressOrder.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/Checkout/AddressOrder.php
@@ -19,25 +19,26 @@
/** @experimental */
class AddressOrder implements OrderTokenValueAwareInterface
{
- /**
- * @var string|null
- */
+ /** @var string|null */
public $orderTokenValue;
/**
* @psalm-immutable
+ *
* @var string|null
*/
public $email;
/**
* @psalm-immutable
+ *
* @var AddressInterface
*/
public $billingAddress;
/**
* @psalm-immutable
+ *
* @var AddressInterface|null
*/
public $shippingAddress;
diff --git a/src/Sylius/Bundle/ApiBundle/Command/Checkout/ChoosePaymentMethod.php b/src/Sylius/Bundle/ApiBundle/Command/Checkout/ChoosePaymentMethod.php
index f5ff57ff4d47..f3f2fec70ad8 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/Checkout/ChoosePaymentMethod.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/Checkout/ChoosePaymentMethod.php
@@ -20,19 +20,19 @@
/** @experimental */
class ChoosePaymentMethod implements OrderTokenValueAwareInterface, SubresourceIdAwareInterface, PaymentMethodCodeAwareInterface
{
- /**
- * @var string|null
- */
+ /** @var string|null */
public $orderTokenValue;
/**
* @psalm-immutable
+ *
* @var string|null
*/
public $paymentId;
/**
* @psalm-immutable
+ *
* @var string|null
*/
public $paymentMethodCode;
diff --git a/src/Sylius/Bundle/ApiBundle/Command/Checkout/ChooseShippingMethod.php b/src/Sylius/Bundle/ApiBundle/Command/Checkout/ChooseShippingMethod.php
index 8c9571e15307..f72bb4d619af 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/Checkout/ChooseShippingMethod.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/Checkout/ChooseShippingMethod.php
@@ -19,18 +19,15 @@
/** @experimental */
class ChooseShippingMethod implements OrderTokenValueAwareInterface, SubresourceIdAwareInterface
{
- /**
- * @var string|null
- */
+ /** @var string|null */
public $orderTokenValue;
- /**
- * @var string|null
- */
+ /** @var string|null */
public $shipmentId;
/**
* @psalm-immutable
+ *
* @var string
*/
public $shippingMethodCode;
diff --git a/src/Sylius/Bundle/ApiBundle/Command/Checkout/CompleteOrder.php b/src/Sylius/Bundle/ApiBundle/Command/Checkout/CompleteOrder.php
index 130463b9536e..825c93b4a2b0 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/Checkout/CompleteOrder.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/Checkout/CompleteOrder.php
@@ -18,14 +18,10 @@
/** @experimental */
class CompleteOrder implements OrderTokenValueAwareInterface
{
- /**
- * @var string|null
- */
+ /** @var string|null */
public $orderTokenValue;
- /**
- * @var string|null
- */
+ /** @var string|null */
public $notes;
public function __construct(?string $notes = null)
diff --git a/src/Sylius/Bundle/ApiBundle/Command/Checkout/ShipShipment.php b/src/Sylius/Bundle/ApiBundle/Command/Checkout/ShipShipment.php
index 1d7f8a6f8d70..0230cfac65ac 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/Checkout/ShipShipment.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/Checkout/ShipShipment.php
@@ -18,14 +18,10 @@
/** @experimental */
class ShipShipment implements ShipmentIdAwareInterface
{
- /**
- * @var int|null
- */
+ /** @var int|null */
public $shipmentId;
- /**
- * @var string|null
- */
+ /** @var string|null */
public $trackingCode;
public function __construct(?string $trackingCode = null)
diff --git a/src/Sylius/Bundle/ApiBundle/Command/RegisterShopUser.php b/src/Sylius/Bundle/ApiBundle/Command/RegisterShopUser.php
index 8448364f5d79..cf2915d33d4a 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/RegisterShopUser.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/RegisterShopUser.php
@@ -20,48 +20,50 @@ class RegisterShopUser implements ChannelCodeAwareInterface, LocaleCodeAwareInte
{
/**
* @psalm-immutable
+ *
* @var string
*/
public $firstName;
/**
* @psalm-immutable
+ *
* @var string
*/
public $lastName;
/**
* @psalm-immutable
+ *
* @var string
*/
public $email;
/**
* @psalm-immutable
+ *
* @var string
*/
public $password;
/**
* @psalm-immutable
+ *
* @var string|null
*/
public $phoneNumber;
/**
* @psalm-immutable
+ *
* @var bool
*/
public $subscribedToNewsletter;
- /**
- * @var string|null
- */
+ /** @var string|null */
public $channelCode;
- /**
- * @var string|null
- */
+ /** @var string|null */
public $localeCode;
public function __construct(
diff --git a/src/Sylius/Bundle/ApiBundle/Command/RequestResetPasswordToken.php b/src/Sylius/Bundle/ApiBundle/Command/RequestResetPasswordToken.php
index 5c973032ea7f..786c3089b1a9 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/RequestResetPasswordToken.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/RequestResetPasswordToken.php
@@ -16,19 +16,13 @@
/** @experimental */
class RequestResetPasswordToken implements ChannelCodeAwareInterface, LocaleCodeAwareInterface
{
- /**
- * @var string
- */
+ /** @var string */
public $email;
- /**
- * @var string|null
- */
+ /** @var string|null */
public $channelCode;
- /**
- * @var string|null
- */
+ /** @var string|null */
public $localeCode;
public function __construct(string $email)
diff --git a/src/Sylius/Bundle/ApiBundle/Command/ResendVerificationEmail.php b/src/Sylius/Bundle/ApiBundle/Command/ResendVerificationEmail.php
index 56e216c832dd..3df221298d91 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/ResendVerificationEmail.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/ResendVerificationEmail.php
@@ -16,19 +16,19 @@
/** @experimental */
class ResendVerificationEmail implements ChannelCodeAwareInterface, LocaleCodeAwareInterface
{
- /**
- * @var string
- */
+ /** @var string */
public $email;
/**
* @psalm-immutable
+ *
* @var string|null
*/
public $channelCode;
/**
* @psalm-immutable
+ *
* @var string|null
*/
public $localeCode;
diff --git a/src/Sylius/Bundle/ApiBundle/Command/ResetPassword.php b/src/Sylius/Bundle/ApiBundle/Command/ResetPassword.php
index 911440a3d925..80ef43629d96 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/ResetPassword.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/ResetPassword.php
@@ -16,19 +16,13 @@
/** @experimental */
class ResetPassword
{
- /**
- * @var string|null
- */
+ /** @var string|null */
public $newPassword;
- /**
- * @var string|null
- */
+ /** @var string|null */
public $confirmNewPassword;
- /**
- * @var string
- */
+ /** @var string */
public $resetPasswordToken;
public function __construct(string $resetPasswordToken)
diff --git a/src/Sylius/Bundle/ApiBundle/Command/SendAccountRegistrationEmail.php b/src/Sylius/Bundle/ApiBundle/Command/SendAccountRegistrationEmail.php
index a6e0ef091caa..3d128fa3f181 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/SendAccountRegistrationEmail.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/SendAccountRegistrationEmail.php
@@ -19,19 +19,13 @@
*/
class SendAccountRegistrationEmail
{
- /**
- * @var string
- */
+ /** @var string */
public $shopUserEmail;
- /**
- * @var string
- */
+ /** @var string */
public $localeCode;
- /**
- * @var string
- */
+ /** @var string */
public $channelCode;
public function __construct(string $shopUserEmail, string $localeCode, string $channelCode)
diff --git a/src/Sylius/Bundle/ApiBundle/Command/SendAccountVerificationEmail.php b/src/Sylius/Bundle/ApiBundle/Command/SendAccountVerificationEmail.php
index b76edd8c0a06..edf3f6037c5f 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/SendAccountVerificationEmail.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/SendAccountVerificationEmail.php
@@ -19,19 +19,13 @@
*/
class SendAccountVerificationEmail
{
- /**
- * @var string
- */
+ /** @var string */
public $shopUserEmail;
- /**
- * @var string
- */
+ /** @var string */
public $localeCode;
- /**
- * @var string
- */
+ /** @var string */
public $channelCode;
public function __construct(string $shopUserEmail, string $localeCode, string $channelCode)
diff --git a/src/Sylius/Bundle/ApiBundle/Command/SendOrderConfirmation.php b/src/Sylius/Bundle/ApiBundle/Command/SendOrderConfirmation.php
index 08d2c8e365f7..09ede58f5950 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/SendOrderConfirmation.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/SendOrderConfirmation.php
@@ -16,9 +16,7 @@
/** @experimental */
class SendOrderConfirmation
{
- /**
- * @var string
- */
+ /** @var string */
public $orderToken;
public function __construct(string $orderToken)
diff --git a/src/Sylius/Bundle/ApiBundle/Command/SendResetPasswordEmail.php b/src/Sylius/Bundle/ApiBundle/Command/SendResetPasswordEmail.php
index 66c4abc3ce09..827a93d44f49 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/SendResetPasswordEmail.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/SendResetPasswordEmail.php
@@ -16,19 +16,13 @@
/** @experimental */
class SendResetPasswordEmail
{
- /**
- * @var string
- */
+ /** @var string */
public $email;
- /**
- * @var string
- */
+ /** @var string */
public $channelCode;
- /**
- * @var string
- */
+ /** @var string */
public $localeCode;
public function __construct(
diff --git a/src/Sylius/Bundle/ApiBundle/Command/VerifyCustomerAccount.php b/src/Sylius/Bundle/ApiBundle/Command/VerifyCustomerAccount.php
index 9dd8ec763590..0b1ca5bd38c0 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/VerifyCustomerAccount.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/VerifyCustomerAccount.php
@@ -19,9 +19,7 @@
*/
class VerifyCustomerAccount
{
- /**
- * @var string
- */
+ /** @var string */
public $token;
public function __construct(string $token)
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/ChoosePaymentMethodHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/ChoosePaymentMethodHandler.php
index 88026e8adcf5..44a22d7e21e0 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/ChoosePaymentMethodHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/ChoosePaymentMethodHandler.php
@@ -82,8 +82,8 @@ public function __invoke(ChoosePaymentMethod $choosePaymentMethod): OrderInterfa
Assert::true(
$stateMachine->can(
- OrderCheckoutTransitions::TRANSITION_SELECT_PAYMENT
- ),
+ OrderCheckoutTransitions::TRANSITION_SELECT_PAYMENT
+ ),
'Order cannot have payment method assigned.'
);
diff --git a/src/Sylius/Bundle/ApiBundle/PropertyInfo/Extractor/ReflectionExtractor.php b/src/Sylius/Bundle/ApiBundle/PropertyInfo/Extractor/ReflectionExtractor.php
index 400fef08a17e..67b829bed3d0 100644
--- a/src/Sylius/Bundle/ApiBundle/PropertyInfo/Extractor/ReflectionExtractor.php
+++ b/src/Sylius/Bundle/ApiBundle/PropertyInfo/Extractor/ReflectionExtractor.php
@@ -101,7 +101,7 @@ public function __construct(array $mutatorPrefixes = null, array $accessorPrefix
}
/**
- * {@inheritdoc}
+ * @inheritdoc
*/
public function getProperties(string $class, array $context = []): ?array
{
@@ -139,7 +139,7 @@ public function getProperties(string $class, array $context = []): ?array
}
/**
- * {@inheritdoc}
+ * @inheritdoc
*/
public function getTypes(string $class, string $property, array $context = []): ?array
{
@@ -178,7 +178,7 @@ public function getTypes(string $class, string $property, array $context = []):
}
/**
- * {@inheritdoc}
+ * @inheritdoc
*/
public function getTypesFromConstructor(string $class, string $property): ?array
{
@@ -216,7 +216,7 @@ private function getReflectionParameterFromConstructor(string $property, \Reflec
}
/**
- * {@inheritdoc}
+ * @inheritdoc
*/
public function isReadable(string $class, string $property, array $context = []): ?bool
{
@@ -228,7 +228,7 @@ public function isReadable(string $class, string $property, array $context = [])
}
/**
- * {@inheritdoc}
+ * @inheritdoc
*/
public function isWritable(string $class, string $property, array $context = []): ?bool
{
@@ -242,7 +242,7 @@ public function isWritable(string $class, string $property, array $context = [])
}
/**
- * {@inheritdoc}
+ * @inheritdoc
*/
public function isInitializable(string $class, string $property, array $context = []): ?bool
{
@@ -270,7 +270,7 @@ public function isInitializable(string $class, string $property, array $context
}
/**
- * {@inheritdoc}
+ * @inheritdoc
*/
public function getReadInfo(string $class, string $property, array $context = []): ?PropertyReadInfo
{
@@ -329,7 +329,7 @@ public function getReadInfo(string $class, string $property, array $context = []
}
/**
- * {@inheritdoc}
+ * @inheritdoc
*/
public function getWriteInfo(string $class, string $property, array $context = []): ?PropertyWriteInfo
{
diff --git a/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendAccountRegistrationEmailHandlerTest.php b/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendAccountRegistrationEmailHandlerTest.php
index e032d92935ac..36b47a4d1965 100644
--- a/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendAccountRegistrationEmailHandlerTest.php
+++ b/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendAccountRegistrationEmailHandlerTest.php
@@ -70,10 +70,10 @@ public function it_sends_account_registration_email(): void
$sendAccountRegistrationEmailHandler(
new SendAccountRegistrationEmail(
- 'user@example.com',
- 'en_US',
- 'CHANNEL_CODE'
- )
+ 'user@example.com',
+ 'en_US',
+ 'CHANNEL_CODE'
+ )
);
self::assertSame(1, $emailChecker->countMessagesTo('user@example.com'));
diff --git a/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendAccountVerificationEmailHandlerTest.php b/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendAccountVerificationEmailHandlerTest.php
index 6674b44f578b..97867058c15e 100644
--- a/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendAccountVerificationEmailHandlerTest.php
+++ b/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendAccountVerificationEmailHandlerTest.php
@@ -70,10 +70,10 @@ public function it_sends_account_verification_token_email(): void
$sendAccountVerificationEmailHandler(
new SendAccountVerificationEmail(
- 'user@example.com',
- 'en_US',
- 'CHANNEL_CODE'
- )
+ 'user@example.com',
+ 'en_US',
+ 'CHANNEL_CODE'
+ )
);
self::assertSame(1, $emailChecker->countMessagesTo('user@example.com'));
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/CartPaymentMethodsSubresourceDataProviderSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/CartPaymentMethodsSubresourceDataProviderSpec.php
index d16194b2e195..5a8aadc7c72a 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/CartPaymentMethodsSubresourceDataProviderSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/CartPaymentMethodsSubresourceDataProviderSpec.php
@@ -59,8 +59,7 @@ function it_supports_only_order_payment_methods_subresource_data_provider_with_i
function it_throws_an_exception_if_cart_does_not_exist(
OrderRepositoryInterface $orderRepository
- ): void
- {
+ ): void {
$context['subresource_identifiers'] = ['tokenValue' => '69', 'payments' => '420'];
$orderRepository->findCartByTokenValue($context['subresource_identifiers']['tokenValue'])->willReturn(null);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/EventSubscriber/KernelRequestEventSubscriberSpec.php b/src/Sylius/Bundle/ApiBundle/spec/EventSubscriber/KernelRequestEventSubscriberSpec.php
index b45ad675b769..02502de71225 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/EventSubscriber/KernelRequestEventSubscriberSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/EventSubscriber/KernelRequestEventSubscriberSpec.php
@@ -14,7 +14,6 @@
namespace spec\Sylius\Bundle\ApiBundle\EventSubscriber;
use PhpSpec\ObjectBehavior;
-
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -63,7 +62,7 @@ function it_throws_not_found_exception_if_api_is_disabled(
$kernel->getWrappedObject(),
$request->getWrappedObject(),
HttpKernelInterface::MASTER_REQUEST
- )
+ ),
]
);
}
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Serializer/CommandDenormalizerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Serializer/CommandDenormalizerSpec.php
index 88ded1f3cdfd..741d96e637e7 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Serializer/CommandDenormalizerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Serializer/CommandDenormalizerSpec.php
@@ -44,7 +44,7 @@ function it_throws_exception_if_not_all_required_parameters_are_present_in_the_c
['email' => 'test@example.com', 'password' => 'pa$$word'],
'',
null,
- ['input' => ['class' => RegisterShopUser::class]]
+ ['input' => ['class' => RegisterShopUser::class]],
]
)
;
@@ -81,7 +81,7 @@ function it_does_not_check_parameters_if_there_is_an_object_to_populate(
null,
[
'input' => ['class' => VerifyCustomerAccount::class],
- 'object_to_populate' => new VerifyCustomerAccount('TOKEN')
+ 'object_to_populate' => new VerifyCustomerAccount('TOKEN'),
]
)
->willReturn(['key' => 'value'])
@@ -94,7 +94,7 @@ function it_does_not_check_parameters_if_there_is_an_object_to_populate(
null,
[
'input' => ['class' => VerifyCustomerAccount::class],
- 'object_to_populate' => new VerifyCustomerAccount('TOKEN')
+ 'object_to_populate' => new VerifyCustomerAccount('TOKEN'),
]
)
->shouldReturn(['key' => 'value'])
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Serializer/CommandNormalizerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Serializer/CommandNormalizerSpec.php
index 075ab75e6224..506fc047f014 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Serializer/CommandNormalizerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Serializer/CommandNormalizerSpec.php
@@ -33,7 +33,12 @@ function it_implements_context_aware_normalizer_interface(): void
function it_supports_normalization_if_data_has_get_class_method_and_it_is_missing_constructor_arguments_exception(): void
{
$this->supportsNormalization(
- new class() { public function getClass(): string { return MissingConstructorArgumentsException::class; }}
+ new class() {
+ public function getClass(): string
+ {
+ return MissingConstructorArgumentsException::class;
+ }
+ }
)->shouldReturn(true);
}
@@ -45,7 +50,12 @@ function it_does_not_support_normalization_if_data_has_no_get_class_method(): vo
function it_does_not_support_normalization_if_data_class_is_not_missing_constructor_arguments_exception(): void
{
$this
- ->supportsNormalization(new class() { public function getClass(): string { return \Exception::class; }})
+ ->supportsNormalization(new class() {
+ public function getClass(): string
+ {
+ return \Exception::class;
+ }
+ })
->shouldReturn(false)
;
}
@@ -54,7 +64,12 @@ function it_does_not_support_normalization_if_normalizer_has_already_been_called
{
$this
->supportsNormalization(
- new class() { public function getClass(): string { return MissingConstructorArgumentsException::class; }},
+ new class() {
+ public function getClass(): string
+ {
+ return MissingConstructorArgumentsException::class;
+ }
+ },
null,
['command_normalizer_already_called' => true]
)
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/AddingEligibleProductVariantToCartValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/AddingEligibleProductVariantToCartValidatorSpec.php
index 564c7a25a05c..747772b96c60 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/AddingEligibleProductVariantToCartValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/AddingEligibleProductVariantToCartValidatorSpec.php
@@ -59,7 +59,7 @@ function it_throws_an_exception_if_constraint_is_not_an_instance_of_adding_eligi
->during('validate', [
new AddItemToCart('productVariantCode', 1),
new class() extends Constraint {
- }
+ },
])
;
}
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ChangedItemQuantityInCartValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ChangedItemQuantityInCartValidatorSpec.php
index a3f9ed2a82c3..c582f20406f7 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ChangedItemQuantityInCartValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ChangedItemQuantityInCartValidatorSpec.php
@@ -59,7 +59,7 @@ function it_throws_an_exception_if_constraint_is_not_an_instance_of_changed_item
->during('validate', [
new ChangeItemQuantityInCart(2),
new class() extends Constraint {
- }
+ },
])
;
}
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/CorrectOrderAddressValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/CorrectOrderAddressValidatorSpec.php
index 6001f141d6c3..acc97a18fb06 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/CorrectOrderAddressValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/CorrectOrderAddressValidatorSpec.php
@@ -53,7 +53,7 @@ function it_throws_an_exception_if_constraint_is_not_an_instance_of_adding_eligi
->during('validate', [
new AddressOrder('john@doe.com', $billingAddress->getWrappedObject(), $shippingAddress->getWrappedObject()),
new class() extends Constraint {
- }
+ },
])
;
}
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/OrderItemAvailabilityValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/OrderItemAvailabilityValidatorSpec.php
index 50434e812904..a9ba98c0a7a5 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/OrderItemAvailabilityValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/OrderItemAvailabilityValidatorSpec.php
@@ -50,7 +50,7 @@ function it_throws_exception_if_constraint_is_not_an_instance_of_order_product_i
->during('validate', [
new CompleteOrder(),
new class() extends Constraint {
- }
+ },
])
;
}
diff --git a/src/Sylius/Bundle/ApiBundle/test/src/Tests/FooApiCommandTest.php b/src/Sylius/Bundle/ApiBundle/test/src/Tests/FooApiCommandTest.php
index bedc4dde11bf..1918faed5611 100644
--- a/src/Sylius/Bundle/ApiBundle/test/src/Tests/FooApiCommandTest.php
+++ b/src/Sylius/Bundle/ApiBundle/test/src/Tests/FooApiCommandTest.php
@@ -39,7 +39,7 @@ public function it_returns_information_about_missing_arguments_for_command(): vo
$this->assertResponseStatusCodeSame(Response::HTTP_BAD_REQUEST);
$this->assertJsonContains([
'code' => Response::HTTP_BAD_REQUEST,
- 'message' => 'Request does not have the following required fields specified: bar.'
+ 'message' => 'Request does not have the following required fields specified: bar.',
]);
}
diff --git a/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeType/Configuration/SelectAttributeValueTranslationsType.php b/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeType/Configuration/SelectAttributeValueTranslationsType.php
index 6158c5f32b60..46dc538d7756 100644
--- a/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeType/Configuration/SelectAttributeValueTranslationsType.php
+++ b/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeType/Configuration/SelectAttributeValueTranslationsType.php
@@ -35,8 +35,8 @@ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'entries' => $this->definedLocalesCodes,
- 'entry_name' => fn(string $localeCode): string => $localeCode,
- 'entry_options' => fn(string $localeCode): array => [
+ 'entry_name' => fn (string $localeCode): string => $localeCode,
+ 'entry_options' => fn (string $localeCode): array => [
'required' => $localeCode === $this->defaultLocaleCode,
],
]);
diff --git a/src/Sylius/Bundle/AttributeBundle/Tests/Form/Type/AttributeType/SelectAttributeTypeTest.php b/src/Sylius/Bundle/AttributeBundle/Tests/Form/Type/AttributeType/SelectAttributeTypeTest.php
index 8b76b04d6881..77b6f787fa73 100644
--- a/src/Sylius/Bundle/AttributeBundle/Tests/Form/Type/AttributeType/SelectAttributeTypeTest.php
+++ b/src/Sylius/Bundle/AttributeBundle/Tests/Form/Type/AttributeType/SelectAttributeTypeTest.php
@@ -13,10 +13,9 @@
namespace Sylius\Bundle\AttributeBundle\Tests\Form\Type\AttributeType;
+use PHPUnit\Framework\Assert;
use Prophecy\Prophecy\ObjectProphecy;
use Sylius\Bundle\AttributeBundle\Form\Type\AttributeType\SelectAttributeType;
-use PHPUnit\Framework\Assert;
-use Prophecy\Prophecy\ProphecyInterface;
use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface;
use Symfony\Component\Form\ChoiceList\View\ChoiceView;
use Symfony\Component\Form\PreloadedExtension;
@@ -68,6 +67,6 @@ private function assertChoicesLabels(array $expectedLabels, array $formConfigura
);
$view = $form->createView();
- Assert::assertSame($expectedLabels, array_map(fn(ChoiceView $choiceView): string => $choiceView->label, $view->vars['choices']));
+ Assert::assertSame($expectedLabels, array_map(fn (ChoiceView $choiceView): string => $choiceView->label, $view->vars['choices']));
}
}
diff --git a/src/Sylius/Bundle/AttributeBundle/test/src/Tests/SyliusAttributeBundleTest.php b/src/Sylius/Bundle/AttributeBundle/test/src/Tests/SyliusAttributeBundleTest.php
index cbd1f9a1164e..bded96693e78 100644
--- a/src/Sylius/Bundle/AttributeBundle/test/src/Tests/SyliusAttributeBundleTest.php
+++ b/src/Sylius/Bundle/AttributeBundle/test/src/Tests/SyliusAttributeBundleTest.php
@@ -30,7 +30,7 @@ public function its_services_are_initializable(): void
$services = $container->getServiceIds();
- $services = array_filter($services, fn(string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
+ $services = array_filter($services, fn (string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
foreach ($services as $id) {
Assert::assertNotNull($container->get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE));
diff --git a/src/Sylius/Bundle/ChannelBundle/Form/Type/ChannelChoiceType.php b/src/Sylius/Bundle/ChannelBundle/Form/Type/ChannelChoiceType.php
index 58355f1b4100..7d4338b87c61 100644
--- a/src/Sylius/Bundle/ChannelBundle/Form/Type/ChannelChoiceType.php
+++ b/src/Sylius/Bundle/ChannelBundle/Form/Type/ChannelChoiceType.php
@@ -40,7 +40,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
- 'choices' => fn(Options $options): array => $this->channelRepository->findAll(),
+ 'choices' => fn (Options $options): array => $this->channelRepository->findAll(),
'choice_value' => 'code',
'choice_label' => 'name',
'choice_translation_domain' => false,
diff --git a/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelPersisterSpec.php b/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelPersisterSpec.php
index 8c205540d539..6aef9915eb95 100644
--- a/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelPersisterSpec.php
+++ b/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelPersisterSpec.php
@@ -67,7 +67,7 @@ function it_persists_fake_channel_codes_in_a_cookie(
$response->headers = $responseHeaderBag;
$responseHeaderBag
- ->setCookie(Argument::that(static fn(Cookie $cookie): bool => $cookie->getName() === '_channel_code' && $cookie->getValue() === 'fake_channel_code'))
+ ->setCookie(Argument::that(static fn (Cookie $cookie): bool => $cookie->getName() === '_channel_code' && $cookie->getValue() === 'fake_channel_code'))
->shouldBeCalled()
;
diff --git a/src/Sylius/Bundle/ChannelBundle/test/src/Tests/SyliusChannelBundleTest.php b/src/Sylius/Bundle/ChannelBundle/test/src/Tests/SyliusChannelBundleTest.php
index 400b5571b9bf..e96e08df2aeb 100644
--- a/src/Sylius/Bundle/ChannelBundle/test/src/Tests/SyliusChannelBundleTest.php
+++ b/src/Sylius/Bundle/ChannelBundle/test/src/Tests/SyliusChannelBundleTest.php
@@ -30,7 +30,7 @@ public function its_services_are_initializable(): void
$services = $container->getServiceIds();
- $services = array_filter($services, fn(string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
+ $services = array_filter($services, fn (string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
foreach ($services as $id) {
Assert::assertNotNull($container->get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE));
diff --git a/src/Sylius/Bundle/CoreBundle/Application/SyliusPluginTrait.php b/src/Sylius/Bundle/CoreBundle/Application/SyliusPluginTrait.php
index a09bb040c9c2..e6424e4e125a 100644
--- a/src/Sylius/Bundle/CoreBundle/Application/SyliusPluginTrait.php
+++ b/src/Sylius/Bundle/CoreBundle/Application/SyliusPluginTrait.php
@@ -13,9 +13,9 @@
namespace Sylius\Bundle\CoreBundle\Application;
-use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
+use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* @mixin Bundle
diff --git a/src/Sylius/Bundle/CoreBundle/Command/AbstractInstallCommand.php b/src/Sylius/Bundle/CoreBundle/Command/AbstractInstallCommand.php
index c36c5e45e6ff..2440d387d860 100644
--- a/src/Sylius/Bundle/CoreBundle/Command/AbstractInstallCommand.php
+++ b/src/Sylius/Bundle/CoreBundle/Command/AbstractInstallCommand.php
@@ -37,7 +37,7 @@ abstract class AbstractInstallCommand extends ContainerAwareCommand
public const WEB_MEDIA_IMAGE_DIRECTORY = 'web/media/image/';
/** @var CommandExecutor|null */
- protected $commandExecutor = null;
+ protected $commandExecutor;
protected function initialize(InputInterface $input, OutputInterface $output)
{
diff --git a/src/Sylius/Bundle/CoreBundle/Command/CancelUnpaidOrdersCommand.php b/src/Sylius/Bundle/CoreBundle/Command/CancelUnpaidOrdersCommand.php
index 7cf79b25818a..f914c8a6faeb 100644
--- a/src/Sylius/Bundle/CoreBundle/Command/CancelUnpaidOrdersCommand.php
+++ b/src/Sylius/Bundle/CoreBundle/Command/CancelUnpaidOrdersCommand.php
@@ -45,7 +45,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$this->getContainer()->get('sylius.manager.order')->flush();
- $output->writeln("Unpaid orders have been canceled");
+ $output->writeln('Unpaid orders have been canceled');
return 0;
}
diff --git a/src/Sylius/Bundle/CoreBundle/Controller/ProductTaxonController.php b/src/Sylius/Bundle/CoreBundle/Controller/ProductTaxonController.php
index 5de2e5ae8178..709457c1e53e 100644
--- a/src/Sylius/Bundle/CoreBundle/Controller/ProductTaxonController.php
+++ b/src/Sylius/Bundle/CoreBundle/Controller/ProductTaxonController.php
@@ -37,7 +37,7 @@ public function updatePositionsAction(Request $request): Response
{
$configuration = $this->requestConfigurationFactory->create($this->metadata, $request);
$this->isGrantedOr403($configuration, ResourceActions::UPDATE);
- $productTaxons = $this->getParameterFromRequest($request,'productTaxons');
+ $productTaxons = $this->getParameterFromRequest($request, 'productTaxons');
$this->validateCsrfProtection($request, $configuration);
if ($this->shouldProductsPositionsBeUpdated($request, $productTaxons)) {
@@ -63,7 +63,7 @@ public function updateProductTaxonsPositionsAction(Request $request): Response
{
$configuration = $this->requestConfigurationFactory->create($this->metadata, $request);
$this->isGrantedOr403($configuration, ResourceActions::UPDATE);
- $productTaxons = $this->getParameterFromRequest($request,'productTaxons');
+ $productTaxons = $this->getParameterFromRequest($request, 'productTaxons');
$this->validateCsrfProtection($request, $configuration);
diff --git a/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/RegisterUriBasedSectionResolverPass.php b/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/RegisterUriBasedSectionResolverPass.php
index 74f5335ba17c..7c84ea503257 100644
--- a/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/RegisterUriBasedSectionResolverPass.php
+++ b/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/RegisterUriBasedSectionResolverPass.php
@@ -20,7 +20,7 @@
final class RegisterUriBasedSectionResolverPass implements CompilerPassInterface
{
/**
- * {@inheritdoc}
+ * @inheritdoc
*/
public function process(ContainerBuilder $container): void
{
@@ -37,7 +37,7 @@ public function process(ContainerBuilder $container): void
}
}
- usort($uriBasedSectionProviders, static fn(array $a, array $b): int => -($a['priority'] <=> $b['priority']));
+ usort($uriBasedSectionProviders, static fn (array $a, array $b): int => -($a['priority'] <=> $b['priority']));
$uriBasedSectionResolver->setArgument(1, array_column($uriBasedSectionProviders, 'id'));
}
diff --git a/src/Sylius/Bundle/CoreBundle/Doctrine/DQL/DateFormat.php b/src/Sylius/Bundle/CoreBundle/Doctrine/DQL/DateFormat.php
index d2bc0b182e7a..7000481ae2bc 100644
--- a/src/Sylius/Bundle/CoreBundle/Doctrine/DQL/DateFormat.php
+++ b/src/Sylius/Bundle/CoreBundle/Doctrine/DQL/DateFormat.php
@@ -13,9 +13,9 @@
namespace Sylius\Bundle\CoreBundle\Doctrine\DQL;
-use Doctrine\ORM\Query\AST\Node;
use Doctrine\ORM\Query\AST\ArithmeticExpression;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
+use Doctrine\ORM\Query\AST\Node;
use Doctrine\ORM\Query\Lexer;
use Doctrine\ORM\Query\Parser;
use Doctrine\ORM\Query\SqlWalker;
diff --git a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/AttributeRepository.php b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/AttributeRepository.php
index 8afe3303c962..087e37b332b4 100644
--- a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/AttributeRepository.php
+++ b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/AttributeRepository.php
@@ -13,9 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Doctrine\ORM;
-use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\EntityManager;
-use Doctrine\ORM\Mapping;
+use Doctrine\ORM\Mapping\ClassMetadata;
use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository;
use SyliusLabs\AssociationHydrator\AssociationHydrator;
diff --git a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/OrderRepository.php b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/OrderRepository.php
index 41a13e22c036..d814132e28b7 100644
--- a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/OrderRepository.php
+++ b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/OrderRepository.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Doctrine\ORM;
-use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\EntityManager;
+use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\QueryBuilder;
use Sylius\Bundle\OrderBundle\Doctrine\ORM\OrderRepository as BaseOrderRepository;
use Sylius\Component\Core\Model\ChannelInterface;
diff --git a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/ProductOptionRepository.php b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/ProductOptionRepository.php
index 9bdf626fca6e..fec3c3312b4b 100644
--- a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/ProductOptionRepository.php
+++ b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/ProductOptionRepository.php
@@ -13,9 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Doctrine\ORM;
-use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\EntityManager;
-use Doctrine\ORM\Mapping;
+use Doctrine\ORM\Mapping\ClassMetadata;
use Sylius\Bundle\ProductBundle\Doctrine\ORM\ProductOptionRepository as BaseProductOptionRepository;
use SyliusLabs\AssociationHydrator\AssociationHydrator;
diff --git a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/PromotionRepository.php b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/PromotionRepository.php
index 2ab1d483a34e..f3cf80881480 100644
--- a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/PromotionRepository.php
+++ b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/PromotionRepository.php
@@ -13,9 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Doctrine\ORM;
-use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\EntityManager;
-use Doctrine\ORM\Mapping;
+use Doctrine\ORM\Mapping\ClassMetadata;
use Sylius\Bundle\PromotionBundle\Doctrine\ORM\PromotionRepository as BasePromotionRepository;
use Sylius\Component\Channel\Model\ChannelInterface;
use Sylius\Component\Core\Repository\PromotionRepositoryInterface;
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/BookProductFixture.php b/src/Sylius/Bundle/CoreBundle/Fixture/BookProductFixture.php
index f284bb63df5c..d71af2491f1c 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/BookProductFixture.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/BookProductFixture.php
@@ -15,8 +15,8 @@
@trigger_error('The "BookProductFixture" class is deprecated since Sylius 1.5 Use new product fixtures class located at "src/Sylius/Bundle/CoreBundle/Fixture/" instead.', \E_USER_DEPRECATED);
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
use Sylius\Bundle\FixturesBundle\Fixture\AbstractFixture;
use Sylius\Component\Attribute\AttributeType\IntegerAttributeType;
use Sylius\Component\Attribute\AttributeType\SelectAttributeType;
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AddressExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AddressExampleFactory.php
index 6077004f97a8..6d9cbe1fe576 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AddressExampleFactory.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AddressExampleFactory.php
@@ -13,9 +13,9 @@
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
-use Faker\Generator;
-use Faker\Factory;
use Doctrine\Common\Collections\Collection;
+use Faker\Factory;
+use Faker\Generator;
use Sylius\Bundle\CoreBundle\Fixture\OptionsResolver\LazyOption;
use Sylius\Component\Addressing\Model\CountryInterface;
use Sylius\Component\Addressing\Model\ProvinceInterface;
@@ -57,13 +57,13 @@ public function __construct(
protected function configureOptions(OptionsResolver $resolver): void
{
$resolver
- ->setDefault('first_name', fn(Options $options): string => $this->faker->firstName)
- ->setDefault('last_name', fn(Options $options): string => $this->faker->lastName)
- ->setDefault('phone_number', fn(Options $options): ?string => random_int(1, 100) > 50 ? $this->faker->phoneNumber : null)
- ->setDefault('company', fn(Options $options): ?string => random_int(1, 100) > 50 ? $this->faker->company : null)
- ->setDefault('street', fn(Options $options): string => $this->faker->streetAddress)
- ->setDefault('city', fn(Options $options): string => $this->faker->city)
- ->setDefault('postcode', fn(Options $options): string => $this->faker->postcode)
+ ->setDefault('first_name', fn (Options $options): string => $this->faker->firstName)
+ ->setDefault('last_name', fn (Options $options): string => $this->faker->lastName)
+ ->setDefault('phone_number', fn (Options $options): ?string => random_int(1, 100) > 50 ? $this->faker->phoneNumber : null)
+ ->setDefault('company', fn (Options $options): ?string => random_int(1, 100) > 50 ? $this->faker->company : null)
+ ->setDefault('street', fn (Options $options): string => $this->faker->streetAddress)
+ ->setDefault('city', fn (Options $options): string => $this->faker->city)
+ ->setDefault('postcode', fn (Options $options): string => $this->faker->postcode)
->setDefault('country_code', function (Options $options): string {
$countries = $this->countryRepository->findAll();
shuffle($countries);
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AdminUserExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AdminUserExampleFactory.php
index 068c7cda0532..d6c0104bbd95 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AdminUserExampleFactory.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AdminUserExampleFactory.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
use Sylius\Component\Core\Model\AdminUserInterface;
use Sylius\Component\Core\Model\AvatarImage;
use Sylius\Component\Core\Uploader\ImageUploaderInterface;
@@ -101,8 +101,8 @@ public function create(array $options = []): AdminUserInterface
protected function configureOptions(OptionsResolver $resolver): void
{
$resolver
- ->setDefault('email', fn(Options $options): string => $this->faker->email)
- ->setDefault('username', fn(Options $options): string => $this->faker->firstName . ' ' . $this->faker->lastName)
+ ->setDefault('email', fn (Options $options): string => $this->faker->email)
+ ->setDefault('username', fn (Options $options): string => $this->faker->firstName . ' ' . $this->faker->lastName)
->setDefault('enabled', true)
->setAllowedTypes('enabled', 'bool')
->setDefault('password', 'password123')
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ChannelExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ChannelExampleFactory.php
index ebb23eec7310..cd118ace57a8 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ChannelExampleFactory.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ChannelExampleFactory.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
use Sylius\Bundle\CoreBundle\Fixture\OptionsResolver\LazyOption;
use Sylius\Component\Addressing\Model\Scope as AddressingScope;
use Sylius\Component\Addressing\Model\ZoneInterface;
@@ -136,10 +136,10 @@ protected function configureOptions(OptionsResolver $resolver): void
return $words;
})
- ->setDefault('code', fn(Options $options): string => StringInflector::nameToCode($options['name']))
- ->setDefault('hostname', fn(Options $options): string => $options['code'] . '.localhost')
- ->setDefault('color', fn(Options $options): string => $this->faker->colorName)
- ->setDefault('enabled', fn(Options $options): bool => $this->faker->boolean(90))
+ ->setDefault('code', fn (Options $options): string => StringInflector::nameToCode($options['name']))
+ ->setDefault('hostname', fn (Options $options): string => $options['code'] . '.localhost')
+ ->setDefault('color', fn (Options $options): string => $this->faker->colorName)
+ ->setDefault('enabled', fn (Options $options): bool => $this->faker->boolean(90))
->setAllowedTypes('enabled', 'bool')
->setDefault('skipping_shipping_step_allowed', false)
->setAllowedTypes('skipping_shipping_step_allowed', 'bool')
@@ -158,13 +158,13 @@ protected function configureOptions(OptionsResolver $resolver): void
)
->setDefault('tax_calculation_strategy', 'order_items_based')
->setAllowedTypes('tax_calculation_strategy', 'string')
- ->setDefault('default_locale', fn(Options $options): LocaleInterface => $this->faker->randomElement($options['locales']))
+ ->setDefault('default_locale', fn (Options $options): LocaleInterface => $this->faker->randomElement($options['locales']))
->setAllowedTypes('default_locale', ['string', LocaleInterface::class])
->setNormalizer('default_locale', LazyOption::getOneBy($this->localeRepository, 'code'))
->setDefault('locales', LazyOption::all($this->localeRepository))
->setAllowedTypes('locales', 'array')
->setNormalizer('locales', LazyOption::findBy($this->localeRepository, 'code'))
- ->setDefault('base_currency', fn(Options $options): CurrencyInterface => $this->faker->randomElement($options['currencies']))
+ ->setDefault('base_currency', fn (Options $options): CurrencyInterface => $this->faker->randomElement($options['currencies']))
->setAllowedTypes('base_currency', ['string', CurrencyInterface::class])
->setNormalizer('base_currency', LazyOption::getOneBy($this->currencyRepository, 'code'))
->setDefault('currencies', LazyOption::all($this->currencyRepository))
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CustomerGroupExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CustomerGroupExampleFactory.php
index 6f43f3b2b481..ef94b7368abf 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CustomerGroupExampleFactory.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CustomerGroupExampleFactory.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
use Sylius\Component\Core\Formatter\StringInflector;
use Sylius\Component\Customer\Model\CustomerGroupInterface;
use Sylius\Component\Resource\Factory\FactoryInterface;
@@ -60,7 +60,7 @@ protected function configureOptions(OptionsResolver $resolver): void
return $words;
})
- ->setDefault('code', fn(Options $options): string => StringInflector::nameToCode($options['name']))
+ ->setDefault('code', fn (Options $options): string => StringInflector::nameToCode($options['name']))
;
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/OrderExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/OrderExampleFactory.php
index 69a22036f20e..43ea642fb8ec 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/OrderExampleFactory.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/OrderExampleFactory.php
@@ -13,9 +13,9 @@
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
-use Faker\Generator;
-use Faker\Factory;
use Doctrine\Persistence\ObjectManager;
+use Faker\Factory;
+use Faker\Generator;
use SM\Factory\FactoryInterface as StateMachineFactoryInterface;
use Sylius\Bundle\CoreBundle\Fixture\OptionsResolver\LazyOption;
use Sylius\Component\Addressing\Model\CountryInterface;
@@ -157,7 +157,7 @@ protected function configureOptions(OptionsResolver $resolver): void
->setAllowedTypes('country', ['null', 'string', CountryInterface::class])
->setNormalizer('country', LazyOption::findOneBy($this->countryRepository, 'code'))
- ->setDefault('complete_date', fn(Options $options): \DateTimeInterface => $this->faker->dateTimeBetween('-1 years', 'now'))
+ ->setDefault('complete_date', fn (Options $options): \DateTimeInterface => $this->faker->dateTimeBetween('-1 years', 'now'))
->setAllowedTypes('complete_date', ['null', \DateTime::class])
->setDefault('fulfilled', false)
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PaymentMethodExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PaymentMethodExampleFactory.php
index 0640d779323f..251ccb75d9b9 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PaymentMethodExampleFactory.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PaymentMethodExampleFactory.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
use Sylius\Bundle\CoreBundle\Fixture\OptionsResolver\LazyOption;
use Sylius\Component\Channel\Repository\ChannelRepositoryInterface;
use Sylius\Component\Core\Factory\PaymentMethodFactoryInterface;
@@ -91,14 +91,14 @@ protected function configureOptions(OptionsResolver $resolver): void
return $words;
})
- ->setDefault('code', fn(Options $options): string => StringInflector::nameToCode($options['name']))
- ->setDefault('description', fn(Options $options): string => $this->faker->sentence())
+ ->setDefault('code', fn (Options $options): string => StringInflector::nameToCode($options['name']))
+ ->setDefault('description', fn (Options $options): string => $this->faker->sentence())
->setDefault('instructions', null)
->setAllowedTypes('instructions', ['null', 'string'])
->setDefault('gatewayName', 'Offline')
->setDefault('gatewayFactory', 'offline')
->setDefault('gatewayConfig', [])
- ->setDefault('enabled', fn(Options $options): bool => $this->faker->boolean(90))
+ ->setDefault('enabled', fn (Options $options): bool => $this->faker->boolean(90))
->setDefault('channels', LazyOption::all($this->channelRepository))
->setAllowedTypes('channels', 'array')
->setNormalizer('channels', LazyOption::findBy($this->channelRepository, 'code'))
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationTypeExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationTypeExampleFactory.php
index fe7abb5868a1..fe76ac6c65ca 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationTypeExampleFactory.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationTypeExampleFactory.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
use Sylius\Component\Core\Formatter\StringInflector;
use Sylius\Component\Locale\Model\LocaleInterface;
use Sylius\Component\Product\Model\ProductAssociationTypeInterface;
@@ -73,7 +73,7 @@ protected function configureOptions(OptionsResolver $resolver): void
return $words;
})
- ->setDefault('code', fn(Options $options): string => StringInflector::nameToCode($options['name']))
+ ->setDefault('code', fn (Options $options): string => StringInflector::nameToCode($options['name']))
;
}
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAttributeExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAttributeExampleFactory.php
index 8073ce3dca8b..b2ada22ae4f8 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAttributeExampleFactory.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAttributeExampleFactory.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
use Sylius\Component\Attribute\Factory\AttributeFactoryInterface;
use Sylius\Component\Core\Formatter\StringInflector;
use Sylius\Component\Locale\Model\LocaleInterface;
@@ -81,9 +81,9 @@ protected function configureOptions(OptionsResolver $resolver): void
return $words;
})
->setDefault('translatable', true)
- ->setDefault('code', fn(Options $options): string => StringInflector::nameToCode($options['name']))
- ->setDefault('type', fn(Options $options): string => $this->faker->randomElement(array_keys($this->attributeTypes)))
- ->setDefault('configuration', fn(Options $options): array => [])
+ ->setDefault('code', fn (Options $options): string => StringInflector::nameToCode($options['name']))
+ ->setDefault('type', fn (Options $options): string => $this->faker->randomElement(array_keys($this->attributeTypes)))
+ ->setDefault('configuration', fn (Options $options): array => [])
->setAllowedValues('type', array_keys($this->attributeTypes))
;
}
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductExampleFactory.php
index 2cfadf799db0..595faf35d9e5 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductExampleFactory.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductExampleFactory.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
use Sylius\Bundle\CoreBundle\Fixture\OptionsResolver\LazyOption;
use Sylius\Component\Attribute\AttributeType\SelectAttributeType;
use Sylius\Component\Core\Formatter\StringInflector;
@@ -155,7 +155,7 @@ protected function configureOptions(OptionsResolver $resolver): void
return $words;
})
- ->setDefault('code', fn(Options $options): string => StringInflector::nameToCode($options['name']))
+ ->setDefault('code', fn (Options $options): string => StringInflector::nameToCode($options['name']))
->setDefault('enabled', true)
->setAllowedTypes('enabled', 'bool')
@@ -163,9 +163,9 @@ protected function configureOptions(OptionsResolver $resolver): void
->setDefault('tracked', false)
->setAllowedTypes('tracked', 'bool')
- ->setDefault('slug', fn(Options $options): string => $this->slugGenerator->generate($options['name']))
+ ->setDefault('slug', fn (Options $options): string => $this->slugGenerator->generate($options['name']))
- ->setDefault('short_description', fn(Options $options): string => $this->faker->paragraph)
+ ->setDefault('short_description', fn (Options $options): string => $this->faker->paragraph)
->setDefault('description', function (Options $options): string {
/** @var string $paragraphs */
@@ -191,7 +191,7 @@ protected function configureOptions(OptionsResolver $resolver): void
->setDefault('product_attributes', [])
->setAllowedTypes('product_attributes', 'array')
- ->setNormalizer('product_attributes', fn(Options $options, array $productAttributes): array => $this->setAttributeValues($productAttributes))
+ ->setNormalizer('product_attributes', fn (Options $options, array $productAttributes): array => $this->setAttributeValues($productAttributes))
->setDefault('product_options', [])
->setAllowedTypes('product_options', 'array')
@@ -409,7 +409,7 @@ private function generateProductVariantName(ProductVariantInterface $variant): s
{
return trim(array_reduce(
$variant->getOptionValues()->toArray(),
- static fn(?string $variantName, ProductOptionValueInterface $variantOption) => $variantName . sprintf('%s ', $variantOption->getValue()),
+ static fn (?string $variantName, ProductOptionValueInterface $variantOption) => $variantName . sprintf('%s ', $variantOption->getValue()),
''
));
}
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductOptionExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductOptionExampleFactory.php
index b7b991acf238..23ce5355d3dd 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductOptionExampleFactory.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductOptionExampleFactory.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
use Sylius\Component\Core\Formatter\StringInflector;
use Sylius\Component\Locale\Model\LocaleInterface;
use Sylius\Component\Product\Model\ProductOptionInterface;
@@ -93,7 +93,7 @@ protected function configureOptions(OptionsResolver $resolver): void
return $words;
})
- ->setDefault('code', fn(Options $options): string => StringInflector::nameToCode($options['name']))
+ ->setDefault('code', fn (Options $options): string => StringInflector::nameToCode($options['name']))
->setDefault('values', null)
->setDefault('values', function (Options $options, ?array $values): array {
if (is_array($values)) {
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductReviewExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductReviewExampleFactory.php
index 03539aedf67e..3fa34bb9dea1 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductReviewExampleFactory.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductReviewExampleFactory.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
use SM\Factory\FactoryInterface;
use Sylius\Bundle\CoreBundle\Fixture\OptionsResolver\LazyOption;
use Sylius\Component\Core\Repository\CustomerRepositoryInterface;
@@ -84,7 +84,7 @@ protected function configureOptions(OptionsResolver $resolver): void
return $words;
})
- ->setDefault('rating', fn(Options $options): int => $this->faker->numberBetween(1, 5))
+ ->setDefault('rating', fn (Options $options): int => $this->faker->numberBetween(1, 5))
->setDefault('comment', function (Options $options): string {
/** @var string $sentences */
$sentences = $this->faker->sentences(3, true);
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionActionExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionActionExampleFactory.php
index cf05846287f1..e7ea434ac612 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionActionExampleFactory.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionActionExampleFactory.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
use Sylius\Component\Core\Factory\PromotionActionFactoryInterface;
use Sylius\Component\Core\Promotion\Action\PercentageDiscountPromotionActionCommand;
use Sylius\Component\Promotion\Model\PromotionActionInterface;
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionExampleFactory.php
index a29643db902a..142a81a61029 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionExampleFactory.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionExampleFactory.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
use Sylius\Bundle\CoreBundle\Fixture\OptionsResolver\LazyOption;
use Sylius\Component\Channel\Repository\ChannelRepositoryInterface;
use Sylius\Component\Core\Formatter\StringInflector;
@@ -114,7 +114,7 @@ public function create(array $options = []): PromotionInterface
protected function configureOptions(OptionsResolver $resolver): void
{
$resolver
- ->setDefault('code', fn(Options $options): string => StringInflector::nameToCode($options['name']))
+ ->setDefault('code', fn (Options $options): string => StringInflector::nameToCode($options['name']))
->setDefault('name', $this->faker->words(3, true))
->setDefault('description', $this->faker->sentence())
->setDefault('usage_limit', null)
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionRuleExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionRuleExampleFactory.php
index b53e7d87bcc6..e0280f734e78 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionRuleExampleFactory.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionRuleExampleFactory.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
use Sylius\Component\Core\Factory\PromotionRuleFactoryInterface;
use Sylius\Component\Promotion\Checker\Rule\CartQuantityRuleChecker;
use Sylius\Component\Promotion\Model\PromotionRuleInterface;
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingCategoryExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingCategoryExampleFactory.php
index 4265e6a6c2cb..b799d370bcb4 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingCategoryExampleFactory.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingCategoryExampleFactory.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
use Sylius\Component\Core\Formatter\StringInflector;
use Sylius\Component\Resource\Factory\FactoryInterface;
use Sylius\Component\Shipping\Model\ShippingCategoryInterface;
@@ -62,8 +62,8 @@ protected function configureOptions(OptionsResolver $resolver): void
return $words;
})
- ->setDefault('code', fn(Options $options): string => StringInflector::nameToCode($options['name']))
- ->setDefault('description', fn(Options $options): string => $this->faker->paragraph)
+ ->setDefault('code', fn (Options $options): string => StringInflector::nameToCode($options['name']))
+ ->setDefault('description', fn (Options $options): string => $this->faker->paragraph)
;
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingMethodExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingMethodExampleFactory.php
index 9875590cd5c9..f17cb6e8ef99 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingMethodExampleFactory.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingMethodExampleFactory.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
use Sylius\Bundle\CoreBundle\Fixture\OptionsResolver\LazyOption;
use Sylius\Component\Addressing\Model\ZoneInterface;
use Sylius\Component\Channel\Repository\ChannelRepositoryInterface;
@@ -111,15 +111,15 @@ public function create(array $options = []): ShippingMethodInterface
protected function configureOptions(OptionsResolver $resolver): void
{
$resolver
- ->setDefault('code', fn(Options $options): string => StringInflector::nameToCode($options['name']))
+ ->setDefault('code', fn (Options $options): string => StringInflector::nameToCode($options['name']))
->setDefault('name', function (Options $options): string {
/** @var string $words */
$words = $this->faker->words(3, true);
return $words;
})
- ->setDefault('description', fn(Options $options): string => $this->faker->sentence())
- ->setDefault('enabled', fn(Options $options): bool => $this->faker->boolean(90))
+ ->setDefault('description', fn (Options $options): string => $this->faker->sentence())
+ ->setDefault('enabled', fn (Options $options): bool => $this->faker->boolean(90))
->setAllowedTypes('enabled', 'bool')
->setDefault('zone', LazyOption::randomOne($this->zoneRepository))
->setAllowedTypes('zone', ['null', 'string', ZoneInterface::class])
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShopUserExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShopUserExampleFactory.php
index 331e58a599f7..3a93dda0b34a 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShopUserExampleFactory.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShopUserExampleFactory.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
use Sylius\Bundle\CoreBundle\Fixture\OptionsResolver\LazyOption;
use Sylius\Component\Core\Model\CustomerInterface;
use Sylius\Component\Core\Model\ShopUserInterface;
@@ -79,9 +79,9 @@ public function create(array $options = []): ShopUserInterface
protected function configureOptions(OptionsResolver $resolver): void
{
$resolver
- ->setDefault('email', fn(Options $options): string => $this->faker->email)
- ->setDefault('first_name', fn(Options $options): string => $this->faker->firstName)
- ->setDefault('last_name', fn(Options $options): string => $this->faker->lastName)
+ ->setDefault('email', fn (Options $options): string => $this->faker->email)
+ ->setDefault('first_name', fn (Options $options): string => $this->faker->firstName)
+ ->setDefault('last_name', fn (Options $options): string => $this->faker->lastName)
->setDefault('enabled', true)
->setAllowedTypes('enabled', 'bool')
->setDefault('password', 'password123')
@@ -93,8 +93,8 @@ protected function configureOptions(OptionsResolver $resolver): void
'gender',
[CustomerComponent::UNKNOWN_GENDER, CustomerComponent::MALE_GENDER, CustomerComponent::FEMALE_GENDER]
)
- ->setDefault('phone_number', fn(Options $options): string => $this->faker->phoneNumber)
- ->setDefault('birthday', fn(Options $options): \DateTime => $this->faker->dateTimeThisCentury())
+ ->setDefault('phone_number', fn (Options $options): string => $this->faker->phoneNumber)
+ ->setDefault('birthday', fn (Options $options): \DateTime => $this->faker->dateTimeThisCentury())
->setAllowedTypes('birthday', ['null', 'string', \DateTimeInterface::class])
->setNormalizer(
'birthday',
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxCategoryExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxCategoryExampleFactory.php
index 866a54ad0740..0426dbe448d0 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxCategoryExampleFactory.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxCategoryExampleFactory.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
use Sylius\Component\Core\Formatter\StringInflector;
use Sylius\Component\Resource\Factory\FactoryInterface;
use Sylius\Component\Taxation\Model\TaxCategoryInterface;
@@ -62,8 +62,8 @@ protected function configureOptions(OptionsResolver $resolver): void
return $words;
})
- ->setDefault('code', fn(Options $options): string => StringInflector::nameToCode($options['name']))
- ->setDefault('description', fn(Options $options): string => $this->faker->paragraph)
+ ->setDefault('code', fn (Options $options): string => StringInflector::nameToCode($options['name']))
+ ->setDefault('description', fn (Options $options): string => $this->faker->paragraph)
;
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxRateExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxRateExampleFactory.php
index 7715f36c8f8d..6711ad9bae7e 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxRateExampleFactory.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxRateExampleFactory.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
use Sylius\Bundle\CoreBundle\Fixture\OptionsResolver\LazyOption;
use Sylius\Component\Addressing\Model\ZoneInterface;
use Sylius\Component\Core\Formatter\StringInflector;
@@ -73,16 +73,16 @@ public function create(array $options = []): TaxRateInterface
protected function configureOptions(OptionsResolver $resolver): void
{
$resolver
- ->setDefault('code', fn(Options $options): string => StringInflector::nameToCode($options['name']))
+ ->setDefault('code', fn (Options $options): string => StringInflector::nameToCode($options['name']))
->setDefault('name', function (Options $options): string {
/** @var string $words */
$words = $this->faker->words(3, true);
return $words;
})
- ->setDefault('amount', fn(Options $options): float => $this->faker->randomFloat(2, 0, 0.4))
+ ->setDefault('amount', fn (Options $options): float => $this->faker->randomFloat(2, 0, 0.4))
->setAllowedTypes('amount', 'float')
- ->setDefault('included_in_price', fn(Options $options): bool => $this->faker->boolean())
+ ->setDefault('included_in_price', fn (Options $options): bool => $this->faker->boolean())
->setAllowedTypes('included_in_price', 'bool')
->setDefault('calculator', 'default')
->setDefault('zone', LazyOption::randomOne($this->zoneRepository))
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxonExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxonExampleFactory.php
index ec3d7970c804..e8c8b14d208d 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxonExampleFactory.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxonExampleFactory.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Fixture\Factory;
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
use Sylius\Component\Core\Formatter\StringInflector;
use Sylius\Component\Core\Model\TaxonInterface;
use Sylius\Component\Locale\Model\LocaleInterface;
@@ -117,9 +117,9 @@ protected function configureOptions(OptionsResolver $resolver): void
return $words;
})
- ->setDefault('code', fn(Options $options): string => StringInflector::nameToCode($options['name']))
+ ->setDefault('code', fn (Options $options): string => StringInflector::nameToCode($options['name']))
->setDefault('slug', null)
- ->setDefault('description', fn(Options $options): string => $this->faker->paragraph)
+ ->setDefault('description', fn (Options $options): string => $this->faker->paragraph)
->setDefault('translations', [])
->setAllowedTypes('translations', ['array'])
->setDefault('children', [])
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/MugProductFixture.php b/src/Sylius/Bundle/CoreBundle/Fixture/MugProductFixture.php
index 0f55386737e6..3c222ee28aa3 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/MugProductFixture.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/MugProductFixture.php
@@ -13,8 +13,9 @@
namespace Sylius\Bundle\CoreBundle\Fixture;
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
+
@trigger_error('The "MugProductFixture" class is deprecated since Sylius 1.5 Use new product fixtures class located at "src/Sylius/Bundle/CoreBundle/Fixture/" instead.', \E_USER_DEPRECATED);
use Sylius\Bundle\FixturesBundle\Fixture\AbstractFixture;
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/OptionsResolver/LazyOption.php b/src/Sylius/Bundle/CoreBundle/Fixture/OptionsResolver/LazyOption.php
index dbc70c06d368..187cea6d8730 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/OptionsResolver/LazyOption.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/OptionsResolver/LazyOption.php
@@ -95,7 +95,7 @@ public static function randomOnes(RepositoryInterface $repository, int $amount,
public static function all(RepositoryInterface $repository): \Closure
{
- return fn(Options $options): iterable => $repository->findAll();
+ return fn (Options $options): iterable => $repository->findAll();
}
public static function findBy(RepositoryInterface $repository, string $field, array $criteria = []): \Closure
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/OrderFixture.php b/src/Sylius/Bundle/CoreBundle/Fixture/OrderFixture.php
index 8a09133557bd..2f0a1a74f13e 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/OrderFixture.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/OrderFixture.php
@@ -13,9 +13,9 @@
namespace Sylius\Bundle\CoreBundle\Fixture;
-use Faker\Generator;
-use Faker\Factory;
use Doctrine\Persistence\ObjectManager;
+use Faker\Factory;
+use Faker\Generator;
use SM\Factory\FactoryInterface as StateMachineFactoryInterface;
use Sylius\Bundle\CoreBundle\Fixture\Factory\OrderExampleFactory;
use Sylius\Bundle\FixturesBundle\Fixture\AbstractFixture;
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/SimilarProductAssociationFixture.php b/src/Sylius/Bundle/CoreBundle/Fixture/SimilarProductAssociationFixture.php
index 597dae022b70..59c04a263e7c 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/SimilarProductAssociationFixture.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/SimilarProductAssociationFixture.php
@@ -13,8 +13,8 @@
namespace Sylius\Bundle\CoreBundle\Fixture;
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
use Sylius\Bundle\FixturesBundle\Fixture\AbstractFixture;
use Sylius\Component\Core\Model\ProductInterface;
use Sylius\Component\Core\Repository\ProductRepositoryInterface;
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/StickerProductFixture.php b/src/Sylius/Bundle/CoreBundle/Fixture/StickerProductFixture.php
index 295ed20e4df1..c956fe849b0f 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/StickerProductFixture.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/StickerProductFixture.php
@@ -15,8 +15,8 @@
@trigger_error('The "StickerProductFixture" class is deprecated since Sylius 1.5 Use new product fixtures class located at "src/Sylius/Bundle/CoreBundle/Fixture/" instead.', \E_USER_DEPRECATED);
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
use Sylius\Bundle\FixturesBundle\Fixture\AbstractFixture;
use Sylius\Component\Attribute\AttributeType\TextAttributeType;
use Sylius\Component\Core\Model\ProductInterface;
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/TshirtProductFixture.php b/src/Sylius/Bundle/CoreBundle/Fixture/TshirtProductFixture.php
index 2127caf9ad58..8974a87ae201 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/TshirtProductFixture.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/TshirtProductFixture.php
@@ -13,8 +13,9 @@
namespace Sylius\Bundle\CoreBundle\Fixture;
-use Faker\Generator;
use Faker\Factory;
+use Faker\Generator;
+
@trigger_error('The "TshirtProductFixture" class is deprecated since Sylius 1.5 Use new product fixtures class located at "src/Sylius/Bundle/CoreBundle/Fixture/" instead.', \E_USER_DEPRECATED);
use Sylius\Bundle\FixturesBundle\Fixture\AbstractFixture;
diff --git a/src/Sylius/Bundle/CoreBundle/Form/DataTransformer/TaxonsToCodesTransformer.php b/src/Sylius/Bundle/CoreBundle/Form/DataTransformer/TaxonsToCodesTransformer.php
index 4623ace303d4..a3cf4a4a8fc2 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/DataTransformer/TaxonsToCodesTransformer.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/DataTransformer/TaxonsToCodesTransformer.php
@@ -50,6 +50,6 @@ public function reverseTransform($value): array
{
Assert::isInstanceOf($value, Collection::class);
- return array_map(fn(TaxonInterface $taxon) => $taxon->getCode(), $value->toArray());
+ return array_map(fn (TaxonInterface $taxon) => $taxon->getCode(), $value->toArray());
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Extension/CartTypeExtension.php b/src/Sylius/Bundle/CoreBundle/Form/Extension/CartTypeExtension.php
index 3742c25fe24b..2a1d1189a7ee 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Extension/CartTypeExtension.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Extension/CartTypeExtension.php
@@ -39,7 +39,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
public function configureOptions(OptionsResolver $resolver): void
{
- $resolver->setNormalizer('validation_groups', fn(Options $options, array $validationGroups) => function (FormInterface $form) use ($validationGroups) {
+ $resolver->setNormalizer('validation_groups', fn (Options $options, array $validationGroups) => function (FormInterface $form) use ($validationGroups) {
if ((bool) $form->get('promotionCoupon')->getNormData()) { // Validate the coupon if it was sent
$validationGroups[] = 'sylius_promotion_coupon';
}
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Extension/ProductVariantGenerationTypeExtension.php b/src/Sylius/Bundle/CoreBundle/Form/Extension/ProductVariantGenerationTypeExtension.php
index 2123e443746b..f252be58ae42 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Extension/ProductVariantGenerationTypeExtension.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Extension/ProductVariantGenerationTypeExtension.php
@@ -31,7 +31,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
$event->getForm()->add('channelPricings', ChannelCollectionType::class, [
'entry_type' => ChannelPricingType::class,
- 'entry_options' => fn(ChannelInterface $channel) => [
+ 'entry_options' => fn (ChannelInterface $channel) => [
'channel' => $channel,
'product_variant' => $productVariant,
],
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Extension/ProductVariantTypeExtension.php b/src/Sylius/Bundle/CoreBundle/Form/Extension/ProductVariantTypeExtension.php
index 4a2d10070eb3..1eb9d6386f39 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Extension/ProductVariantTypeExtension.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Extension/ProductVariantTypeExtension.php
@@ -81,7 +81,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
$event->getForm()->add('channelPricings', ChannelCollectionType::class, [
'entry_type' => ChannelPricingType::class,
- 'entry_options' => fn(ChannelInterface $channel) => [
+ 'entry_options' => fn (ChannelInterface $channel) => [
'channel' => $channel,
'product_variant' => $productVariant,
'required' => false,
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/AmountType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/AmountType.php
index 630f376068f5..f270b8e4d9d6 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Type/AmountType.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Type/AmountType.php
@@ -47,7 +47,7 @@ public function configureOptions(OptionsResolver $resolver): void
->setAllowedTypes('channel', [ChannelInterface::class])
->setDefaults([
- 'label' => static fn(Options $options): string => $options['channel']->getName(),
+ 'label' => static fn (Options $options): string => $options['channel']->getName(),
])
;
}
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/ChannelCollectionType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/ChannelCollectionType.php
index e8eaab222551..18a98c4c8b51 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Type/ChannelCollectionType.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Type/ChannelCollectionType.php
@@ -32,7 +32,7 @@ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'entries' => $this->channelRepository->findAll(),
- 'entry_name' => fn(ChannelInterface $channel) => $channel->getCode(),
+ 'entry_name' => fn (ChannelInterface $channel) => $channel->getCode(),
'error_bubbling' => false,
]);
}
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Checkout/AddressType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Checkout/AddressType.php
index 7dcb0eec1097..5dc52e346ede 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Type/Checkout/AddressType.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Checkout/AddressType.php
@@ -51,7 +51,7 @@ public function __construct(string $dataClass, array $validationGroups = [], ?Ad
}
/**
- * {@inheritdoc}
+ * @inheritdoc
*/
public function buildForm(FormBuilderInterface $builder, array $options): void
{
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Product/ChannelPricingType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Product/ChannelPricingType.php
index e118ca49dfbb..a6812cc70044 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Type/Product/ChannelPricingType.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Product/ChannelPricingType.php
@@ -91,7 +91,7 @@ public function configureOptions(OptionsResolver $resolver): void
->setAllowedTypes('product_variant', ['null', ProductVariantInterface::class])
->setDefaults([
- 'label' => fn(Options $options): string => $options['channel']->getName(),
+ 'label' => fn (Options $options): string => $options['channel']->getName(),
])
;
}
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Action/ChannelBasedFixedDiscountConfigurationType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Action/ChannelBasedFixedDiscountConfigurationType.php
index c65a5fb5328b..9bdd3da120a8 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Action/ChannelBasedFixedDiscountConfigurationType.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Action/ChannelBasedFixedDiscountConfigurationType.php
@@ -25,7 +25,7 @@ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'entry_type' => FixedDiscountConfigurationType::class,
- 'entry_options' => fn(ChannelInterface $channel) => [
+ 'entry_options' => fn (ChannelInterface $channel) => [
'label' => $channel->getName(),
'currency' => $channel->getBaseCurrency()->getCode(),
],
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Action/ChannelBasedUnitFixedDiscountConfigurationType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Action/ChannelBasedUnitFixedDiscountConfigurationType.php
index e75a29e47442..d3e0d61cf5c3 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Action/ChannelBasedUnitFixedDiscountConfigurationType.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Action/ChannelBasedUnitFixedDiscountConfigurationType.php
@@ -25,7 +25,7 @@ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'entry_type' => UnitFixedDiscountConfigurationType::class,
- 'entry_options' => fn(ChannelInterface $channel) => [
+ 'entry_options' => fn (ChannelInterface $channel) => [
'label' => $channel->getName(),
'currency' => $channel->getBaseCurrency()->getCode(),
],
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Action/ChannelBasedUnitPercentageDiscountConfigurationType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Action/ChannelBasedUnitPercentageDiscountConfigurationType.php
index 8805e1bb1d29..f522020e7070 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Action/ChannelBasedUnitPercentageDiscountConfigurationType.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Action/ChannelBasedUnitPercentageDiscountConfigurationType.php
@@ -25,7 +25,7 @@ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'entry_type' => UnitPercentageDiscountConfigurationType::class,
- 'entry_options' => fn(ChannelInterface $channel) => [
+ 'entry_options' => fn (ChannelInterface $channel) => [
'label' => $channel->getName(),
'currency' => $channel->getBaseCurrency()->getCode(),
],
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/ChannelBasedItemTotalConfigurationType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/ChannelBasedItemTotalConfigurationType.php
index 933e63b0686c..4e1a70f75310 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/ChannelBasedItemTotalConfigurationType.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/ChannelBasedItemTotalConfigurationType.php
@@ -25,7 +25,7 @@ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'entry_type' => ItemTotalConfigurationType::class,
- 'entry_options' => fn(ChannelInterface $channel) => [
+ 'entry_options' => fn (ChannelInterface $channel) => [
'label' => $channel->getName(),
'currency' => $channel->getBaseCurrency()->getCode(),
],
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/ChannelBasedTotalOfItemsFromTaxonConfigurationType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/ChannelBasedTotalOfItemsFromTaxonConfigurationType.php
index 56b44ab47e7a..7451a2a92b9f 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/ChannelBasedTotalOfItemsFromTaxonConfigurationType.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/ChannelBasedTotalOfItemsFromTaxonConfigurationType.php
@@ -24,7 +24,7 @@ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'entry_type' => TotalOfItemsFromTaxonConfigurationType::class,
- 'entry_options' => fn(ChannelInterface $channel): array => [
+ 'entry_options' => fn (ChannelInterface $channel): array => [
'label' => $channel->getName(),
'currency' => $channel->getBaseCurrency()->getCode(),
],
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Shipping/Calculator/ChannelBasedFlatRateConfigurationType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Shipping/Calculator/ChannelBasedFlatRateConfigurationType.php
index b26df4db2921..7b4610000c65 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Type/Shipping/Calculator/ChannelBasedFlatRateConfigurationType.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Shipping/Calculator/ChannelBasedFlatRateConfigurationType.php
@@ -25,7 +25,7 @@ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'entry_type' => FlatRateConfigurationType::class,
- 'entry_options' => fn(ChannelInterface $channel): array => [
+ 'entry_options' => fn (ChannelInterface $channel): array => [
'label' => $channel->getName(),
'currency' => $channel->getBaseCurrency()->getCode(),
],
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Shipping/Calculator/ChannelBasedPerUnitRateConfigurationType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Shipping/Calculator/ChannelBasedPerUnitRateConfigurationType.php
index 6f904793e78f..c659991007d8 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Type/Shipping/Calculator/ChannelBasedPerUnitRateConfigurationType.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Shipping/Calculator/ChannelBasedPerUnitRateConfigurationType.php
@@ -25,7 +25,7 @@ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'entry_type' => PerUnitRateConfigurationType::class,
- 'entry_options' => fn(ChannelInterface $channel): array => [
+ 'entry_options' => fn (ChannelInterface $channel): array => [
'label' => $channel->getName(),
'currency' => $channel->getBaseCurrency()->getCode(),
],
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Shipping/Rule/ChannelBasedOrderTotalGreaterThanOrEqualConfigurationType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Shipping/Rule/ChannelBasedOrderTotalGreaterThanOrEqualConfigurationType.php
index 99853ce87f81..2f074c796a1f 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Type/Shipping/Rule/ChannelBasedOrderTotalGreaterThanOrEqualConfigurationType.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Shipping/Rule/ChannelBasedOrderTotalGreaterThanOrEqualConfigurationType.php
@@ -24,7 +24,7 @@ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'entry_type' => OrderTotalGreaterThanOrEqualConfigurationType::class,
- 'entry_options' => fn(ChannelInterface $channel): array => [
+ 'entry_options' => fn (ChannelInterface $channel): array => [
'label' => $channel->getName(),
'currency' => $channel->getBaseCurrency()->getCode(),
],
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Shipping/Rule/ChannelBasedOrderTotalLessThanOrEqualConfigurationType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Shipping/Rule/ChannelBasedOrderTotalLessThanOrEqualConfigurationType.php
index fc622b8ed4f2..f27a13ffbe38 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Type/Shipping/Rule/ChannelBasedOrderTotalLessThanOrEqualConfigurationType.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Shipping/Rule/ChannelBasedOrderTotalLessThanOrEqualConfigurationType.php
@@ -24,7 +24,7 @@ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'entry_type' => OrderTotalLessThanOrEqualConfigurationType::class,
- 'entry_options' => fn(ChannelInterface $channel): array => [
+ 'entry_options' => fn (ChannelInterface $channel): array => [
'label' => $channel->getName(),
'currency' => $channel->getBaseCurrency()->getCode(),
],
diff --git a/src/Sylius/Bundle/CoreBundle/Security/UserImpersonator.php b/src/Sylius/Bundle/CoreBundle/Security/UserImpersonator.php
index 13c2c97f947d..544922bbf80b 100644
--- a/src/Sylius/Bundle/CoreBundle/Security/UserImpersonator.php
+++ b/src/Sylius/Bundle/CoreBundle/Security/UserImpersonator.php
@@ -45,14 +45,14 @@ public function impersonate(UserInterface $user): void
$token = new UsernamePasswordToken(
$user,
$this->firewallContextName,
- array_map(/** @param object|string $role */ static fn($role): string => (string) $role, $user->getRoles())
+ array_map(/** @param object|string $role */ static fn ($role): string => (string) $role, $user->getRoles())
);
} else {
$token = new UsernamePasswordToken(
$user,
$user->getPassword(),
$this->firewallContextName,
- array_map(/** @param object|string $role */ static fn($role): string => (string) $role, $user->getRoles())
+ array_map(/** @param object|string $role */ static fn ($role): string => (string) $role, $user->getRoles())
);
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/DependencyInjection/Compiler/RegisterUriBasedSectionResolverPassTest.php b/src/Sylius/Bundle/CoreBundle/Tests/DependencyInjection/Compiler/RegisterUriBasedSectionResolverPassTest.php
index d08e562c2dbf..9fc6f6be4e0f 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/DependencyInjection/Compiler/RegisterUriBasedSectionResolverPassTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/DependencyInjection/Compiler/RegisterUriBasedSectionResolverPassTest.php
@@ -77,7 +77,7 @@ public function it_does_not_add_method_call_if_there_are_no_tagged_processors():
}
/**
- * {@inheritdoc}
+ * @inheritdoc
*/
protected function registerCompilerPass(ContainerBuilder $container): void
{
diff --git a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/UniqueReviewerEmailValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/UniqueReviewerEmailValidator.php
index 5a988afadd1e..c9f8f1cfa49e 100644
--- a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/UniqueReviewerEmailValidator.php
+++ b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/UniqueReviewerEmailValidator.php
@@ -13,7 +13,6 @@
namespace Sylius\Bundle\CoreBundle\Validator\Constraints;
-use Sylius\Bundle\UserBundle\Doctrine\ORM\UserRepository;
use Sylius\Component\Review\Model\ReviewerInterface;
use Sylius\Component\User\Model\UserInterface;
use Sylius\Component\User\Repository\UserRepositoryInterface;
diff --git a/src/Sylius/Bundle/CurrencyBundle/Form/Type/CurrencyChoiceType.php b/src/Sylius/Bundle/CurrencyBundle/Form/Type/CurrencyChoiceType.php
index f946b06ee020..ba46e9167511 100644
--- a/src/Sylius/Bundle/CurrencyBundle/Form/Type/CurrencyChoiceType.php
+++ b/src/Sylius/Bundle/CurrencyBundle/Form/Type/CurrencyChoiceType.php
@@ -40,7 +40,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
- 'choices' => fn(Options $options): array => $this->currencyRepository->findAll(),
+ 'choices' => fn (Options $options): array => $this->currencyRepository->findAll(),
'choice_value' => 'code',
'choice_label' => 'name',
'choice_translation_domain' => false,
diff --git a/src/Sylius/Bundle/CurrencyBundle/test/src/Tests/SyliusCurrencyBundleTest.php b/src/Sylius/Bundle/CurrencyBundle/test/src/Tests/SyliusCurrencyBundleTest.php
index 3c86a00646ea..3564177e63a4 100644
--- a/src/Sylius/Bundle/CurrencyBundle/test/src/Tests/SyliusCurrencyBundleTest.php
+++ b/src/Sylius/Bundle/CurrencyBundle/test/src/Tests/SyliusCurrencyBundleTest.php
@@ -30,7 +30,7 @@ public function its_services_are_initializable(): void
$services = $container->getServiceIds();
- $services = array_filter($services, fn(string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
+ $services = array_filter($services, fn (string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
foreach ($services as $id) {
Assert::assertNotNull($container->get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE));
diff --git a/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerChoiceType.php b/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerChoiceType.php
index 30631c67772e..c3962cd71c42 100644
--- a/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerChoiceType.php
+++ b/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerChoiceType.php
@@ -41,9 +41,9 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
- 'choices' => fn(Options $options): array => $this->customerRepository->findAll(),
+ 'choices' => fn (Options $options): array => $this->customerRepository->findAll(),
'choice_value' => 'email',
- 'choice_label' => fn(CustomerInterface $customer): string => sprintf('%s (%s)', $customer->getFullName(), $customer->getEmail()),
+ 'choice_label' => fn (CustomerInterface $customer): string => sprintf('%s (%s)', $customer->getFullName(), $customer->getEmail()),
'choice_translation_domain' => false,
]);
}
diff --git a/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerGroupChoiceType.php b/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerGroupChoiceType.php
index 6f1e6427c285..ed6203f807ab 100644
--- a/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerGroupChoiceType.php
+++ b/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerGroupChoiceType.php
@@ -40,7 +40,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
- 'choices' => fn(Options $options): array => $this->customerGroupRepository->findAll(),
+ 'choices' => fn (Options $options): array => $this->customerGroupRepository->findAll(),
'choice_value' => 'code',
'choice_label' => 'name',
'choice_translation_domain' => false,
diff --git a/src/Sylius/Bundle/CustomerBundle/test/src/Tests/SyliusCustomerBundleTest.php b/src/Sylius/Bundle/CustomerBundle/test/src/Tests/SyliusCustomerBundleTest.php
index 22d63d986eeb..3d3e297e2abd 100644
--- a/src/Sylius/Bundle/CustomerBundle/test/src/Tests/SyliusCustomerBundleTest.php
+++ b/src/Sylius/Bundle/CustomerBundle/test/src/Tests/SyliusCustomerBundleTest.php
@@ -30,7 +30,7 @@ public function its_services_are_initializable(): void
$services = $container->getServiceIds();
- $services = array_filter($services, fn(string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
+ $services = array_filter($services, fn (string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
foreach ($services as $id) {
Assert::assertNotNull($container->get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE));
diff --git a/src/Sylius/Bundle/InventoryBundle/test/src/Tests/SyliusInventoryBundleTest.php b/src/Sylius/Bundle/InventoryBundle/test/src/Tests/SyliusInventoryBundleTest.php
index acf95a6539e9..be99a5abcfac 100644
--- a/src/Sylius/Bundle/InventoryBundle/test/src/Tests/SyliusInventoryBundleTest.php
+++ b/src/Sylius/Bundle/InventoryBundle/test/src/Tests/SyliusInventoryBundleTest.php
@@ -30,7 +30,7 @@ public function its_services_are_initializable(): void
$services = $container->getServiceIds();
- $services = array_filter($services, fn(string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
+ $services = array_filter($services, fn (string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
foreach ($services as $id) {
Assert::assertNotNull($container->get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE));
diff --git a/src/Sylius/Bundle/LocaleBundle/test/src/Tests/SyliusLocaleBundleTest.php b/src/Sylius/Bundle/LocaleBundle/test/src/Tests/SyliusLocaleBundleTest.php
index 9cda6dd1200f..56389f31c2ab 100644
--- a/src/Sylius/Bundle/LocaleBundle/test/src/Tests/SyliusLocaleBundleTest.php
+++ b/src/Sylius/Bundle/LocaleBundle/test/src/Tests/SyliusLocaleBundleTest.php
@@ -30,7 +30,7 @@ public function its_services_are_initializable(): void
$services = $container->getServiceIds();
- $services = array_filter($services, fn(string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
+ $services = array_filter($services, fn (string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
foreach ($services as $id) {
Assert::assertNotNull($container->get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE));
diff --git a/src/Sylius/Bundle/MoneyBundle/test/src/Tests/SyliusMoneyBundleTest.php b/src/Sylius/Bundle/MoneyBundle/test/src/Tests/SyliusMoneyBundleTest.php
index 50cea2da0dd5..510eaca9510f 100644
--- a/src/Sylius/Bundle/MoneyBundle/test/src/Tests/SyliusMoneyBundleTest.php
+++ b/src/Sylius/Bundle/MoneyBundle/test/src/Tests/SyliusMoneyBundleTest.php
@@ -30,7 +30,7 @@ public function its_services_are_initializable(): void
$services = $container->getServiceIds();
- $services = array_filter($services, fn(string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
+ $services = array_filter($services, fn (string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
foreach ($services as $id) {
Assert::assertNotNull($container->get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE));
diff --git a/src/Sylius/Bundle/OrderBundle/test/src/Tests/SyliusOrderBundleTest.php b/src/Sylius/Bundle/OrderBundle/test/src/Tests/SyliusOrderBundleTest.php
index a1271845307d..18b4d10d52fc 100644
--- a/src/Sylius/Bundle/OrderBundle/test/src/Tests/SyliusOrderBundleTest.php
+++ b/src/Sylius/Bundle/OrderBundle/test/src/Tests/SyliusOrderBundleTest.php
@@ -30,7 +30,7 @@ public function its_services_are_initializable(): void
$services = $container->getServiceIds();
- $services = array_filter($services, fn(string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
+ $services = array_filter($services, fn (string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
foreach ($services as $id) {
Assert::assertNotNull($container->get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE));
diff --git a/src/Sylius/Bundle/PaymentBundle/test/src/Tests/SyliusPaymentBundleTest.php b/src/Sylius/Bundle/PaymentBundle/test/src/Tests/SyliusPaymentBundleTest.php
index 69adefe2efbb..625e23d77a90 100644
--- a/src/Sylius/Bundle/PaymentBundle/test/src/Tests/SyliusPaymentBundleTest.php
+++ b/src/Sylius/Bundle/PaymentBundle/test/src/Tests/SyliusPaymentBundleTest.php
@@ -30,7 +30,7 @@ public function its_services_are_initializable(): void
$services = $container->getServiceIds();
- $services = array_filter($services, fn(string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
+ $services = array_filter($services, fn (string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
foreach ($services as $id) {
Assert::assertNotNull($container->get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE));
diff --git a/src/Sylius/Bundle/PayumBundle/DependencyInjection/Compiler/InjectContainerIntoControllersPass.php b/src/Sylius/Bundle/PayumBundle/DependencyInjection/Compiler/InjectContainerIntoControllersPass.php
index 15eaa560fb3c..f11b456dda7b 100644
--- a/src/Sylius/Bundle/PayumBundle/DependencyInjection/Compiler/InjectContainerIntoControllersPass.php
+++ b/src/Sylius/Bundle/PayumBundle/DependencyInjection/Compiler/InjectContainerIntoControllersPass.php
@@ -11,7 +11,6 @@
use Payum\Bundle\PayumBundle\Controller\PayoutController;
use Payum\Bundle\PayumBundle\Controller\RefundController;
use Payum\Bundle\PayumBundle\Controller\SyncController;
-use Payum\Bundle\PayumBundle\Controller;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
diff --git a/src/Sylius/Bundle/PayumBundle/DependencyInjection/Compiler/RegisterGatewayConfigTypePass.php b/src/Sylius/Bundle/PayumBundle/DependencyInjection/Compiler/RegisterGatewayConfigTypePass.php
index 82e618c8529b..8e558c553c98 100644
--- a/src/Sylius/Bundle/PayumBundle/DependencyInjection/Compiler/RegisterGatewayConfigTypePass.php
+++ b/src/Sylius/Bundle/PayumBundle/DependencyInjection/Compiler/RegisterGatewayConfigTypePass.php
@@ -48,7 +48,7 @@ public function process(ContainerBuilder $container): void
}
}
- usort($gatewayFactories, fn(array $firstGateway, array $secondGateway): int => $secondGateway['priority'] - $firstGateway['priority']);
+ usort($gatewayFactories, fn (array $firstGateway, array $secondGateway): int => $secondGateway['priority'] - $firstGateway['priority']);
$sortedGatewayFactories = [];
foreach ($gatewayFactories as $key => $factory) {
diff --git a/src/Sylius/Bundle/PayumBundle/Model/PaymentSecurityToken.php b/src/Sylius/Bundle/PayumBundle/Model/PaymentSecurityToken.php
index 32487c677507..f6fca45c0135 100644
--- a/src/Sylius/Bundle/PayumBundle/Model/PaymentSecurityToken.php
+++ b/src/Sylius/Bundle/PayumBundle/Model/PaymentSecurityToken.php
@@ -21,16 +21,16 @@ class PaymentSecurityToken implements PaymentSecurityTokenInterface
protected $hash;
/** @var object|null */
- protected $details = null;
+ protected $details;
/** @var string|null */
- protected $afterUrl = null;
+ protected $afterUrl;
/** @var string|null */
- protected $targetUrl = null;
+ protected $targetUrl;
/** @var string|null */
- protected $gatewayName = null;
+ protected $gatewayName;
public function __construct()
{
diff --git a/src/Sylius/Bundle/ProductBundle/Form/DataTransformer/ProductVariantToProductOptionsTransformer.php b/src/Sylius/Bundle/ProductBundle/Form/DataTransformer/ProductVariantToProductOptionsTransformer.php
index eb1a1d94f065..ff9a5a3f8184 100644
--- a/src/Sylius/Bundle/ProductBundle/Form/DataTransformer/ProductVariantToProductOptionsTransformer.php
+++ b/src/Sylius/Bundle/ProductBundle/Form/DataTransformer/ProductVariantToProductOptionsTransformer.php
@@ -44,7 +44,7 @@ public function transform($value): array
return array_combine(
array_map(
- fn(ProductOptionValueInterface $productOptionValue): string => (string) $productOptionValue->getOptionCode(),
+ fn (ProductOptionValueInterface $productOptionValue): string => (string) $productOptionValue->getOptionCode(),
$value->getOptionValues()->toArray()
),
$value->getOptionValues()->toArray()
diff --git a/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/BuildAttributesFormSubscriber.php b/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/BuildAttributesFormSubscriber.php
index 30b2cad65242..d18618f474a3 100644
--- a/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/BuildAttributesFormSubscriber.php
+++ b/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/BuildAttributesFormSubscriber.php
@@ -59,7 +59,7 @@ public function preSetData(FormEvent $event): void
$defaultLocaleCode = $this->localeProvider->getDefaultLocaleCode();
$attributes = $product->getAttributes()->filter(
- fn(ProductAttributeValueInterface $attribute) => $attribute->getLocaleCode() === $defaultLocaleCode
+ fn (ProductAttributeValueInterface $attribute) => $attribute->getLocaleCode() === $defaultLocaleCode
);
/** @var ProductAttributeValueInterface $attribute */
diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationTypeChoiceType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationTypeChoiceType.php
index e216a11d450f..92abef1cea93 100644
--- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationTypeChoiceType.php
+++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationTypeChoiceType.php
@@ -40,7 +40,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
- 'choices' => fn(Options $options) => $this->productAssociationTypeRepository->findAll(),
+ 'choices' => fn (Options $options) => $this->productAssociationTypeRepository->findAll(),
'choice_value' => 'code',
'choice_label' => 'name',
'choice_translation_domain' => false,
diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationsType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationsType.php
index 45b2dd4d9467..8b4598e5f830 100644
--- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationsType.php
+++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationsType.php
@@ -46,8 +46,8 @@ public function configureOptions(OptionsResolver $resolver): void
$resolver->setDefaults([
'entries' => $this->productAssociationTypeRepository->findAll(),
'entry_type' => TextType::class,
- 'entry_name' => fn(ProductAssociationTypeInterface $productAssociationType) => $productAssociationType->getCode(),
- 'entry_options' => fn(ProductAssociationTypeInterface $productAssociationType) => [
+ 'entry_name' => fn (ProductAssociationTypeInterface $productAssociationType) => $productAssociationType->getCode(),
+ 'entry_options' => fn (ProductAssociationTypeInterface $productAssociationType) => [
'label' => $productAssociationType->getName(),
],
]);
diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductChoiceType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductChoiceType.php
index 5756c3050f83..c2971d4722ae 100644
--- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductChoiceType.php
+++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductChoiceType.php
@@ -40,7 +40,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
- 'choices' => fn(Options $options) => $this->productRepository->findAll(),
+ 'choices' => fn (Options $options) => $this->productRepository->findAll(),
'choice_value' => 'code',
'choice_label' => 'name',
'choice_translation_domain' => false,
diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductOptionChoiceType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductOptionChoiceType.php
index 27ab230b76bc..f4e62e38d4d6 100644
--- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductOptionChoiceType.php
+++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductOptionChoiceType.php
@@ -40,7 +40,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
- 'choices' => fn(Options $options): array => $this->productOptionRepository->findAll(),
+ 'choices' => fn (Options $options): array => $this->productOptionRepository->findAll(),
'choice_value' => 'code',
'choice_label' => 'name',
'choice_translation_domain' => false,
diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductVariantChoiceType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductVariantChoiceType.php
index ee7ff0a117c9..a22cf2834775 100644
--- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductVariantChoiceType.php
+++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductVariantChoiceType.php
@@ -35,9 +35,9 @@ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefaults([
- 'choices' => fn(Options $options): iterable => $options['product']->getVariants(),
+ 'choices' => fn (Options $options): iterable => $options['product']->getVariants(),
'choice_value' => 'code',
- 'choice_label' => fn(ProductVariantInterface $variant): string => $variant->getName(),
+ 'choice_label' => fn (ProductVariantInterface $variant): string => $variant->getName(),
'choice_translation_domain' => false,
'multiple' => false,
'expanded' => true,
diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductVariantMatchType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductVariantMatchType.php
index 4cb3fff17dd1..1ab978aa0046 100644
--- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductVariantMatchType.php
+++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductVariantMatchType.php
@@ -40,8 +40,8 @@ public function configureOptions(OptionsResolver $resolver): void
return $product->getOptions();
},
'entry_type' => ProductOptionValueChoiceType::class,
- 'entry_name' => fn(ProductOptionInterface $productOption) => $productOption->getCode(),
- 'entry_options' => fn(Options $options) => fn(ProductOptionInterface $productOption) => [
+ 'entry_name' => fn (ProductOptionInterface $productOption) => $productOption->getCode(),
+ 'entry_options' => fn (Options $options) => fn (ProductOptionInterface $productOption) => [
'label' => $productOption->getName(),
'option' => $productOption,
'only_available_values' => true,
diff --git a/src/Sylius/Bundle/ProductBundle/test/src/Tests/SyliusProductBundleTest.php b/src/Sylius/Bundle/ProductBundle/test/src/Tests/SyliusProductBundleTest.php
index 81f59ca93cef..7f2e51fe95cd 100644
--- a/src/Sylius/Bundle/ProductBundle/test/src/Tests/SyliusProductBundleTest.php
+++ b/src/Sylius/Bundle/ProductBundle/test/src/Tests/SyliusProductBundleTest.php
@@ -30,7 +30,7 @@ public function its_services_are_initializable(): void
$services = $container->getServiceIds();
- $services = array_filter($services, fn(string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
+ $services = array_filter($services, fn (string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
foreach ($services as $id) {
Assert::assertNotNull($container->get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE));
diff --git a/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Compiler/CompositePromotionCouponEligibilityCheckerPass.php b/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Compiler/CompositePromotionCouponEligibilityCheckerPass.php
index 93a4ff81f24b..b502cc50f135 100644
--- a/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Compiler/CompositePromotionCouponEligibilityCheckerPass.php
+++ b/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Compiler/CompositePromotionCouponEligibilityCheckerPass.php
@@ -27,7 +27,7 @@ public function process(ContainerBuilder $container): void
$container->getDefinition('sylius.promotion_coupon_eligibility_checker')->setArguments([
array_map(
- fn($id) => new Reference($id),
+ fn ($id) => new Reference($id),
array_keys($container->findTaggedServiceIds('sylius.promotion_coupon_eligibility_checker'))
),
]);
diff --git a/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Compiler/CompositePromotionEligibilityCheckerPass.php b/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Compiler/CompositePromotionEligibilityCheckerPass.php
index fb8212e5043f..8698c379b275 100644
--- a/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Compiler/CompositePromotionEligibilityCheckerPass.php
+++ b/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Compiler/CompositePromotionEligibilityCheckerPass.php
@@ -27,7 +27,7 @@ public function process(ContainerBuilder $container): void
$container->getDefinition('sylius.promotion_eligibility_checker')->setArguments([
array_map(
- fn($id) => new Reference($id),
+ fn ($id) => new Reference($id),
array_keys($container->findTaggedServiceIds('sylius.promotion_eligibility_checker'))
),
]);
diff --git a/src/Sylius/Bundle/PromotionBundle/Tests/Command/GenerateCouponsCommandTest.php b/src/Sylius/Bundle/PromotionBundle/Tests/Command/GenerateCouponsCommandTest.php
index 50ff1f31ecc5..162b4f0ce73f 100644
--- a/src/Sylius/Bundle/PromotionBundle/Tests/Command/GenerateCouponsCommandTest.php
+++ b/src/Sylius/Bundle/PromotionBundle/Tests/Command/GenerateCouponsCommandTest.php
@@ -13,15 +13,14 @@
namespace Sylius\Bundle\PromotionBundle\Tests\Command;
-use Symfony\Component\Console\Command\Command;
use InvalidArgumentException;
-use Sylius\Bundle\PromotionBundle\Command\GenerateCouponsCommand;
use Sylius\Component\Promotion\Generator\PromotionCouponGeneratorInstruction;
use Sylius\Component\Promotion\Generator\PromotionCouponGeneratorInterface;
use Sylius\Component\Promotion\Model\PromotionInterface;
use Sylius\Component\Promotion\Repository\PromotionRepositoryInterface;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
+use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Tester\CommandTester;
class GenerateCouponsCommandTest extends KernelTestCase
diff --git a/src/Sylius/Bundle/PromotionBundle/test/src/Tests/SyliusPromotionBundleTest.php b/src/Sylius/Bundle/PromotionBundle/test/src/Tests/SyliusPromotionBundleTest.php
index 3ffed0e79773..56628cf8ad8b 100644
--- a/src/Sylius/Bundle/PromotionBundle/test/src/Tests/SyliusPromotionBundleTest.php
+++ b/src/Sylius/Bundle/PromotionBundle/test/src/Tests/SyliusPromotionBundleTest.php
@@ -30,7 +30,7 @@ public function its_services_are_initializable(): void
$services = $container->getServiceIds();
- $services = array_filter($services, fn(string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
+ $services = array_filter($services, fn (string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
foreach ($services as $id) {
Assert::assertNotNull($container->get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE));
diff --git a/src/Sylius/Bundle/ReviewBundle/test/src/Tests/SyliusReviewBundleTest.php b/src/Sylius/Bundle/ReviewBundle/test/src/Tests/SyliusReviewBundleTest.php
index facaa5e35165..653c221c8581 100644
--- a/src/Sylius/Bundle/ReviewBundle/test/src/Tests/SyliusReviewBundleTest.php
+++ b/src/Sylius/Bundle/ReviewBundle/test/src/Tests/SyliusReviewBundleTest.php
@@ -30,7 +30,7 @@ public function its_services_are_initializable(): void
$services = $container->getServiceIds();
- $services = array_filter($services, fn(string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
+ $services = array_filter($services, fn (string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
foreach ($services as $id) {
Assert::assertNotNull($container->get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE));
diff --git a/src/Sylius/Bundle/ShippingBundle/DependencyInjection/Compiler/CompositeShippingMethodEligibilityCheckerPass.php b/src/Sylius/Bundle/ShippingBundle/DependencyInjection/Compiler/CompositeShippingMethodEligibilityCheckerPass.php
index 5df596a4acb9..c135da86395e 100644
--- a/src/Sylius/Bundle/ShippingBundle/DependencyInjection/Compiler/CompositeShippingMethodEligibilityCheckerPass.php
+++ b/src/Sylius/Bundle/ShippingBundle/DependencyInjection/Compiler/CompositeShippingMethodEligibilityCheckerPass.php
@@ -27,7 +27,7 @@ public function process(ContainerBuilder $container): void
$container->getDefinition('sylius.shipping_method_eligibility_checker')->setArguments([
array_map(
- static fn($id): Reference => new Reference($id),
+ static fn ($id): Reference => new Reference($id),
array_keys($container->findTaggedServiceIds('sylius.shipping_method_eligibility_checker'))
),
]);
diff --git a/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingCategoryChoiceType.php b/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingCategoryChoiceType.php
index ea0ea931381f..5f962f4bc019 100644
--- a/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingCategoryChoiceType.php
+++ b/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingCategoryChoiceType.php
@@ -40,7 +40,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
- 'choices' => fn(Options $options) => $this->shippingCategoryRepository->findAll(),
+ 'choices' => fn (Options $options) => $this->shippingCategoryRepository->findAll(),
'choice_value' => 'code',
'choice_label' => 'name',
'choice_translation_domain' => false,
diff --git a/src/Sylius/Bundle/ShippingBundle/test/src/Tests/SyliusShippingBundleTest.php b/src/Sylius/Bundle/ShippingBundle/test/src/Tests/SyliusShippingBundleTest.php
index 63e8f44821d8..6192720c7fae 100644
--- a/src/Sylius/Bundle/ShippingBundle/test/src/Tests/SyliusShippingBundleTest.php
+++ b/src/Sylius/Bundle/ShippingBundle/test/src/Tests/SyliusShippingBundleTest.php
@@ -30,7 +30,7 @@ public function its_services_are_initializable(): void
$services = $container->getServiceIds();
- $services = array_filter($services, fn(string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
+ $services = array_filter($services, fn (string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
foreach ($services as $id) {
Assert::assertNotNull($container->get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE));
diff --git a/src/Sylius/Bundle/ShopBundle/Calculator/OrderItemsSubtotalCalculator.php b/src/Sylius/Bundle/ShopBundle/Calculator/OrderItemsSubtotalCalculator.php
index bb0c92c2e3f4..57129950a4db 100644
--- a/src/Sylius/Bundle/ShopBundle/Calculator/OrderItemsSubtotalCalculator.php
+++ b/src/Sylius/Bundle/ShopBundle/Calculator/OrderItemsSubtotalCalculator.php
@@ -22,7 +22,7 @@ public function getSubtotal(OrderInterface $order): int
{
return array_reduce(
$order->getItems()->toArray(),
- static fn(int $subtotal, OrderItemInterface $item): int => $subtotal + $item->getSubtotal(),
+ static fn (int $subtotal, OrderItemInterface $item): int => $subtotal + $item->getSubtotal(),
0
);
}
diff --git a/src/Sylius/Bundle/ShopBundle/Controller/CurrencySwitchController.php b/src/Sylius/Bundle/ShopBundle/Controller/CurrencySwitchController.php
index 5127c2c6a444..d88d498a196a 100644
--- a/src/Sylius/Bundle/ShopBundle/Controller/CurrencySwitchController.php
+++ b/src/Sylius/Bundle/ShopBundle/Controller/CurrencySwitchController.php
@@ -59,7 +59,7 @@ public function renderAction(): Response
$channel = $this->channelContext->getChannel();
$availableCurrencies = array_map(
- fn(CurrencyInterface $currency) => $currency->getCode(),
+ fn (CurrencyInterface $currency) => $currency->getCode(),
$channel->getCurrencies()->toArray()
);
diff --git a/src/Sylius/Bundle/ShopBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/ShopBundle/DependencyInjection/Configuration.php
index f788743cf215..1c7d6e0d2048 100644
--- a/src/Sylius/Bundle/ShopBundle/DependencyInjection/Configuration.php
+++ b/src/Sylius/Bundle/ShopBundle/DependencyInjection/Configuration.php
@@ -40,7 +40,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->validate()
->ifTrue(
/** @param mixed $pattern */
- fn($pattern) => !is_string($pattern)
+ fn ($pattern) => !is_string($pattern)
)
->thenInvalid('Invalid pattern "%s"')
->end()
diff --git a/src/Sylius/Bundle/ShopBundle/Twig/OrderTaxesTotalExtension.php b/src/Sylius/Bundle/ShopBundle/Twig/OrderTaxesTotalExtension.php
index 555dc8107199..f3431af316ce 100644
--- a/src/Sylius/Bundle/ShopBundle/Twig/OrderTaxesTotalExtension.php
+++ b/src/Sylius/Bundle/ShopBundle/Twig/OrderTaxesTotalExtension.php
@@ -43,7 +43,7 @@ private function getAmount(OrderInterface $order, bool $isNeutral): int
{
return array_reduce(
$order->getAdjustmentsRecursively(AdjustmentInterface::TAX_ADJUSTMENT)->toArray(),
- static fn(int $total, BaseAdjustmentInterface $adjustment) => $isNeutral === $adjustment->isNeutral() ? $total + $adjustment->getAmount() : $total,
+ static fn (int $total, BaseAdjustmentInterface $adjustment) => $isNeutral === $adjustment->isNeutral() ? $total + $adjustment->getAmount() : $total,
0
);
}
diff --git a/src/Sylius/Bundle/TaxationBundle/Form/Type/TaxCategoryChoiceType.php b/src/Sylius/Bundle/TaxationBundle/Form/Type/TaxCategoryChoiceType.php
index d2f8f311c309..3cfb8c9c3b2b 100644
--- a/src/Sylius/Bundle/TaxationBundle/Form/Type/TaxCategoryChoiceType.php
+++ b/src/Sylius/Bundle/TaxationBundle/Form/Type/TaxCategoryChoiceType.php
@@ -40,7 +40,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
- 'choices' => fn(Options $options) => $this->taxCategoryRepository->findAll(),
+ 'choices' => fn (Options $options) => $this->taxCategoryRepository->findAll(),
'choice_value' => 'code',
'choice_label' => 'name',
'choice_translation_domain' => false,
diff --git a/src/Sylius/Bundle/TaxationBundle/test/src/Tests/SyliusTaxationBundleTest.php b/src/Sylius/Bundle/TaxationBundle/test/src/Tests/SyliusTaxationBundleTest.php
index 8fb87d9d1241..7ef84db40ad4 100644
--- a/src/Sylius/Bundle/TaxationBundle/test/src/Tests/SyliusTaxationBundleTest.php
+++ b/src/Sylius/Bundle/TaxationBundle/test/src/Tests/SyliusTaxationBundleTest.php
@@ -30,7 +30,7 @@ public function its_services_are_initializable(): void
$services = $container->getServiceIds();
- $services = array_filter($services, fn(string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
+ $services = array_filter($services, fn (string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
foreach ($services as $id) {
Assert::assertNotNull($container->get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE));
diff --git a/src/Sylius/Bundle/TaxonomyBundle/Tests/Functional/SyliusTaxonomyBundleTest.php b/src/Sylius/Bundle/TaxonomyBundle/Tests/Functional/SyliusTaxonomyBundleTest.php
index f8b72fbec2ea..d31e768532cd 100644
--- a/src/Sylius/Bundle/TaxonomyBundle/Tests/Functional/SyliusTaxonomyBundleTest.php
+++ b/src/Sylius/Bundle/TaxonomyBundle/Tests/Functional/SyliusTaxonomyBundleTest.php
@@ -30,7 +30,7 @@ public function its_services_are_initializable()
/** @var Container $container */
$container = self::$kernel->getContainer();
- $serviceIds = array_filter($container->getServiceIds(), fn(string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
+ $serviceIds = array_filter($container->getServiceIds(), fn (string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
foreach ($serviceIds as $id) {
Assert::assertNotNull($container->get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE));
diff --git a/src/Sylius/Bundle/UiBundle/Command/DebugTemplateEventCommand.php b/src/Sylius/Bundle/UiBundle/Command/DebugTemplateEventCommand.php
index d0a3c405efdd..34afcea50c3f 100644
--- a/src/Sylius/Bundle/UiBundle/Command/DebugTemplateEventCommand.php
+++ b/src/Sylius/Bundle/UiBundle/Command/DebugTemplateEventCommand.php
@@ -63,7 +63,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$io->table(
['Block name', 'Template', 'Priority', 'Enabled'],
array_map(
- static fn(TemplateBlock $templateBlock): array => [
+ static fn (TemplateBlock $templateBlock): array => [
$templateBlock->getName(),
$templateBlock->getTemplate(),
$templateBlock->getPriority(),
diff --git a/src/Sylius/Bundle/UiBundle/DataCollector/TemplateBlockDataCollector.php b/src/Sylius/Bundle/UiBundle/DataCollector/TemplateBlockDataCollector.php
index a732fec5b1e0..2e848bd73d7c 100644
--- a/src/Sylius/Bundle/UiBundle/DataCollector/TemplateBlockDataCollector.php
+++ b/src/Sylius/Bundle/UiBundle/DataCollector/TemplateBlockDataCollector.php
@@ -48,12 +48,12 @@ public function getNumberOfRenderedEvents(): int
public function getNumberOfRenderedBlocks(): int
{
- return array_reduce($this->data['renderedEvents'], static fn(int $accumulator, array $event): int => $accumulator + count($event['blocks']), 0);
+ return array_reduce($this->data['renderedEvents'], static fn (int $accumulator, array $event): int => $accumulator + count($event['blocks']), 0);
}
public function getTotalDuration(): float
{
- return array_reduce($this->data['renderedEvents'], static fn(float $accumulator, array $event): float => $accumulator + $event['time'], 0.0);
+ return array_reduce($this->data['renderedEvents'], static fn (float $accumulator, array $event): float => $accumulator + $event['time'], 0.0);
}
public function getName(): string
diff --git a/src/Sylius/Bundle/UiBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/UiBundle/DependencyInjection/Configuration.php
index ffb17b4f38f3..7b3bd10b6786 100644
--- a/src/Sylius/Bundle/UiBundle/DependencyInjection/Configuration.php
+++ b/src/Sylius/Bundle/UiBundle/DependencyInjection/Configuration.php
@@ -40,7 +40,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->canBeDisabled()
->beforeNormalization()
->ifString()
- ->then(static fn(?string $template): array => ['template' => $template])
+ ->then(static fn (?string $template): array => ['template' => $template])
->end()
->children()
->booleanNode('enabled')->defaultNull()->end()
diff --git a/src/Sylius/Bundle/UiBundle/Registry/TemplateBlockRegistry.php b/src/Sylius/Bundle/UiBundle/Registry/TemplateBlockRegistry.php
index 6efda450bf1c..f6384101f3d7 100644
--- a/src/Sylius/Bundle/UiBundle/Registry/TemplateBlockRegistry.php
+++ b/src/Sylius/Bundle/UiBundle/Registry/TemplateBlockRegistry.php
@@ -46,13 +46,13 @@ public function findEnabledForEvents(array $eventNames): array
return array_values(array_filter(
$this->eventsToTemplateBlocks[$eventName] ?? [],
- static fn(TemplateBlock $templateBlock): bool => $templateBlock->isEnabled()
+ static fn (TemplateBlock $templateBlock): bool => $templateBlock->isEnabled()
));
}
$enabledFinalizedTemplateBlocks = array_filter(
$this->findFinalizedForEvents($eventNames),
- static fn(TemplateBlock $templateBlock): bool => $templateBlock->isEnabled()
+ static fn (TemplateBlock $templateBlock): bool => $templateBlock->isEnabled()
);
$templateBlocksPriorityQueue = new SplPriorityQueue();
diff --git a/src/Sylius/Bundle/UiBundle/Renderer/HtmlDebugTemplateEventRenderer.php b/src/Sylius/Bundle/UiBundle/Renderer/HtmlDebugTemplateEventRenderer.php
index f26c674a2591..762c1f87e592 100644
--- a/src/Sylius/Bundle/UiBundle/Renderer/HtmlDebugTemplateEventRenderer.php
+++ b/src/Sylius/Bundle/UiBundle/Renderer/HtmlDebugTemplateEventRenderer.php
@@ -61,6 +61,6 @@ public function render(array $eventNames, array $context = []): string
*/
private function shouldRenderHtmlDebug(array $templateBlocks): bool
{
- return count($templateBlocks) === 0 || count(array_filter($templateBlocks, static fn(TemplateBlock $templateBlock): bool => strrpos($templateBlock->getTemplate(), '.html.twig') !== false)) >= 1;
+ return count($templateBlocks) === 0 || count(array_filter($templateBlocks, static fn (TemplateBlock $templateBlock): bool => strrpos($templateBlock->getTemplate(), '.html.twig') !== false)) >= 1;
}
}
diff --git a/src/Sylius/Bundle/UiBundle/Tests/Functional/Kernel.php b/src/Sylius/Bundle/UiBundle/Tests/Functional/Kernel.php
index b375d19f456b..d1aff353c2c1 100644
--- a/src/Sylius/Bundle/UiBundle/Tests/Functional/Kernel.php
+++ b/src/Sylius/Bundle/UiBundle/Tests/Functional/Kernel.php
@@ -13,12 +13,12 @@
namespace Sylius\Bundle\UiBundle\Tests\Functional;
-use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
-use Symfony\Bundle\SecurityBundle\SecurityBundle;
-use Symfony\Bundle\TwigBundle\TwigBundle;
use Sonata\BlockBundle\SonataBlockBundle;
use Sylius\Bundle\UiBundle\SyliusUiBundle;
+use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
+use Symfony\Bundle\SecurityBundle\SecurityBundle;
+use Symfony\Bundle\TwigBundle\TwigBundle;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Kernel as HttpKernel;
diff --git a/src/Sylius/Bundle/UiBundle/Tests/Functional/TemplateEventTest.php b/src/Sylius/Bundle/UiBundle/Tests/Functional/TemplateEventTest.php
index 6baa2659f3b1..4f962342cc4d 100644
--- a/src/Sylius/Bundle/UiBundle/Tests/Functional/TemplateEventTest.php
+++ b/src/Sylius/Bundle/UiBundle/Tests/Functional/TemplateEventTest.php
@@ -15,7 +15,6 @@
use PHPUnit\Framework\Assert;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
-use Twig\Environment;
final class TemplateEventTest extends KernelTestCase
{
diff --git a/src/Sylius/Bundle/UiBundle/Twig/MergeRecursiveExtension.php b/src/Sylius/Bundle/UiBundle/Twig/MergeRecursiveExtension.php
index a27feb63b3af..15b7cb7ccac5 100644
--- a/src/Sylius/Bundle/UiBundle/Twig/MergeRecursiveExtension.php
+++ b/src/Sylius/Bundle/UiBundle/Twig/MergeRecursiveExtension.php
@@ -23,7 +23,7 @@ public function getFilters(): array
return [
new TwigFilter(
'sylius_merge_recursive',
- fn(array $firstArray, array $secondArray): array => array_merge_recursive($firstArray, $secondArray)
+ fn (array $firstArray, array $secondArray): array => array_merge_recursive($firstArray, $secondArray)
),
];
}
diff --git a/src/Sylius/Bundle/UserBundle/Command/AbstractRoleCommand.php b/src/Sylius/Bundle/UserBundle/Command/AbstractRoleCommand.php
index bd2028b85af7..71f749ba58a2 100644
--- a/src/Sylius/Bundle/UserBundle/Command/AbstractRoleCommand.php
+++ b/src/Sylius/Bundle/UserBundle/Command/AbstractRoleCommand.php
@@ -127,7 +127,7 @@ protected function getAvailableUserTypes(): array
$config = $this->getContainer()->getParameter('sylius.user.users');
// Keep only users types which implement \Sylius\Component\User\Model\UserInterface
- $userTypes = array_filter($config, fn(array $userTypeConfig): bool => isset($userTypeConfig['user']['classes']['model']) && is_a($userTypeConfig['user']['classes']['model'], UserInterface::class, true));
+ $userTypes = array_filter($config, fn (array $userTypeConfig): bool => isset($userTypeConfig['user']['classes']['model']) && is_a($userTypeConfig['user']['classes']['model'], UserInterface::class, true));
return array_keys($userTypes);
}
diff --git a/src/Sylius/Bundle/UserBundle/Security/UserLogin.php b/src/Sylius/Bundle/UserBundle/Security/UserLogin.php
index 8d33cc4d170b..53d2bf55a44a 100644
--- a/src/Sylius/Bundle/UserBundle/Security/UserLogin.php
+++ b/src/Sylius/Bundle/UserBundle/Security/UserLogin.php
@@ -71,7 +71,7 @@ protected function createToken(UserInterface $user, string $firewallName): Usern
$user,
null,
$firewallName,
- array_map(/** @param object|string $role */ static fn($role): string => (string) $role, $user->getRoles())
+ array_map(/** @param object|string $role */ static fn ($role): string => (string) $role, $user->getRoles())
);
}
}
diff --git a/src/Sylius/Bundle/UserBundle/Tests/Functional/SyliusUserBundleTest.php b/src/Sylius/Bundle/UserBundle/Tests/Functional/SyliusUserBundleTest.php
index da29714feac9..dc5c9bc2c30d 100644
--- a/src/Sylius/Bundle/UserBundle/Tests/Functional/SyliusUserBundleTest.php
+++ b/src/Sylius/Bundle/UserBundle/Tests/Functional/SyliusUserBundleTest.php
@@ -30,7 +30,7 @@ public function its_services_are_initializable()
/** @var Container $container */
$container = self::$kernel->getContainer();
- $serviceIds = array_filter($container->getServiceIds(), fn(string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
+ $serviceIds = array_filter($container->getServiceIds(), fn (string $serviceId): bool => 0 === strpos($serviceId, 'sylius.'));
foreach ($serviceIds as $id) {
Assert::assertNotNull($container->get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE));
diff --git a/src/Sylius/Bundle/UserBundle/spec/EventListener/PasswordUpdaterListenerSpec.php b/src/Sylius/Bundle/UserBundle/spec/EventListener/PasswordUpdaterListenerSpec.php
index 6789bfe40217..275a5ec67e33 100644
--- a/src/Sylius/Bundle/UserBundle/spec/EventListener/PasswordUpdaterListenerSpec.php
+++ b/src/Sylius/Bundle/UserBundle/spec/EventListener/PasswordUpdaterListenerSpec.php
@@ -82,8 +82,7 @@ function it_updates_password_on_pre_update_doctrine_event(
function it_updates_password_on_pre_persist_doctrine_event_for_user_interface_implementation_only(
PasswordUpdaterInterface $passwordUpdater,
LifecycleEventArgs $event
- ): void
- {
+ ): void {
$event->getEntity()->willReturn('user');
$passwordUpdater->updatePassword(Argument::any())->shouldNotBeCalled();
diff --git a/src/Sylius/Bundle/UserBundle/spec/Provider/UsernameOrEmailProviderSpec.php b/src/Sylius/Bundle/UserBundle/spec/Provider/UsernameOrEmailProviderSpec.php
index aa75484cf5b5..904299e67c84 100644
--- a/src/Sylius/Bundle/UserBundle/spec/Provider/UsernameOrEmailProviderSpec.php
+++ b/src/Sylius/Bundle/UserBundle/spec/Provider/UsernameOrEmailProviderSpec.php
@@ -21,7 +21,6 @@
use Sylius\Component\User\Repository\UserRepositoryInterface;
use Symfony\Component\Security\Core\Exception\RuntimeException;
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
-use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
use Symfony\Component\Security\Core\User\UserInterface as CoreUserInterface;
use Symfony\Component\Security\Core\User\UserProviderInterface;
diff --git a/src/Sylius/Component/Addressing/Model/Address.php b/src/Sylius/Component/Addressing/Model/Address.php
index b7d753ca03e4..89d46c54284e 100644
--- a/src/Sylius/Component/Addressing/Model/Address.php
+++ b/src/Sylius/Component/Addressing/Model/Address.php
@@ -22,54 +22,34 @@ class Address implements AddressInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $firstName;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $lastName;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $phoneNumber;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $company;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $countryCode;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $provinceCode;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $provinceName;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $street;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $city;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $postcode;
public function __construct()
diff --git a/src/Sylius/Component/Addressing/Model/Country.php b/src/Sylius/Component/Addressing/Model/Country.php
index 806fb0f41cdc..6bbb88baefa0 100644
--- a/src/Sylius/Component/Addressing/Model/Country.php
+++ b/src/Sylius/Component/Addressing/Model/Country.php
@@ -27,6 +27,7 @@ class Country implements CountryInterface
/**
* Country code ISO 3166-1 alpha-2.
+ *
* @var string|null
*/
protected $code;
diff --git a/src/Sylius/Component/Addressing/Model/Province.php b/src/Sylius/Component/Addressing/Model/Province.php
index 3052eca5c067..f66827dedb44 100644
--- a/src/Sylius/Component/Addressing/Model/Province.php
+++ b/src/Sylius/Component/Addressing/Model/Province.php
@@ -18,24 +18,16 @@ class Province implements ProvinceInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $code;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $name;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $abbreviation;
- /**
- * @var CountryInterface|null
- */
+ /** @var CountryInterface|null */
protected $country;
public function __toString(): string
diff --git a/src/Sylius/Component/Addressing/Model/Zone.php b/src/Sylius/Component/Addressing/Model/Zone.php
index 14044cf9ba1b..9a5ddbc88ae0 100644
--- a/src/Sylius/Component/Addressing/Model/Zone.php
+++ b/src/Sylius/Component/Addressing/Model/Zone.php
@@ -21,24 +21,16 @@ class Zone implements ZoneInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $code;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $name;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $type;
- /**
- * @var string
- */
+ /** @var string */
protected $scope = Scope::ALL;
/**
diff --git a/src/Sylius/Component/Addressing/Model/ZoneMember.php b/src/Sylius/Component/Addressing/Model/ZoneMember.php
index 970f745fc105..c43c16c077cb 100644
--- a/src/Sylius/Component/Addressing/Model/ZoneMember.php
+++ b/src/Sylius/Component/Addressing/Model/ZoneMember.php
@@ -18,14 +18,10 @@ class ZoneMember implements ZoneMemberInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $code;
- /**
- * @var ZoneInterface|null
- */
+ /** @var ZoneInterface|null */
protected $belongsTo;
public function getId()
diff --git a/src/Sylius/Component/Attribute/Model/Attribute.php b/src/Sylius/Component/Attribute/Model/Attribute.php
index 245044b78aa4..b6b9a34e66d0 100644
--- a/src/Sylius/Component/Attribute/Model/Attribute.php
+++ b/src/Sylius/Component/Attribute/Model/Attribute.php
@@ -29,34 +29,22 @@ class Attribute implements AttributeInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $code;
- /**
- * @var string
- */
+ /** @var string */
protected $type = TextAttributeType::TYPE;
- /**
- * @var mixed[]
- */
+ /** @var mixed[] */
protected $configuration = [];
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $storageType;
- /**
- * @var int|null
- */
+ /** @var int|null */
protected $position;
- /**
- * @var bool
- */
+ /** @var bool */
protected $translatable = true;
public function __construct()
diff --git a/src/Sylius/Component/Attribute/Model/AttributeTranslation.php b/src/Sylius/Component/Attribute/Model/AttributeTranslation.php
index 28c7e41a3ac7..ec56a8f785a7 100644
--- a/src/Sylius/Component/Attribute/Model/AttributeTranslation.php
+++ b/src/Sylius/Component/Attribute/Model/AttributeTranslation.php
@@ -20,9 +20,7 @@ class AttributeTranslation extends AbstractTranslation implements AttributeTrans
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $name;
public function getId()
diff --git a/src/Sylius/Component/Attribute/Model/AttributeValue.php b/src/Sylius/Component/Attribute/Model/AttributeValue.php
index dece87daac02..5928356a27f1 100644
--- a/src/Sylius/Component/Attribute/Model/AttributeValue.php
+++ b/src/Sylius/Component/Attribute/Model/AttributeValue.php
@@ -18,54 +18,34 @@ class AttributeValue implements AttributeValueInterface
/** @var mixed */
protected $id;
- /**
- * @var AttributeSubjectInterface|null
- */
+ /** @var AttributeSubjectInterface|null */
protected $subject;
- /**
- * @var AttributeInterface|null
- */
+ /** @var AttributeInterface|null */
protected $attribute;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $localeCode;
- /**
- * @var string|null
- */
+ /** @var string|null */
private $text;
- /**
- * @var bool|null
- */
+ /** @var bool|null */
private $boolean;
- /**
- * @var int|null
- */
+ /** @var int|null */
private $integer;
- /**
- * @var float|null
- */
+ /** @var float|null */
private $float;
- /**
- * @var \DateTimeInterface|null
- */
+ /** @var \DateTimeInterface|null */
private $datetime;
- /**
- * @var \DateTimeInterface|null
- */
+ /** @var \DateTimeInterface|null */
private $date;
- /**
- * @var mixed[]|null
- */
+ /** @var mixed[]|null */
private $json;
public function getId()
diff --git a/src/Sylius/Component/Channel/Context/CachedPerRequestChannelContext.php b/src/Sylius/Component/Channel/Context/CachedPerRequestChannelContext.php
index 636dbfe3e6cb..7dde11a56d25 100644
--- a/src/Sylius/Component/Channel/Context/CachedPerRequestChannelContext.php
+++ b/src/Sylius/Component/Channel/Context/CachedPerRequestChannelContext.php
@@ -14,7 +14,6 @@
namespace Sylius\Component\Channel\Context;
use Sylius\Component\Channel\Model\ChannelInterface;
-use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
final class CachedPerRequestChannelContext implements ChannelContextInterface
diff --git a/src/Sylius/Component/Channel/Model/Channel.php b/src/Sylius/Component/Channel/Model/Channel.php
index 08f2f75ce0c1..bd8d4c829732 100644
--- a/src/Sylius/Component/Channel/Model/Channel.php
+++ b/src/Sylius/Component/Channel/Model/Channel.php
@@ -23,29 +23,19 @@ class Channel implements ChannelInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $code;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $name;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $description;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $hostname;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $color;
public function __construct()
diff --git a/src/Sylius/Component/Core/Factory/ChannelFactory.php b/src/Sylius/Component/Core/Factory/ChannelFactory.php
index ba5e5fd31584..0208f58f1376 100644
--- a/src/Sylius/Component/Core/Factory/ChannelFactory.php
+++ b/src/Sylius/Component/Core/Factory/ChannelFactory.php
@@ -31,7 +31,7 @@ public function __construct(FactoryInterface $decoratedFactory, string $defaultC
}
/**
- * {@inheritdoc}
+ * @inheritdoc
*/
public function createNew(): ChannelInterface
{
diff --git a/src/Sylius/Component/Core/Model/Adjustment.php b/src/Sylius/Component/Core/Model/Adjustment.php
index 04e5f7f8d403..7ce5a03df180 100644
--- a/src/Sylius/Component/Core/Model/Adjustment.php
+++ b/src/Sylius/Component/Core/Model/Adjustment.php
@@ -17,9 +17,7 @@
class Adjustment extends BaseAdjustment implements AdjustmentInterface
{
- /**
- * @var ShipmentInterface|null
- */
+ /** @var ShipmentInterface|null */
protected $shipment;
public function getShipment(): ?ShipmentInterface
diff --git a/src/Sylius/Component/Core/Model/AdminUser.php b/src/Sylius/Component/Core/Model/AdminUser.php
index cf7f5a172c61..cfbe775b400b 100644
--- a/src/Sylius/Component/Core/Model/AdminUser.php
+++ b/src/Sylius/Component/Core/Model/AdminUser.php
@@ -17,24 +17,16 @@
class AdminUser extends User implements AdminUserInterface
{
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $firstName;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $lastName;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $localeCode;
- /**
- * @var ImageInterface|null
- */
+ /** @var ImageInterface|null */
protected $avatar;
public function __construct()
diff --git a/src/Sylius/Component/Core/Model/Channel.php b/src/Sylius/Component/Core/Model/Channel.php
index 10138cc4701f..8d61bdb246b3 100644
--- a/src/Sylius/Component/Core/Model/Channel.php
+++ b/src/Sylius/Component/Core/Model/Channel.php
@@ -23,24 +23,16 @@
class Channel extends BaseChannel implements ChannelInterface
{
- /**
- * @var CurrencyInterface|null
- */
+ /** @var CurrencyInterface|null */
protected $baseCurrency;
- /**
- * @var LocaleInterface|null
- */
+ /** @var LocaleInterface|null */
protected $defaultLocale;
- /**
- * @var ZoneInterface|null
- */
+ /** @var ZoneInterface|null */
protected $defaultTaxZone;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $taxCalculationStrategy;
/**
@@ -64,44 +56,28 @@ class Channel extends BaseChannel implements ChannelInterface
*/
protected $countries;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $themeName;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $contactEmail;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $contactPhoneNumber;
- /**
- * @var bool
- */
+ /** @var bool */
protected $skippingShippingStepAllowed = false;
- /**
- * @var bool
- */
+ /** @var bool */
protected $skippingPaymentStepAllowed = false;
- /**
- * @var bool
- */
+ /** @var bool */
protected $accountVerificationRequired = true;
- /**
- * @var ShopBillingDataInterface|null
- */
+ /** @var ShopBillingDataInterface|null */
protected $shopBillingData;
- /**
- * @var TaxonInterface|null
- */
+ /** @var TaxonInterface|null */
protected $menuTaxon;
public function __construct()
diff --git a/src/Sylius/Component/Core/Model/ChannelPricing.php b/src/Sylius/Component/Core/Model/ChannelPricing.php
index ff990a385f2d..8dcf0f95163e 100644
--- a/src/Sylius/Component/Core/Model/ChannelPricing.php
+++ b/src/Sylius/Component/Core/Model/ChannelPricing.php
@@ -16,26 +16,18 @@
class ChannelPricing implements ChannelPricingInterface
{
/** @var mixed */
- protected $id = null;
+ protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $channelCode;
- /**
- * @var ProductVariantInterface|null
- */
+ /** @var ProductVariantInterface|null */
protected $productVariant;
- /**
- * @var int|null
- */
+ /** @var int|null */
protected $price;
- /**
- * @var int|null
- */
+ /** @var int|null */
protected $originalPrice;
public function __toString(): string
diff --git a/src/Sylius/Component/Core/Model/Customer.php b/src/Sylius/Component/Core/Model/Customer.php
index a60dadef3aae..cd510475e73d 100644
--- a/src/Sylius/Component/Core/Model/Customer.php
+++ b/src/Sylius/Component/Core/Model/Customer.php
@@ -28,9 +28,7 @@ class Customer extends BaseCustomer implements CustomerInterface
*/
protected $orders;
- /**
- * @var AddressInterface|null
- */
+ /** @var AddressInterface|null */
protected $defaultAddress;
/**
@@ -40,9 +38,7 @@ class Customer extends BaseCustomer implements CustomerInterface
*/
protected $addresses;
- /**
- * @var ShopUserInterface|null
- */
+ /** @var ShopUserInterface|null */
protected $user;
public function __construct()
diff --git a/src/Sylius/Component/Core/Model/Image.php b/src/Sylius/Component/Core/Model/Image.php
index 0ec557eae6c1..b3cd589aa22b 100644
--- a/src/Sylius/Component/Core/Model/Image.php
+++ b/src/Sylius/Component/Core/Model/Image.php
@@ -16,26 +16,18 @@
abstract class Image implements ImageInterface
{
/** @var mixed */
- protected $id = null;
+ protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $type;
- /**
- * @var \SplFileInfo|null
- */
+ /** @var \SplFileInfo|null */
protected $file;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $path;
- /**
- * @var object|null
- */
+ /** @var object|null */
protected $owner;
public function getId()
diff --git a/src/Sylius/Component/Core/Model/Order.php b/src/Sylius/Component/Core/Model/Order.php
index 86d76db62527..2b67f07ca89b 100644
--- a/src/Sylius/Component/Core/Model/Order.php
+++ b/src/Sylius/Component/Core/Model/Order.php
@@ -29,24 +29,16 @@
class Order extends BaseOrder implements OrderInterface
{
- /**
- * @var \Sylius\Component\Core\Model\CustomerInterface|null
- */
+ /** @var \Sylius\Component\Core\Model\CustomerInterface|null */
protected $customer;
- /**
- * @var \Sylius\Component\Core\Model\ChannelInterface|null
- */
+ /** @var \Sylius\Component\Core\Model\ChannelInterface|null */
protected $channel;
- /**
- * @var AddressInterface|null
- */
+ /** @var AddressInterface|null */
protected $shippingAddress;
- /**
- * @var AddressInterface|null
- */
+ /** @var AddressInterface|null */
protected $billingAddress;
/**
@@ -63,34 +55,22 @@ class Order extends BaseOrder implements OrderInterface
*/
protected $shipments;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $currencyCode;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $localeCode;
- /**
- * @var BaseCouponInterface|null
- */
+ /** @var BaseCouponInterface|null */
protected $promotionCoupon;
- /**
- * @var string
- */
+ /** @var string */
protected $checkoutState = OrderCheckoutStates::STATE_CART;
- /**
- * @var string
- */
+ /** @var string */
protected $paymentState = OrderPaymentStates::STATE_CART;
- /**
- * @var string
- */
+ /** @var string */
protected $shippingState = OrderShippingStates::STATE_CART;
/**
@@ -100,14 +80,10 @@ class Order extends BaseOrder implements OrderInterface
*/
protected $promotions;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $tokenValue;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $customerIp;
protected bool $createdByGuest = true;
diff --git a/src/Sylius/Component/Core/Model/OrderItem.php b/src/Sylius/Component/Core/Model/OrderItem.php
index 5f0bb31d3f67..c6b60cd63b45 100644
--- a/src/Sylius/Component/Core/Model/OrderItem.php
+++ b/src/Sylius/Component/Core/Model/OrderItem.php
@@ -19,24 +19,16 @@
class OrderItem extends BaseOrderItem implements OrderItemInterface
{
- /**
- * @var int
- */
+ /** @var int */
protected $version = 1;
- /**
- * @var ProductVariantInterface|null
- */
+ /** @var ProductVariantInterface|null */
protected $variant;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $productName;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $variantName;
public function getVersion(): ?int
diff --git a/src/Sylius/Component/Core/Model/OrderSequence.php b/src/Sylius/Component/Core/Model/OrderSequence.php
index eadcd3363699..6b648e038046 100644
--- a/src/Sylius/Component/Core/Model/OrderSequence.php
+++ b/src/Sylius/Component/Core/Model/OrderSequence.php
@@ -17,9 +17,7 @@
class OrderSequence extends BaseOrderSequence implements OrderSequenceInterface
{
- /**
- * @var int
- */
+ /** @var int */
protected $version = 1;
public function getVersion(): ?int
diff --git a/src/Sylius/Component/Core/Model/PaymentMethod.php b/src/Sylius/Component/Core/Model/PaymentMethod.php
index 6976cfaaa61b..a53097324466 100644
--- a/src/Sylius/Component/Core/Model/PaymentMethod.php
+++ b/src/Sylius/Component/Core/Model/PaymentMethod.php
@@ -29,9 +29,7 @@ class PaymentMethod extends BasePaymentMethod implements PaymentMethodInterface
*/
protected $channels;
- /**
- * @var GatewayConfigInterface|null
- */
+ /** @var GatewayConfigInterface|null */
protected $gatewayConfig;
public function __construct()
diff --git a/src/Sylius/Component/Core/Model/Product.php b/src/Sylius/Component/Core/Model/Product.php
index 5e6eb76cc8d3..fde8eaf0975a 100644
--- a/src/Sylius/Component/Core/Model/Product.php
+++ b/src/Sylius/Component/Core/Model/Product.php
@@ -20,14 +20,11 @@
use Sylius\Component\Product\Model\ProductTranslationInterface as BaseProductTranslationInterface;
use Sylius\Component\Resource\Model\TranslationInterface;
use Sylius\Component\Review\Model\ReviewInterface;
-use Sylius\Component\Taxonomy\Model\TaxonInterface as BaseTaxonInterface;
use Webmozart\Assert\Assert;
class Product extends BaseProduct implements ProductInterface, ReviewableProductInterface
{
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $variantSelectionMethod = self::VARIANT_SELECTION_CHOICE;
/**
@@ -44,9 +41,7 @@ class Product extends BaseProduct implements ProductInterface, ReviewableProduct
*/
protected $channels;
- /**
- * @var \Sylius\Component\Core\Model\TaxonInterface|null
- */
+ /** @var \Sylius\Component\Core\Model\TaxonInterface|null */
protected $mainTaxon;
/**
@@ -56,9 +51,7 @@ class Product extends BaseProduct implements ProductInterface, ReviewableProduct
*/
protected $reviews;
- /**
- * @var float
- */
+ /** @var float */
protected $averageRating = 0.0;
/**
diff --git a/src/Sylius/Component/Core/Model/ProductTaxon.php b/src/Sylius/Component/Core/Model/ProductTaxon.php
index 8cc64ab7ae3e..3def5036ce76 100644
--- a/src/Sylius/Component/Core/Model/ProductTaxon.php
+++ b/src/Sylius/Component/Core/Model/ProductTaxon.php
@@ -18,19 +18,13 @@ class ProductTaxon implements ProductTaxonInterface
/** @var mixed */
protected $id;
- /**
- * @var ProductInterface|null
- */
+ /** @var ProductInterface|null */
protected $product;
- /**
- * @var TaxonInterface|null
- */
+ /** @var TaxonInterface|null */
protected $taxon;
- /**
- * @var int|null
- */
+ /** @var int|null */
protected $position;
public function getId()
diff --git a/src/Sylius/Component/Core/Model/ProductTranslation.php b/src/Sylius/Component/Core/Model/ProductTranslation.php
index 3e851917ccfd..1d2a95f91af9 100644
--- a/src/Sylius/Component/Core/Model/ProductTranslation.php
+++ b/src/Sylius/Component/Core/Model/ProductTranslation.php
@@ -17,9 +17,7 @@
class ProductTranslation extends BaseProductTranslation implements ProductTranslationInterface
{
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $shortDescription;
public function getShortDescription(): ?string
diff --git a/src/Sylius/Component/Core/Model/ProductVariant.php b/src/Sylius/Component/Core/Model/ProductVariant.php
index ac9afa861edc..2ada188c603d 100644
--- a/src/Sylius/Component/Core/Model/ProductVariant.php
+++ b/src/Sylius/Component/Core/Model/ProductVariant.php
@@ -22,64 +22,40 @@
class ProductVariant extends BaseVariant implements ProductVariantInterface, Comparable
{
- /**
- * @var int
- */
+ /** @var int */
protected $version = 1;
- /**
- * @var int
- */
+ /** @var int */
protected $onHold = 0;
- /**
- * @var int
- */
+ /** @var int */
protected $onHand = 0;
- /**
- * @var bool
- */
+ /** @var bool */
protected $tracked = false;
- /**
- * @var float|null
- */
+ /** @var float|null */
protected $weight;
- /**
- * @var float|null
- */
+ /** @var float|null */
protected $width;
- /**
- * @var float|null
- */
+ /** @var float|null */
protected $height;
- /**
- * @var float|null
- */
+ /** @var float|null */
protected $depth;
- /**
- * @var TaxCategoryInterface|null
- */
+ /** @var TaxCategoryInterface|null */
protected $taxCategory;
- /**
- * @var ShippingCategoryInterface|null
- */
+ /** @var ShippingCategoryInterface|null */
protected $shippingCategory;
- /**
- * @var Collection
- */
+ /** @var Collection */
protected $channelPricings;
- /**
- * @var bool
- */
+ /** @var bool */
protected $shippingRequired = true;
/**
diff --git a/src/Sylius/Component/Core/Model/PromotionCoupon.php b/src/Sylius/Component/Core/Model/PromotionCoupon.php
index fcd305cd2644..06298985cb8e 100644
--- a/src/Sylius/Component/Core/Model/PromotionCoupon.php
+++ b/src/Sylius/Component/Core/Model/PromotionCoupon.php
@@ -17,14 +17,10 @@
class PromotionCoupon extends BasePromotionCoupon implements PromotionCouponInterface
{
- /**
- * @var int|null
- */
+ /** @var int|null */
protected $perCustomerUsageLimit;
- /**
- * @var bool
- */
+ /** @var bool */
protected $reusableFromCancelledOrders = true;
public function getPerCustomerUsageLimit(): ?int
diff --git a/src/Sylius/Component/Core/Model/Shipment.php b/src/Sylius/Component/Core/Model/Shipment.php
index 064b69ee2b15..7d9af9acc654 100644
--- a/src/Sylius/Component/Core/Model/Shipment.php
+++ b/src/Sylius/Component/Core/Model/Shipment.php
@@ -31,9 +31,7 @@ class Shipment extends BaseShipment implements ShipmentInterface
*/
protected $adjustments;
- /**
- * @var int
- */
+ /** @var int */
protected $adjustmentsTotal = 0;
public function __construct()
diff --git a/src/Sylius/Component/Core/Model/ShippingMethod.php b/src/Sylius/Component/Core/Model/ShippingMethod.php
index b79d098f3512..4d6e10ca9c33 100644
--- a/src/Sylius/Component/Core/Model/ShippingMethod.php
+++ b/src/Sylius/Component/Core/Model/ShippingMethod.php
@@ -23,14 +23,10 @@
class ShippingMethod extends BaseShippingMethod implements ShippingMethodInterface
{
- /**
- * @var ZoneInterface|null
- */
+ /** @var ZoneInterface|null */
protected $zone;
- /**
- * @var TaxCategoryInterface|null
- */
+ /** @var TaxCategoryInterface|null */
protected $taxCategory;
/**
diff --git a/src/Sylius/Component/Core/Model/ShopBillingData.php b/src/Sylius/Component/Core/Model/ShopBillingData.php
index 8bf059a4ed25..d253ae978181 100644
--- a/src/Sylius/Component/Core/Model/ShopBillingData.php
+++ b/src/Sylius/Component/Core/Model/ShopBillingData.php
@@ -16,36 +16,24 @@
class ShopBillingData implements ShopBillingDataInterface
{
/** @var mixed */
- protected $id = null;
+ protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $company;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $taxId;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $countryCode;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $street;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $city;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $postcode;
public function getId()
diff --git a/src/Sylius/Component/Core/Model/TaxRate.php b/src/Sylius/Component/Core/Model/TaxRate.php
index 00eada171f27..c46d3030354f 100644
--- a/src/Sylius/Component/Core/Model/TaxRate.php
+++ b/src/Sylius/Component/Core/Model/TaxRate.php
@@ -18,9 +18,7 @@
class TaxRate extends BaseTaxRate implements TaxRateInterface
{
- /**
- * @var ZoneInterface|null
- */
+ /** @var ZoneInterface|null */
protected $zone;
public function getZone(): ?ZoneInterface
diff --git a/src/Sylius/Component/Core/Promotion/Filter/TaxonFilter.php b/src/Sylius/Component/Core/Promotion/Filter/TaxonFilter.php
index 5aa684aee1f4..acd8931d7673 100644
--- a/src/Sylius/Component/Core/Promotion/Filter/TaxonFilter.php
+++ b/src/Sylius/Component/Core/Promotion/Filter/TaxonFilter.php
@@ -14,7 +14,6 @@
namespace Sylius\Component\Core\Promotion\Filter;
use Sylius\Component\Core\Model\ProductInterface;
-use Sylius\Component\Core\Model\TaxonInterface;
final class TaxonFilter implements FilterInterface
{
diff --git a/src/Sylius/Component/Core/Uploader/ImageUploader.php b/src/Sylius/Component/Core/Uploader/ImageUploader.php
index 0a214f7ede21..b88284b94508 100644
--- a/src/Sylius/Component/Core/Uploader/ImageUploader.php
+++ b/src/Sylius/Component/Core/Uploader/ImageUploader.php
@@ -24,6 +24,7 @@
class ImageUploader implements ImageUploaderInterface
{
private const MIME_SVG_XML = 'image/svg+xml';
+
private const MIME_SVG = 'image/svg';
/** @var Filesystem */
diff --git a/src/Sylius/Component/Currency/Model/Currency.php b/src/Sylius/Component/Currency/Model/Currency.php
index 98525c31d16f..f1f31076783a 100644
--- a/src/Sylius/Component/Currency/Model/Currency.php
+++ b/src/Sylius/Component/Currency/Model/Currency.php
@@ -23,9 +23,7 @@ class Currency implements CurrencyInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $code;
public function __construct()
diff --git a/src/Sylius/Component/Currency/Model/ExchangeRate.php b/src/Sylius/Component/Currency/Model/ExchangeRate.php
index 980b8584711d..4ecbbfa46448 100644
--- a/src/Sylius/Component/Currency/Model/ExchangeRate.php
+++ b/src/Sylius/Component/Currency/Model/ExchangeRate.php
@@ -22,19 +22,13 @@ class ExchangeRate implements ExchangeRateInterface
/** @var mixed */
protected $id;
- /**
- * @var float|null
- */
+ /** @var float|null */
protected $ratio;
- /**
- * @var CurrencyInterface|null
- */
+ /** @var CurrencyInterface|null */
protected $sourceCurrency;
- /**
- * @var CurrencyInterface|null
- */
+ /** @var CurrencyInterface|null */
protected $targetCurrency;
public function __construct()
diff --git a/src/Sylius/Component/Customer/Model/Customer.php b/src/Sylius/Component/Customer/Model/Customer.php
index ada5fde94a51..9fa167703398 100644
--- a/src/Sylius/Component/Customer/Model/Customer.php
+++ b/src/Sylius/Component/Customer/Model/Customer.php
@@ -22,49 +22,31 @@ class Customer implements CustomerInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $email;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $emailCanonical;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $firstName;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $lastName;
- /**
- * @var \DateTimeInterface|null
- */
+ /** @var \DateTimeInterface|null */
protected $birthday;
- /**
- * @var string
- */
+ /** @var string */
protected $gender = CustomerInterface::UNKNOWN_GENDER;
- /**
- * @var CustomerGroupInterface|null
- */
+ /** @var CustomerGroupInterface|null */
protected $group;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $phoneNumber;
- /**
- * @var bool
- */
+ /** @var bool */
protected $subscribedToNewsletter = false;
public function __construct()
diff --git a/src/Sylius/Component/Customer/Model/CustomerGroup.php b/src/Sylius/Component/Customer/Model/CustomerGroup.php
index d0fa80ebf65e..270b900ad3e1 100644
--- a/src/Sylius/Component/Customer/Model/CustomerGroup.php
+++ b/src/Sylius/Component/Customer/Model/CustomerGroup.php
@@ -18,14 +18,10 @@ class CustomerGroup implements CustomerGroupInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $code;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $name;
public function __toString(): string
diff --git a/src/Sylius/Component/Inventory/Model/InventoryUnit.php b/src/Sylius/Component/Inventory/Model/InventoryUnit.php
index 65dc46e94a5f..a5c62a1ce934 100644
--- a/src/Sylius/Component/Inventory/Model/InventoryUnit.php
+++ b/src/Sylius/Component/Inventory/Model/InventoryUnit.php
@@ -18,9 +18,7 @@ class InventoryUnit implements InventoryUnitInterface
/** @var mixed */
protected $id;
- /**
- * @var StockableInterface|null
- */
+ /** @var StockableInterface|null */
protected $stockable;
public function getId()
diff --git a/src/Sylius/Component/Locale/Model/Locale.php b/src/Sylius/Component/Locale/Model/Locale.php
index ee1ad2c30b98..7ce9dddc40ca 100644
--- a/src/Sylius/Component/Locale/Model/Locale.php
+++ b/src/Sylius/Component/Locale/Model/Locale.php
@@ -20,12 +20,10 @@ class Locale implements LocaleInterface
{
use TimestampableTrait;
- /** @var mixed */
- protected $id = null;
+ /** @var mixed */
+ protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $code;
public function __construct()
diff --git a/src/Sylius/Component/Order/Model/Adjustment.php b/src/Sylius/Component/Order/Model/Adjustment.php
index 175ef9f53d65..dddb257e0926 100644
--- a/src/Sylius/Component/Order/Model/Adjustment.php
+++ b/src/Sylius/Component/Order/Model/Adjustment.php
@@ -22,54 +22,34 @@ class Adjustment implements AdjustmentInterface
/** @var mixed */
protected $id;
- /**
- * @var OrderInterface|null
- */
+ /** @var OrderInterface|null */
protected $order;
- /**
- * @var OrderItemInterface|null
- */
+ /** @var OrderItemInterface|null */
protected $orderItem;
- /**
- * @var OrderItemUnitInterface|null
- */
+ /** @var OrderItemUnitInterface|null */
protected $orderItemUnit;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $type;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $label;
- /**
- * @var int
- */
+ /** @var int */
protected $amount = 0;
- /**
- * @var bool
- */
+ /** @var bool */
protected $neutral = false;
- /**
- * @var bool
- */
+ /** @var bool */
protected $locked = false;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $originCode;
- /**
- * @var mixed[]
- */
+ /** @var mixed[] */
protected $details = [];
public function __construct()
diff --git a/src/Sylius/Component/Order/Model/Order.php b/src/Sylius/Component/Order/Model/Order.php
index 4f830bf80a87..48919dc3db5b 100644
--- a/src/Sylius/Component/Order/Model/Order.php
+++ b/src/Sylius/Component/Order/Model/Order.php
@@ -24,19 +24,13 @@ class Order implements OrderInterface
/** @var mixed */
protected $id;
- /**
- * @var \DateTimeInterface|null
- */
+ /** @var \DateTimeInterface|null */
protected $checkoutCompletedAt;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $number;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $notes;
/**
@@ -46,9 +40,7 @@ class Order implements OrderInterface
*/
protected $items;
- /**
- * @var int
- */
+ /** @var int */
protected $itemsTotal = 0;
/**
@@ -58,20 +50,17 @@ class Order implements OrderInterface
*/
protected $adjustments;
- /**
- * @var int
- */
+ /** @var int */
protected $adjustmentsTotal = 0;
/**
* Items total + adjustments total.
+ *
* @var int
*/
protected $total = 0;
- /**
- * @var string
- */
+ /** @var string */
protected $state = OrderInterface::STATE_CART;
public function __construct()
diff --git a/src/Sylius/Component/Order/Model/OrderItem.php b/src/Sylius/Component/Order/Model/OrderItem.php
index 840379a35b06..72a451a10e58 100644
--- a/src/Sylius/Component/Order/Model/OrderItem.php
+++ b/src/Sylius/Component/Order/Model/OrderItem.php
@@ -21,29 +21,19 @@ class OrderItem implements OrderItemInterface
/** @var mixed */
protected $id;
- /**
- * @var OrderInterface|null
- */
+ /** @var OrderInterface|null */
protected $order;
- /**
- * @var int
- */
+ /** @var int */
protected $quantity = 0;
- /**
- * @var int
- */
+ /** @var int */
protected $unitPrice = 0;
- /**
- * @var int
- */
+ /** @var int */
protected $total = 0;
- /**
- * @var bool
- */
+ /** @var bool */
protected $immutable = false;
/**
@@ -53,9 +43,7 @@ class OrderItem implements OrderItemInterface
*/
protected $units;
- /**
- * @var int
- */
+ /** @var int */
protected $unitsTotal = 0;
/**
@@ -65,9 +53,7 @@ class OrderItem implements OrderItemInterface
*/
protected $adjustments;
- /**
- * @var int
- */
+ /** @var int */
protected $adjustmentsTotal = 0;
public function __construct()
diff --git a/src/Sylius/Component/Order/Model/OrderItemUnit.php b/src/Sylius/Component/Order/Model/OrderItemUnit.php
index 31013e3ad755..f0b21ce413ef 100644
--- a/src/Sylius/Component/Order/Model/OrderItemUnit.php
+++ b/src/Sylius/Component/Order/Model/OrderItemUnit.php
@@ -19,11 +19,9 @@
class OrderItemUnit implements OrderItemUnitInterface
{
/** @var mixed */
- protected $id = null;
+ protected $id;
- /**
- * @var OrderItemInterface
- */
+ /** @var OrderItemInterface */
protected $orderItem;
/**
@@ -33,9 +31,7 @@ class OrderItemUnit implements OrderItemUnitInterface
*/
protected $adjustments;
- /**
- * @var int
- */
+ /** @var int */
protected $adjustmentsTotal = 0;
public function __construct(OrderItemInterface $orderItem)
diff --git a/src/Sylius/Component/Order/Model/OrderSequence.php b/src/Sylius/Component/Order/Model/OrderSequence.php
index 81a6bfbb71bd..678c5a8d74a6 100644
--- a/src/Sylius/Component/Order/Model/OrderSequence.php
+++ b/src/Sylius/Component/Order/Model/OrderSequence.php
@@ -18,9 +18,7 @@ class OrderSequence implements OrderSequenceInterface
/** @var mixed */
protected $id;
- /**
- * @var int
- */
+ /** @var int */
protected $index = 0;
public function getId()
diff --git a/src/Sylius/Component/Payment/Model/Payment.php b/src/Sylius/Component/Payment/Model/Payment.php
index fcf234e86b28..c1b24deba3fa 100644
--- a/src/Sylius/Component/Payment/Model/Payment.php
+++ b/src/Sylius/Component/Payment/Model/Payment.php
@@ -22,29 +22,19 @@ class Payment implements PaymentInterface
/** @var mixed */
protected $id;
- /**
- * @var PaymentMethodInterface|null
- */
+ /** @var PaymentMethodInterface|null */
protected $method;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $currencyCode;
- /**
- * @var int
- */
+ /** @var int */
protected $amount = 0;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $state = PaymentInterface::STATE_CART;
- /**
- * @var mixed[]
- */
+ /** @var mixed[] */
protected $details = [];
public function __construct()
diff --git a/src/Sylius/Component/Payment/Model/PaymentMethod.php b/src/Sylius/Component/Payment/Model/PaymentMethod.php
index 24bcd74bcffd..f7d7286f9b4b 100644
--- a/src/Sylius/Component/Payment/Model/PaymentMethod.php
+++ b/src/Sylius/Component/Payment/Model/PaymentMethod.php
@@ -29,19 +29,13 @@ class PaymentMethod implements PaymentMethodInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $code;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $environment;
- /**
- * @var int|null
- */
+ /** @var int|null */
protected $position;
public function __construct()
diff --git a/src/Sylius/Component/Payment/Model/PaymentMethodTranslation.php b/src/Sylius/Component/Payment/Model/PaymentMethodTranslation.php
index df3d310f58ec..5c926433b999 100644
--- a/src/Sylius/Component/Payment/Model/PaymentMethodTranslation.php
+++ b/src/Sylius/Component/Payment/Model/PaymentMethodTranslation.php
@@ -20,19 +20,13 @@ class PaymentMethodTranslation extends AbstractTranslation implements PaymentMet
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $name;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $description;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $instructions;
public function __toString(): string
diff --git a/src/Sylius/Component/Product/Model/Product.php b/src/Sylius/Component/Product/Model/Product.php
index cce4e876f617..7b86fc798404 100644
--- a/src/Sylius/Component/Product/Model/Product.php
+++ b/src/Sylius/Component/Product/Model/Product.php
@@ -33,9 +33,7 @@ class Product implements ProductInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $code;
/**
diff --git a/src/Sylius/Component/Product/Model/ProductAssociation.php b/src/Sylius/Component/Product/Model/ProductAssociation.php
index 4c2d7da5c741..5c0511a511de 100644
--- a/src/Sylius/Component/Product/Model/ProductAssociation.php
+++ b/src/Sylius/Component/Product/Model/ProductAssociation.php
@@ -24,14 +24,10 @@ class ProductAssociation implements ProductAssociationInterface
/** @var mixed */
protected $id;
- /**
- * @var ProductAssociationTypeInterface|null
- */
+ /** @var ProductAssociationTypeInterface|null */
protected $type;
- /**
- * @var ProductInterface|null
- */
+ /** @var ProductInterface|null */
protected $owner;
/**
diff --git a/src/Sylius/Component/Product/Model/ProductAssociationType.php b/src/Sylius/Component/Product/Model/ProductAssociationType.php
index 72e6db63fdcf..b3eafba89c83 100644
--- a/src/Sylius/Component/Product/Model/ProductAssociationType.php
+++ b/src/Sylius/Component/Product/Model/ProductAssociationType.php
@@ -26,16 +26,12 @@ class ProductAssociationType implements ProductAssociationTypeInterface
}
/** @var mixed */
- protected $id = null;
+ protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $code;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $name;
public function __construct()
diff --git a/src/Sylius/Component/Product/Model/ProductAssociationTypeTranslation.php b/src/Sylius/Component/Product/Model/ProductAssociationTypeTranslation.php
index eab6e3bfbee0..5d102e7e4ff9 100644
--- a/src/Sylius/Component/Product/Model/ProductAssociationTypeTranslation.php
+++ b/src/Sylius/Component/Product/Model/ProductAssociationTypeTranslation.php
@@ -20,9 +20,7 @@ class ProductAssociationTypeTranslation extends AbstractTranslation implements P
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $name;
public function getId()
diff --git a/src/Sylius/Component/Product/Model/ProductOption.php b/src/Sylius/Component/Product/Model/ProductOption.php
index 5cbe89c77e73..86d24c544e57 100644
--- a/src/Sylius/Component/Product/Model/ProductOption.php
+++ b/src/Sylius/Component/Product/Model/ProductOption.php
@@ -30,14 +30,10 @@ class ProductOption implements ProductOptionInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $code;
- /**
- * @var int|null
- */
+ /** @var int|null */
protected $position;
/**
diff --git a/src/Sylius/Component/Product/Model/ProductOptionTranslation.php b/src/Sylius/Component/Product/Model/ProductOptionTranslation.php
index 71c2b84cd1e0..d07d2657199a 100644
--- a/src/Sylius/Component/Product/Model/ProductOptionTranslation.php
+++ b/src/Sylius/Component/Product/Model/ProductOptionTranslation.php
@@ -20,9 +20,7 @@ class ProductOptionTranslation extends AbstractTranslation implements ProductOpt
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $name;
public function getId()
diff --git a/src/Sylius/Component/Product/Model/ProductOptionValue.php b/src/Sylius/Component/Product/Model/ProductOptionValue.php
index 08114d7f78af..e7b2cb14815c 100644
--- a/src/Sylius/Component/Product/Model/ProductOptionValue.php
+++ b/src/Sylius/Component/Product/Model/ProductOptionValue.php
@@ -26,14 +26,10 @@ class ProductOptionValue implements ProductOptionValueInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $code;
- /**
- * @var ProductOptionInterface|null
- */
+ /** @var ProductOptionInterface|null */
protected $option;
public function __construct()
diff --git a/src/Sylius/Component/Product/Model/ProductOptionValueTranslation.php b/src/Sylius/Component/Product/Model/ProductOptionValueTranslation.php
index 7caf138e8170..b5c269355e2b 100644
--- a/src/Sylius/Component/Product/Model/ProductOptionValueTranslation.php
+++ b/src/Sylius/Component/Product/Model/ProductOptionValueTranslation.php
@@ -20,9 +20,7 @@ class ProductOptionValueTranslation extends AbstractTranslation implements Produ
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $value;
public function getId()
diff --git a/src/Sylius/Component/Product/Model/ProductTranslation.php b/src/Sylius/Component/Product/Model/ProductTranslation.php
index 9b39a9ffd02d..c63254206f47 100644
--- a/src/Sylius/Component/Product/Model/ProductTranslation.php
+++ b/src/Sylius/Component/Product/Model/ProductTranslation.php
@@ -20,29 +20,19 @@ class ProductTranslation extends AbstractTranslation implements ProductTranslati
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $name;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $slug;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $description;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $metaKeywords;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $metaDescription;
public function getId()
diff --git a/src/Sylius/Component/Product/Model/ProductVariant.php b/src/Sylius/Component/Product/Model/ProductVariant.php
index 5aabe8012c66..27e013e966ee 100644
--- a/src/Sylius/Component/Product/Model/ProductVariant.php
+++ b/src/Sylius/Component/Product/Model/ProductVariant.php
@@ -31,14 +31,10 @@ class ProductVariant implements ProductVariantInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $code;
- /**
- * @var ProductInterface|null
- */
+ /** @var ProductInterface|null */
protected $product;
/**
@@ -48,9 +44,7 @@ class ProductVariant implements ProductVariantInterface
*/
protected $optionValues;
- /**
- * @var int|null
- */
+ /** @var int|null */
protected $position;
public function __construct()
diff --git a/src/Sylius/Component/Product/Model/ProductVariantTranslation.php b/src/Sylius/Component/Product/Model/ProductVariantTranslation.php
index 33fd58dd0df0..bd7b41316fd9 100644
--- a/src/Sylius/Component/Product/Model/ProductVariantTranslation.php
+++ b/src/Sylius/Component/Product/Model/ProductVariantTranslation.php
@@ -20,9 +20,7 @@ class ProductVariantTranslation extends AbstractTranslation implements ProductVa
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $name;
public function getId()
diff --git a/src/Sylius/Component/Promotion/Model/Promotion.php b/src/Sylius/Component/Promotion/Model/Promotion.php
index 38486c628453..3f3bd7ca5253 100644
--- a/src/Sylius/Component/Promotion/Model/Promotion.php
+++ b/src/Sylius/Component/Promotion/Model/Promotion.php
@@ -24,56 +24,42 @@ class Promotion implements PromotionInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $code;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $name;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $description;
/**
* When exclusive, promotion with top priority will be applied
+ *
* @var int
*/
protected $priority = 0;
/**
* Cannot be applied together with other promotions
+ *
* @var bool
*/
protected $exclusive = false;
- /**
- * @var int|null
- */
+ /** @var int|null */
protected $usageLimit;
- /**
- * @var int
- */
+ /** @var int */
protected $used = 0;
- /**
- * @var \DateTimeInterface|null
- */
+ /** @var \DateTimeInterface|null */
protected $startsAt;
- /**
- * @var \DateTimeInterface|null
- */
+ /** @var \DateTimeInterface|null */
protected $endsAt;
- /**
- * @var bool
- */
+ /** @var bool */
protected $couponBased = false;
/**
diff --git a/src/Sylius/Component/Promotion/Model/PromotionAction.php b/src/Sylius/Component/Promotion/Model/PromotionAction.php
index 06c7cc746503..7b380b646a48 100644
--- a/src/Sylius/Component/Promotion/Model/PromotionAction.php
+++ b/src/Sylius/Component/Promotion/Model/PromotionAction.php
@@ -18,19 +18,13 @@ class PromotionAction implements PromotionActionInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $type;
- /**
- * @var mixed[]
- */
+ /** @var mixed[] */
protected $configuration = [];
- /**
- * @var PromotionInterface|null
- */
+ /** @var PromotionInterface|null */
protected $promotion;
public function getId()
diff --git a/src/Sylius/Component/Promotion/Model/PromotionCoupon.php b/src/Sylius/Component/Promotion/Model/PromotionCoupon.php
index 0a77ecfbf8e8..780dd8b4468a 100644
--- a/src/Sylius/Component/Promotion/Model/PromotionCoupon.php
+++ b/src/Sylius/Component/Promotion/Model/PromotionCoupon.php
@@ -22,29 +22,19 @@ class PromotionCoupon implements PromotionCouponInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $code;
- /**
- * @var int|null
- */
+ /** @var int|null */
protected $usageLimit;
- /**
- * @var int
- */
+ /** @var int */
protected $used = 0;
- /**
- * @var PromotionInterface|null
- */
+ /** @var PromotionInterface|null */
protected $promotion;
- /**
- * @var \DateTimeInterface|null
- */
+ /** @var \DateTimeInterface|null */
protected $expiresAt;
public function getId()
diff --git a/src/Sylius/Component/Promotion/Model/PromotionRule.php b/src/Sylius/Component/Promotion/Model/PromotionRule.php
index 223653ffcbe8..02e55bdfc220 100644
--- a/src/Sylius/Component/Promotion/Model/PromotionRule.php
+++ b/src/Sylius/Component/Promotion/Model/PromotionRule.php
@@ -18,19 +18,13 @@ class PromotionRule implements PromotionRuleInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $type;
- /**
- * @var mixed[]
- */
+ /** @var mixed[] */
protected $configuration = [];
- /**
- * @var PromotionInterface|null
- */
+ /** @var PromotionInterface|null */
protected $promotion;
public function getId()
diff --git a/src/Sylius/Component/Review/Model/Review.php b/src/Sylius/Component/Review/Model/Review.php
index 6bcb29734518..8f0c6d854839 100644
--- a/src/Sylius/Component/Review/Model/Review.php
+++ b/src/Sylius/Component/Review/Model/Review.php
@@ -20,36 +20,24 @@ class Review implements ReviewInterface
use TimestampableTrait;
/** @var mixed */
- protected $id = null;
+ protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $title;
- /**
- * @var int|null
- */
+ /** @var int|null */
protected $rating;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $comment;
- /**
- * @var ReviewerInterface|null
- */
+ /** @var ReviewerInterface|null */
protected $author;
- /**
- * @var string
- */
+ /** @var string */
protected $status = ReviewInterface::STATUS_NEW;
- /**
- * @var ReviewableInterface|null
- */
+ /** @var ReviewableInterface|null */
protected $reviewSubject;
public function __construct()
diff --git a/src/Sylius/Component/Review/Model/Reviewer.php b/src/Sylius/Component/Review/Model/Reviewer.php
index d45cf673fa38..73e314ba8778 100644
--- a/src/Sylius/Component/Review/Model/Reviewer.php
+++ b/src/Sylius/Component/Review/Model/Reviewer.php
@@ -16,21 +16,15 @@
class Reviewer implements ReviewerInterface
{
/** @var mixed */
- protected $id = null;
+ protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $email;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $firstName;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $lastName;
/**
diff --git a/src/Sylius/Component/Shipping/Model/Shipment.php b/src/Sylius/Component/Shipping/Model/Shipment.php
index 27efeca64b08..5d32f74ded56 100644
--- a/src/Sylius/Component/Shipping/Model/Shipment.php
+++ b/src/Sylius/Component/Shipping/Model/Shipment.php
@@ -24,14 +24,10 @@ class Shipment implements ShipmentInterface
/** @var mixed */
protected $id;
- /**
- * @var string
- */
+ /** @var string */
protected $state = ShipmentInterface::STATE_CART;
- /**
- * @var ShippingMethodInterface|null
- */
+ /** @var ShippingMethodInterface|null */
protected $method;
/**
@@ -41,14 +37,10 @@ class Shipment implements ShipmentInterface
*/
protected $units;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $tracking;
- /**
- * @var \DateTimeInterface|null
- */
+ /** @var \DateTimeInterface|null */
protected $shippedAt;
public function __construct()
diff --git a/src/Sylius/Component/Shipping/Model/ShipmentUnit.php b/src/Sylius/Component/Shipping/Model/ShipmentUnit.php
index ffb5f4cf8233..21be5a6d46b4 100644
--- a/src/Sylius/Component/Shipping/Model/ShipmentUnit.php
+++ b/src/Sylius/Component/Shipping/Model/ShipmentUnit.php
@@ -22,14 +22,10 @@ class ShipmentUnit implements ShipmentUnitInterface
/** @var mixed */
protected $id;
- /**
- * @var ShipmentInterface|null
- */
+ /** @var ShipmentInterface|null */
protected $shipment;
- /**
- * @var ShippableInterface|null
- */
+ /** @var ShippableInterface|null */
protected $shippable;
public function __construct()
diff --git a/src/Sylius/Component/Shipping/Model/ShippingCategory.php b/src/Sylius/Component/Shipping/Model/ShippingCategory.php
index 2cfb9f11dcf5..4df09c4db079 100644
--- a/src/Sylius/Component/Shipping/Model/ShippingCategory.php
+++ b/src/Sylius/Component/Shipping/Model/ShippingCategory.php
@@ -22,19 +22,13 @@ class ShippingCategory implements ShippingCategoryInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $code;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $name;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $description;
public function __construct()
diff --git a/src/Sylius/Component/Shipping/Model/ShippingMethod.php b/src/Sylius/Component/Shipping/Model/ShippingMethod.php
index 8fcc12367d23..fb365a7ef04b 100644
--- a/src/Sylius/Component/Shipping/Model/ShippingMethod.php
+++ b/src/Sylius/Component/Shipping/Model/ShippingMethod.php
@@ -32,34 +32,22 @@ class ShippingMethod implements ShippingMethodInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $code;
- /**
- * @var int|null
- */
+ /** @var int|null */
protected $position;
- /**
- * @var ShippingCategoryInterface|null
- */
+ /** @var ShippingCategoryInterface|null */
protected $category;
- /**
- * @var int
- */
+ /** @var int */
protected $categoryRequirement = ShippingMethodInterface::CATEGORY_REQUIREMENT_MATCH_ANY;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $calculator;
- /**
- * @var mixed[]
- */
+ /** @var mixed[] */
protected $configuration = [];
/**
diff --git a/src/Sylius/Component/Shipping/Model/ShippingMethodRule.php b/src/Sylius/Component/Shipping/Model/ShippingMethodRule.php
index d6717fcb5b8b..c26ee68aa4da 100644
--- a/src/Sylius/Component/Shipping/Model/ShippingMethodRule.php
+++ b/src/Sylius/Component/Shipping/Model/ShippingMethodRule.php
@@ -21,19 +21,13 @@ class ShippingMethodRule implements ShippingMethodRuleInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $type;
- /**
- * @var mixed[]
- */
+ /** @var mixed[] */
protected $configuration = [];
- /**
- * @var ShippingMethodInterface|null
- */
+ /** @var ShippingMethodInterface|null */
protected $shippingMethod;
public function getId()
diff --git a/src/Sylius/Component/Shipping/Model/ShippingMethodTranslation.php b/src/Sylius/Component/Shipping/Model/ShippingMethodTranslation.php
index 9d0a3a3df89e..833957518708 100644
--- a/src/Sylius/Component/Shipping/Model/ShippingMethodTranslation.php
+++ b/src/Sylius/Component/Shipping/Model/ShippingMethodTranslation.php
@@ -20,14 +20,10 @@ class ShippingMethodTranslation extends AbstractTranslation implements ShippingM
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $name;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $description;
public function __toString(): string
diff --git a/src/Sylius/Component/Taxation/Model/TaxCategory.php b/src/Sylius/Component/Taxation/Model/TaxCategory.php
index 4fe4e20d5f6e..68a5ec32f22a 100644
--- a/src/Sylius/Component/Taxation/Model/TaxCategory.php
+++ b/src/Sylius/Component/Taxation/Model/TaxCategory.php
@@ -24,19 +24,13 @@ class TaxCategory implements TaxCategoryInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $code;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $name;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $description;
/**
diff --git a/src/Sylius/Component/Taxation/Model/TaxRate.php b/src/Sylius/Component/Taxation/Model/TaxRate.php
index 580a0c2115c4..4e251fed1258 100644
--- a/src/Sylius/Component/Taxation/Model/TaxRate.php
+++ b/src/Sylius/Component/Taxation/Model/TaxRate.php
@@ -22,34 +22,22 @@ class TaxRate implements TaxRateInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $code;
- /**
- * @var TaxCategoryInterface|null
- */
+ /** @var TaxCategoryInterface|null */
protected $category;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $name;
- /**
- * @var float|null
- */
+ /** @var float|null */
protected $amount = 0.0;
- /**
- * @var bool
- */
+ /** @var bool */
protected $includedInPrice = false;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $calculator;
public function __construct()
diff --git a/src/Sylius/Component/Taxonomy/Model/Taxon.php b/src/Sylius/Component/Taxonomy/Model/Taxon.php
index 8f960b7a7f2a..cdac48ba33c1 100644
--- a/src/Sylius/Component/Taxonomy/Model/Taxon.php
+++ b/src/Sylius/Component/Taxonomy/Model/Taxon.php
@@ -30,19 +30,13 @@ class Taxon implements TaxonInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $code;
- /**
- * @var TaxonInterface|null
- */
+ /** @var TaxonInterface|null */
protected $root;
- /**
- * @var TaxonInterface|null
- */
+ /** @var TaxonInterface|null */
protected $parent;
/**
@@ -52,24 +46,16 @@ class Taxon implements TaxonInterface
*/
protected $children;
- /**
- * @var int|null
- */
+ /** @var int|null */
protected $left;
- /**
- * @var int|null
- */
+ /** @var int|null */
protected $right;
- /**
- * @var int|null
- */
+ /** @var int|null */
protected $level;
- /**
- * @var int|null
- */
+ /** @var int|null */
protected $position;
public function __construct()
diff --git a/src/Sylius/Component/Taxonomy/Model/TaxonTranslation.php b/src/Sylius/Component/Taxonomy/Model/TaxonTranslation.php
index d1995696c94d..929c1bc09eeb 100644
--- a/src/Sylius/Component/Taxonomy/Model/TaxonTranslation.php
+++ b/src/Sylius/Component/Taxonomy/Model/TaxonTranslation.php
@@ -20,19 +20,13 @@ class TaxonTranslation extends AbstractTranslation implements TaxonTranslationIn
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $name;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $slug;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $description;
public function __toString(): string
diff --git a/src/Sylius/Component/User/Model/User.php b/src/Sylius/Component/User/Model/User.php
index 96c0d58fc1b0..34483e077209 100644
--- a/src/Sylius/Component/User/Model/User.php
+++ b/src/Sylius/Component/User/Model/User.php
@@ -25,79 +25,72 @@ class User implements UserInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $username;
/**
* Normalized representation of a username.
+ *
* @var string|null
*/
protected $usernameCanonical;
/**
* Random data that is used as an additional input to a function that hashes a password.
+ *
* @var string
*/
protected $salt;
/**
* Encrypted password. Must be persisted.
+ *
* @var string|null
*/
protected $password;
/**
* Password before encryption. Used for model validation. Must not be persisted.
+ *
* @var string|null
*/
protected $plainPassword;
- /**
- * @var \DateTimeInterface|null
- */
+ /** @var \DateTimeInterface|null */
protected $lastLogin;
/**
* Random string sent to the user email address in order to verify it
+ *
* @var string|null
*/
protected $emailVerificationToken;
/**
* Random string sent to the user email address in order to verify the password resetting request
+ *
* @var string|null
*/
protected $passwordResetToken;
- /**
- * @var \DateTimeInterface|null
- */
+ /** @var \DateTimeInterface|null */
protected $passwordRequestedAt;
- /**
- * @var \DateTimeInterface|null
- */
+ /** @var \DateTimeInterface|null */
protected $verifiedAt;
- /**
- * @var bool
- */
+ /** @var bool */
protected $locked = false;
- /**
- * @var \DateTimeInterface|null
- */
+ /** @var \DateTimeInterface|null */
protected $expiresAt;
- /**
- * @var \DateTimeInterface|null
- */
+ /** @var \DateTimeInterface|null */
protected $credentialsExpireAt;
/**
* We need at least one role to be able to authenticate
+ *
* @var mixed[]
*/
protected $roles = [UserInterface::DEFAULT_ROLE];
@@ -109,19 +102,13 @@ class User implements UserInterface
*/
protected $oauthAccounts;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $email;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $emailCanonical;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $encoderName;
public function __construct()
diff --git a/src/Sylius/Component/User/Model/UserOAuth.php b/src/Sylius/Component/User/Model/UserOAuth.php
index 2cd79b639333..cfe89e2063fc 100644
--- a/src/Sylius/Component/User/Model/UserOAuth.php
+++ b/src/Sylius/Component/User/Model/UserOAuth.php
@@ -18,29 +18,19 @@ class UserOAuth implements UserOAuthInterface
/** @var mixed */
protected $id;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $provider;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $identifier;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $accessToken;
- /**
- * @var string|null
- */
+ /** @var string|null */
protected $refreshToken;
- /**
- * @var UserInterface|null
- */
+ /** @var UserInterface|null */
protected $user;
public function getId()
diff --git a/symfony.lock b/symfony.lock
index 36ba06c58d23..b0d74dabdddc 100644
--- a/symfony.lock
+++ b/symfony.lock
@@ -558,12 +558,12 @@
"ref": "8273133183506fe6ec66895e8890227b0dfba1c7"
}
},
- "sonata-project/twig-extensions": {
- "version": "1.4.1"
- },
"squizlabs/php_codesniffer": {
"version": "3.3.1"
},
+ "stella-maris/clock": {
+ "version": "0.1.4"
+ },
"stof/doctrine-extensions-bundle": {
"version": "1.2",
"recipe": {