diff --git a/src/Sylius/Behat/Behaviour/Toggles.php b/src/Sylius/Behat/Behaviour/Toggles.php
index 517175b0414..d68fdae22bd 100644
--- a/src/Sylius/Behat/Behaviour/Toggles.php
+++ b/src/Sylius/Behat/Behaviour/Toggles.php
@@ -52,7 +52,7 @@ private function assertCheckboxState(NodeElement $toggleableElement, $expectedSt
throw new \RuntimeException(sprintf(
"Toggleable element state is '%s' but expected '%s'.",
$toggleableElement->isChecked() ? 'true' : 'false',
- $expectedState ? 'true' : 'false'
+ $expectedState ? 'true' : 'false',
));
}
}
diff --git a/src/Sylius/Behat/Client/ApiPlatformClient.php b/src/Sylius/Behat/Client/ApiPlatformClient.php
index ff060f48221..b8c553cdc2c 100644
--- a/src/Sylius/Behat/Client/ApiPlatformClient.php
+++ b/src/Sylius/Behat/Client/ApiPlatformClient.php
@@ -38,7 +38,7 @@ public function __construct(
SharedStorageInterface $sharedStorage,
string $authorizationHeader,
string $resource,
- ?string $section = null
+ ?string $section = null,
) {
$this->client = $client;
$this->sharedStorage = $sharedStorage;
@@ -77,7 +77,7 @@ public function show(string $id): Response
$this->resource,
$id,
$this->authorizationHeader,
- $this->getToken()
+ $this->getToken(),
));
}
@@ -98,7 +98,7 @@ public function delete(string $id): Response
$this->resource,
$id,
$this->authorizationHeader,
- $this->getToken()
+ $this->getToken(),
));
}
@@ -167,7 +167,7 @@ public function buildUpdateRequest(string $id): void
$this->resource,
$id,
$this->authorizationHeader,
- $this->getToken()
+ $this->getToken(),
);
$this->request->setContent(json_decode($this->client->getResponse()->getContent(), true));
}
@@ -179,7 +179,7 @@ public function buildCustomUpdateRequest(string $id, string $customSuffix): void
$this->resource,
sprintf('%s/%s', $id, $customSuffix),
$this->authorizationHeader,
- $this->getToken()
+ $this->getToken(),
);
}
@@ -263,7 +263,7 @@ private function request(RequestInterface $request): Response
$request->parameters(),
$request->files(),
$request->headers(),
- $request->content() ?? null
+ $request->content() ?? null,
);
return $this->getLastResponse();
diff --git a/src/Sylius/Behat/Client/ApiPlatformIriClient.php b/src/Sylius/Behat/Client/ApiPlatformIriClient.php
index a01edb23ae9..ea9c75e0122 100644
--- a/src/Sylius/Behat/Client/ApiPlatformIriClient.php
+++ b/src/Sylius/Behat/Client/ApiPlatformIriClient.php
@@ -29,7 +29,7 @@ final class ApiPlatformIriClient implements ApiIriClientInterface
public function __construct(
AbstractBrowser $client,
SharedStorageInterface $sharedStorage,
- string $authorizationHeader
+ string $authorizationHeader,
) {
$this->client = $client;
$this->sharedStorage = $sharedStorage;
@@ -52,7 +52,7 @@ private function request(RequestInterface $request): Response
$request->parameters(),
$request->files(),
$request->headers(),
- $request->content() ?? null
+ $request->content() ?? null,
);
return $this->client->getResponse();
diff --git a/src/Sylius/Behat/Client/ApiPlatformSecurityClient.php b/src/Sylius/Behat/Client/ApiPlatformSecurityClient.php
index 9896c5f3f7e..d51584aa93c 100644
--- a/src/Sylius/Behat/Client/ApiPlatformSecurityClient.php
+++ b/src/Sylius/Behat/Client/ApiPlatformSecurityClient.php
@@ -58,7 +58,7 @@ public function call(): void
[],
[],
['CONTENT_TYPE' => 'application/json', 'HTTP_ACCEPT' => 'application/json'],
- json_encode($this->request['body'])
+ json_encode($this->request['body']),
);
$response = $this->client->getResponse();
diff --git a/src/Sylius/Behat/Client/Request.php b/src/Sylius/Behat/Client/Request.php
index 1558d2fae9e..e2ae1845924 100644
--- a/src/Sylius/Behat/Client/Request.php
+++ b/src/Sylius/Behat/Client/Request.php
@@ -43,14 +43,14 @@ public static function index(
?string $section,
string $resource,
string $authorizationHeader,
- ?string $token = null
+ ?string $token = null,
): RequestInterface {
$headers = $token ? ['HTTP_' . $authorizationHeader => 'Bearer ' . $token] : [];
return new self(
sprintf('/api/v2/%s%s', self::prepareSection($section), $resource),
HttpRequest::METHOD_GET,
- $headers
+ $headers,
);
}
@@ -58,7 +58,7 @@ public static function subResourceIndex(?string $section, string $resource, stri
{
return new self(
sprintf('/api/v2/%s%s/%s/%s', self::prepareSection($section), $resource, $id, $subResource),
- HttpRequest::METHOD_GET
+ HttpRequest::METHOD_GET,
);
}
@@ -67,14 +67,14 @@ public static function show(
string $resource,
string $id,
string $authorizationHeader,
- ?string $token = null
+ ?string $token = null,
): RequestInterface {
$headers = $token ? ['HTTP_' . $authorizationHeader => 'Bearer ' . $token] : [];
return new self(
sprintf('/api/v2/%s%s/%s', self::prepareSection($section), $resource, $id),
HttpRequest::METHOD_GET,
- $headers
+ $headers,
);
}
@@ -82,7 +82,7 @@ public static function create(
?string $section,
string $resource,
string $authorizationHeader,
- ?string $token = null
+ ?string $token = null,
): RequestInterface {
$headers = ['CONTENT_TYPE' => 'application/ld+json'];
if ($token !== null) {
@@ -92,7 +92,7 @@ public static function create(
return new self(
sprintf('/api/v2/%s%s', self::prepareSection($section), $resource),
HttpRequest::METHOD_POST,
- $headers
+ $headers,
);
}
@@ -101,7 +101,7 @@ public static function update(
string $resource,
string $id,
string $authorizationHeader,
- ?string $token = null
+ ?string $token = null,
): RequestInterface {
$headers = ['CONTENT_TYPE' => 'application/ld+json'];
if ($token !== null) {
@@ -111,7 +111,7 @@ public static function update(
return new self(
sprintf('/api/v2/%s%s/%s', self::prepareSection($section), $resource, $id),
HttpRequest::METHOD_PUT,
- $headers
+ $headers,
);
}
@@ -120,14 +120,14 @@ public static function delete(
string $resource,
string $id,
string $authorizationHeader,
- ?string $token = null
+ ?string $token = null,
): RequestInterface {
$headers = $token ? ['HTTP_' . $authorizationHeader => 'Bearer ' . $token] : [];
return new self(
sprintf('/api/v2/%s%s/%s', self::prepareSection($section), $resource, $id),
HttpRequest::METHOD_DELETE,
- $headers
+ $headers,
);
}
@@ -141,7 +141,7 @@ public static function customItemAction(?string $section, string $resource, stri
return new self(
sprintf('/api/v2/%s%s/%s/%s', self::prepareSection($section), $resource, $id, $action),
$type,
- ['CONTENT_TYPE' => 'application/merge-patch+json']
+ ['CONTENT_TYPE' => 'application/merge-patch+json'],
);
}
@@ -149,7 +149,7 @@ public static function upload(
?string $section,
string $resource,
string $authorizationHeader,
- ?string $token = null
+ ?string $token = null,
): RequestInterface {
$headers = ['CONTENT_TYPE' => 'multipart/form-data'];
if ($token !== null) {
@@ -159,7 +159,7 @@ public static function upload(
return new self(
sprintf('/api/v2/%s%s', self::prepareSection($section), $resource),
HttpRequest::METHOD_POST,
- $headers
+ $headers,
);
}
diff --git a/src/Sylius/Behat/Client/RequestInterface.php b/src/Sylius/Behat/Client/RequestInterface.php
index fde2bd7c67f..04981e75179 100644
--- a/src/Sylius/Behat/Client/RequestInterface.php
+++ b/src/Sylius/Behat/Client/RequestInterface.php
@@ -19,7 +19,7 @@ public static function index(
?string $section,
string $resource,
string $authorizationHeader,
- ?string $token = null
+ ?string $token = null,
): self;
public static function subResourceIndex(?string $section, string $resource, string $id, string $subResource): self;
@@ -29,14 +29,14 @@ public static function show(
string $resource,
string $id,
string $authorizationHeader,
- ?string $token = null
+ ?string $token = null,
): self;
public static function create(
?string $section,
string $resource,
string $authorizationHeader,
- ?string $token = null
+ ?string $token = null,
): self;
public static function update(
@@ -44,7 +44,7 @@ public static function update(
string $resource,
string $id,
string $authorizationHeader,
- ?string $token = null
+ ?string $token = null,
): self;
public static function delete(
@@ -52,7 +52,7 @@ public static function delete(
string $resource,
string $id,
string $authorizationHeader,
- ?string $token = null
+ ?string $token = null,
): self;
public static function transition(?string $section, string $resource, string $id, string $transition): self;
@@ -63,7 +63,7 @@ public static function upload(
?string $section,
string $resource,
string $authorizationHeader,
- ?string $token = null
+ ?string $token = null,
): self;
public static function custom(string $url, string $method, ?string $token = null): self;
diff --git a/src/Sylius/Behat/Client/ResponseChecker.php b/src/Sylius/Behat/Client/ResponseChecker.php
index 622ed3b12a3..7526ce3355f 100644
--- a/src/Sylius/Behat/Client/ResponseChecker.php
+++ b/src/Sylius/Behat/Client/ResponseChecker.php
@@ -215,8 +215,8 @@ private function getResponseContentValue(Response $response, string $key)
$content,
SprintfResponseEscaper::provideMessageWithEscapedResponseContent(
'Content could not be parsed to array.',
- $response
- )
+ $response,
+ ),
);
Assert::keyExists($content, $key, sprintf('Expected key "%s" not found. Received response: %s', $key, $response->getContent()));
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingAdministratorsContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingAdministratorsContext.php
index c88cb7d4027..7b4debe5669 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingAdministratorsContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingAdministratorsContext.php
@@ -43,7 +43,7 @@ public function __construct(
ResponseCheckerInterface $responseChecker,
IriConverterInterface $iriConverter,
SharedStorageInterface $sharedStorage,
- \ArrayAccess $minkParameters
+ \ArrayAccess $minkParameters,
) {
$this->client = $client;
$this->avatarImagesClient = $avatarImagesClient;
@@ -199,7 +199,7 @@ public function theAdministratorShouldAppearInTheStore(string $email): void
{
Assert::true(
$this->responseChecker->hasItemWithValue($this->client->index(), 'email', $email),
- sprintf('Administrator with email %s does not exist', $email)
+ sprintf('Administrator with email %s does not exist', $email),
);
}
@@ -210,7 +210,7 @@ public function thereShouldNotBeAdministratorAnymore(string $email): void
{
Assert::false(
$this->responseChecker->hasItemWithValue($this->client->index(), 'email', $email),
- sprintf('Administrator with email %s exists, but it should not', $email)
+ sprintf('Administrator with email %s exists, but it should not', $email),
);
}
@@ -222,7 +222,7 @@ public function thereShouldStillBeOnlyOneAdministratorWithAnEmail(string $email)
Assert::count(
$this->responseChecker->getCollectionItemsWithValue($this->client->index(), 'email', $email),
1,
- sprintf('There is more than one administrator with email %s', $email)
+ sprintf('There is more than one administrator with email %s', $email),
);
}
@@ -235,7 +235,7 @@ public function thisAdministratorWithNameShouldAppearInTheStore(string $username
Assert::count(
$this->responseChecker->getCollectionItemsWithValue($this->client->index(), 'username', $username),
1,
- sprintf('There is more than one administrator with username %s', $username)
+ sprintf('There is more than one administrator with username %s', $username),
);
}
@@ -246,7 +246,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyCreated(): void
{
Assert::true(
$this->responseChecker->isCreationSuccessful($this->client->getLastResponse()),
- 'Administrator could not be created'
+ 'Administrator could not be created',
);
}
@@ -257,7 +257,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyEdited(): void
{
Assert::true(
$this->responseChecker->isUpdateSuccessful($this->client->getLastResponse()),
- 'Administrator could not be edited'
+ 'Administrator could not be edited',
);
}
@@ -268,7 +268,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyDeleted(): void
{
Assert::true(
$this->responseChecker->isDeletionSuccessful($this->client->getLastResponse()),
- 'Administrator could not be deleted'
+ 'Administrator could not be deleted',
);
}
@@ -279,7 +279,7 @@ public function iShouldBeNotifiedThatEmailMustBeUnique(): void
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- 'email: This email is already used.'
+ 'email: This email is already used.',
);
}
@@ -290,7 +290,7 @@ public function iShouldBeNotifiedThatNameMustBeUnique(): void
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- 'username: This username is already used.'
+ 'username: This username is already used.',
);
}
@@ -301,7 +301,7 @@ public function iShouldBeNotifiedThatFirstNameIsRequired(string $elementName): v
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- sprintf('Please enter your %s.', $elementName)
+ sprintf('Please enter your %s.', $elementName),
);
}
@@ -312,7 +312,7 @@ public function iShouldBeNotifiedThatEmailIsNotValid(): void
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- 'email: This email is invalid.'
+ 'email: This email is invalid.',
);
}
@@ -323,11 +323,11 @@ public function iShouldBeNotifiedThatItCannotBeDeleted(): void
{
Assert::false(
$this->responseChecker->isDeletionSuccessful($this->client->getLastResponse()),
- 'Administrator could be deleted'
+ 'Administrator could be deleted',
);
Assert::same(
$this->responseChecker->getError($this->client->getLastResponse()),
- 'Cannot remove currently logged in user.'
+ 'Cannot remove currently logged in user.',
);
}
@@ -339,7 +339,7 @@ public function iShouldSeeTheImageAsMyAvatar(string $avatar, AdminUserInterface
Assert::true($this->responseChecker->hasValue(
$this->client->show((string) $administrator->getId()),
'avatar',
- $this->sharedStorage->get(StringInflector::nameToCode($avatar))
+ $this->sharedStorage->get(StringInflector::nameToCode($avatar)),
));
}
@@ -354,7 +354,7 @@ public function iShouldNotSeeTheAvatarImage(string $avatar): void
Assert::true($this->responseChecker->hasValue(
$this->client->show((string) $administrator->getId()),
'avatar',
- null
+ null,
));
}
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingChannelsContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingChannelsContext.php
index 20a56c73f13..a9fdc35aac2 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingChannelsContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingChannelsContext.php
@@ -38,7 +38,7 @@ final class ManagingChannelsContext implements Context
public function __construct(
ApiClientInterface $client,
ResponseCheckerInterface $responseChecker,
- IriConverterInterface $iriConverter
+ IriConverterInterface $iriConverter,
) {
$this->client = $client;
$this->responseChecker = $responseChecker;
@@ -162,7 +162,7 @@ public function specifyShopBillingAddressAs(
string $street,
string $postcode,
string $city,
- CountryInterface $country
+ CountryInterface $country,
): void {
$this->shopBillingData['street'] = $street;
$this->shopBillingData['city'] = $city;
@@ -203,7 +203,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyCreated(): void
{
Assert::true(
$this->responseChecker->isCreationSuccessful($this->client->getLastResponse()),
- 'Channel could not be created'
+ 'Channel could not be created',
);
}
@@ -215,7 +215,7 @@ public function theChannelShouldAppearInTheRegistry(string $name): void
{
Assert::true(
$this->responseChecker->hasItemWithValue($this->client->index(), 'name', $name),
- sprintf('Channel with name %s does not exist', $name)
+ sprintf('Channel with name %s does not exist', $name),
);
}
@@ -227,7 +227,7 @@ public function theChannelShouldHaveAsAMenuTaxon(ChannelInterface $channel, Taxo
Assert::same(
$this->responseChecker->getValue($this->client->show($channel->getCode()), 'menuTaxon'),
$this->iriConverter->getIriFromItem($taxon),
- sprintf('Channel %s does not have %s menu taxon', $channel->getName(), $taxon->getName())
+ sprintf('Channel %s does not have %s menu taxon', $channel->getName(), $taxon->getName()),
);
}
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingCountriesContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingCountriesContext.php
index 5af127ad038..eb5f50b7d75 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingCountriesContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingCountriesContext.php
@@ -40,7 +40,7 @@ public function __construct(
ApiClientInterface $provincesClient,
ResponseCheckerInterface $responseChecker,
SharedStorageInterface $sharedStorage,
- IriConverterInterface $iriConverter
+ IriConverterInterface $iriConverter,
) {
$this->client = $client;
$this->provincesClient = $provincesClient;
@@ -114,7 +114,7 @@ public function iNameTheProvince(string $provinceName): void
{
$this->client->addSubResourceData(
'provinces',
- ['name' => $provinceName]
+ ['name' => $provinceName],
);
}
@@ -125,7 +125,7 @@ public function iSpecifyTheProvinceCodeAs(string $provinceCode): void
{
$this->client->addSubResourceData(
'provinces',
- ['code' => $provinceCode]
+ ['code' => $provinceCode],
);
}
@@ -136,7 +136,7 @@ public function iAddTheProvinceWithCode(string $provinceName, string $provinceCo
{
$this->client->addSubResourceData(
'provinces',
- ['code' => $provinceCode, 'name' => $provinceName]
+ ['code' => $provinceCode, 'name' => $provinceName],
);
}
@@ -147,7 +147,7 @@ public function iAddTheProvinceWithCodeAndAbbreviation(string $name, string $cod
{
$this->client->addSubResourceData(
'provinces',
- ['code' => $code, 'name' => $name, 'abbreviation' => $abbreviation]
+ ['code' => $code, 'name' => $name, 'abbreviation' => $abbreviation],
);
}
@@ -192,7 +192,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyCreated(): void
{
Assert::true(
$this->responseChecker->isCreationSuccessful($this->client->getLastResponse()),
- 'Country could not be created'
+ 'Country could not be created',
);
}
@@ -203,7 +203,7 @@ public function theCountryShouldAppearInTheStore(CountryInterface $country): voi
{
Assert::true(
$this->responseChecker->hasItemWithValue($this->client->index(), 'code', $country->getCode()),
- sprintf('There is no country with name "%s"', $country->getName())
+ sprintf('There is no country with name "%s"', $country->getName()),
);
}
@@ -216,7 +216,7 @@ public function theCountryShouldHaveTheProvince(CountryInterface $country, Provi
Assert::true($this->responseChecker->hasItemWithValue(
$this->client->subResourceIndex('provinces', $country->getCode()),
'code',
- $province->getCode()
+ $province->getCode(),
));
}
@@ -230,7 +230,7 @@ public function theProvinceShouldStillBeNamedInThisCountry(ProvinceInterface $pr
Assert::true($this->responseChecker->hasItemWithValue(
$this->client->subResourceIndex('provinces', $country->getCode()),
'code',
- $province->getCode()
+ $province->getCode(),
));
}
@@ -243,7 +243,7 @@ public function iShouldNotBeAbleToChoose(string $countryName): void
$response = $this->client->create();
Assert::false(
$this->responseChecker->isCreationSuccessful($response),
- 'Country has been created successfully, but it should not'
+ 'Country has been created successfully, but it should not',
);
Assert::same($this->responseChecker->getError($response), 'code: Country ISO code must be unique.');
}
@@ -255,7 +255,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyEdited(): void
{
Assert::true(
$this->responseChecker->isUpdateSuccessful($this->client->getLastResponse()),
- 'Country could not be edited'
+ 'Country could not be edited',
);
}
@@ -268,9 +268,9 @@ public function thisCountryShouldBeDisabled(CountryInterface $country, string $e
$this->responseChecker->hasValue(
$this->client->show($country->getCode()),
'enabled',
- $enabled === 'enabled'
+ $enabled === 'enabled',
),
- 'Country is not disabled'
+ 'Country is not disabled',
);
}
@@ -293,7 +293,7 @@ public function provinceWithCodeShouldNotBeAddedInThisCountry(string $provinceCo
foreach ($this->getProvincesOfCountry($country) as $province) {
Assert::false(
$province->getCode() === $provinceCode,
- sprintf('The country "%s" should not have the "%s" province', $country->getName(), $province->getName())
+ sprintf('The country "%s" should not have the "%s" province', $country->getName(), $province->getName()),
);
}
}
@@ -310,7 +310,7 @@ public function thisCountryShouldNotHaveTheProvince(string $provinceName): void
foreach ($this->getProvincesOfCountry($country) as $province) {
Assert::false(
$province->getName() === $provinceName,
- sprintf('The country "%s" should not have the "%s" province', $country->getName(), $province->getName())
+ sprintf('The country "%s" should not have the "%s" province', $country->getName(), $province->getName()),
);
}
}
@@ -322,7 +322,7 @@ public function iShouldBeNotifiedThatProvinceCodeMustBeUnique(): void
{
Assert::same(
$this->responseChecker->getError($this->client->getLastResponse()),
- 'provinces[1].code: Province code must be unique.'
+ 'provinces[1].code: Province code must be unique.',
);
}
@@ -333,7 +333,7 @@ public function iShouldBeNotifiedThatFieldIsRequired(string $field): void
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- \sprintf('Please enter province %s.', $field)
+ \sprintf('Please enter province %s.', $field),
);
}
@@ -344,7 +344,7 @@ public function iShouldBeNotifiedThatNameOfTheProvinceIsRequired(): void
{
Assert::contains(
$this->responseChecker->getError($this->provincesClient->getLastResponse()),
- 'Please enter province name.'
+ 'Please enter province name.',
);
}
@@ -354,7 +354,7 @@ private function getCountryCodeByName(string $countryName): string
Assert::keyExists(
$countryList,
$countryName,
- sprintf('The country with name "%s" not found', $countryName)
+ sprintf('The country with name "%s" not found', $countryName),
);
return $countryList[$countryName];
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingCurrenciesContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingCurrenciesContext.php
index 3b09780e2eb..3f8f94df955 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingCurrenciesContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingCurrenciesContext.php
@@ -80,7 +80,7 @@ public function currencyShouldAppearInTheStore(string $currencyName): void
{
Assert::true(
$this->responseChecker->hasItemWithValue($this->client->index(), 'name', $currencyName),
- sprintf('There is no currency with name "%s"', $currencyName)
+ sprintf('There is no currency with name "%s"', $currencyName),
);
}
@@ -93,7 +93,7 @@ public function thereShouldStillBeOnlyOneCurrencyWithCode(string $code): void
Assert::same($this->responseChecker->countCollectionItems($response), 1);
Assert::true(
$this->responseChecker->hasItemWithValue($response, 'code', $code),
- sprintf('There is no currency with code "%s"', $code)
+ sprintf('There is no currency with code "%s"', $code),
);
}
@@ -105,7 +105,7 @@ public function iShouldBeNotifiedThatCurrencyCodeMustBeUnique(): void
$response = $this->client->getLastResponse();
Assert::false(
$this->responseChecker->isCreationSuccessful($response),
- 'Currency has been created successfully, but it should not'
+ 'Currency has been created successfully, but it should not',
);
Assert::same($this->responseChecker->getError($response), 'code: Currency code must be unique.');
}
@@ -117,7 +117,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyCreated(): void
{
Assert::true(
$this->responseChecker->isCreationSuccessful($this->client->getLastResponse()),
- 'Currency could not be created'
+ 'Currency could not be created',
);
}
}
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingCustomerGroupsContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingCustomerGroupsContext.php
index d5fee737926..416c00711a6 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingCustomerGroupsContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingCustomerGroupsContext.php
@@ -107,7 +107,7 @@ public function theCustomerGroupShouldAppearInTheStore(CustomerGroupInterface $c
{
Assert::true(
$this->responseChecker->hasItemWithValue($this->client->index(), 'code', $customerGroup->getCode()),
- sprintf('Customer group with code %s does not exist', $customerGroup->getCode())
+ sprintf('Customer group with code %s does not exist', $customerGroup->getCode()),
);
}
@@ -119,7 +119,7 @@ public function thisCustomerGroupWithNameShouldAppearInTheStore(string $name): v
{
Assert::true(
$this->responseChecker->hasItemWithValue($this->client->index(), 'name', $name),
- sprintf('Customer group with name %s does not exist', $name)
+ sprintf('Customer group with name %s does not exist', $name),
);
}
@@ -139,7 +139,7 @@ public function thisCustomerGroupShouldStillBeNamed(CustomerGroupInterface $cust
{
Assert::true(
$this->responseChecker->hasValue($this->client->show($customerGroup->getCode()), 'name', $name),
- 'Customer groups name is not ' . $name
+ 'Customer groups name is not ' . $name,
);
}
@@ -150,7 +150,7 @@ public function iShouldBeNotifiedThatNameIsRequired(): void
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- 'name: Please enter a customer group name.'
+ 'name: Please enter a customer group name.',
);
}
@@ -161,7 +161,7 @@ public function iShouldBeNotifiedThatCustomerGroupWithThisCodeAlreadyExists(): v
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- 'Customer group code has to be unique.'
+ 'Customer group code has to be unique.',
);
}
@@ -182,7 +182,7 @@ public function iShouldNotBeAbleToEditItsCode(): void
Assert::false(
$this->responseChecker->hasValue($this->client->update(), 'code', 'NEW_CODE'),
- 'The code field with value NEW_CODE exist'
+ 'The code field with value NEW_CODE exist',
);
}
@@ -202,7 +202,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyCreated(): void
{
Assert::true(
$this->responseChecker->isCreationSuccessful($this->client->getLastResponse()),
- 'Customer group could not be created'
+ 'Customer group could not be created',
);
}
@@ -213,7 +213,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyEdited(): void
{
Assert::true(
$this->responseChecker->isUpdateSuccessful($this->client->getLastResponse()),
- 'Customer group could not be edited'
+ 'Customer group could not be edited',
);
}
@@ -224,9 +224,9 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyDeleted(): void
{
Assert::true(
$this->responseChecker->isDeletionSuccessful(
- $this->client->getLastResponse()
- ),
- 'Customer group could not be deleted'
+ $this->client->getLastResponse(),
+ ),
+ 'Customer group could not be deleted',
);
}
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingExchangeRatesContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingExchangeRatesContext.php
index ab5247f39f9..c24835421f4 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingExchangeRatesContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingExchangeRatesContext.php
@@ -32,7 +32,7 @@ final class ManagingExchangeRatesContext implements Context
public function __construct(
ApiClientInterface $client,
ResponseCheckerInterface $responseChecker,
- SharedStorageInterface $sharedStorage
+ SharedStorageInterface $sharedStorage,
) {
$this->client = $client;
$this->responseChecker = $responseChecker;
@@ -166,7 +166,7 @@ public function iShouldSeeASingleExchangeRateInTheList(): void
public function theExchangeRateWithRatioBetweenAndShouldAppearInTheStore(
float $ratio,
CurrencyInterface $sourceCurrency,
- CurrencyInterface $targetCurrency
+ CurrencyInterface $targetCurrency,
): void {
Assert::true(
$this->responseHasExchangeRate($ratio, $sourceCurrency, $targetCurrency),
@@ -174,8 +174,8 @@ public function theExchangeRateWithRatioBetweenAndShouldAppearInTheStore(
'Exchange rate with ratio %s between %s and %s does not exist',
$ratio,
$sourceCurrency->getName(),
- $targetCurrency->getName()
- )
+ $targetCurrency->getName(),
+ ),
);
}
@@ -185,11 +185,11 @@ public function theExchangeRateWithRatioBetweenAndShouldAppearInTheStore(
*/
public function iShouldSeeTheExchangeRateBetweenAndInTheList(
CurrencyInterface $sourceCurrency,
- CurrencyInterface $targetCurrency
+ CurrencyInterface $targetCurrency,
): void {
Assert::notNull(
$this->getExchangeRateFromResponse($sourceCurrency, $targetCurrency),
- sprintf('Exchange rate for %s and %s currencies does not exist', $sourceCurrency, $targetCurrency)
+ sprintf('Exchange rate for %s and %s currencies does not exist', $sourceCurrency, $targetCurrency),
);
}
@@ -200,7 +200,7 @@ public function itShouldHaveARatioOf(float $ratio): void
{
Assert::true(
$this->responseChecker->hasItemWithValue($this->client->index(), 'ratio', $ratio),
- sprintf('ExchangeRate with ratio %s does not exist', $ratio)
+ sprintf('ExchangeRate with ratio %s does not exist', $ratio),
);
}
@@ -213,14 +213,14 @@ public function thisExchangeRateShouldNoLongerBeOnTheList(ExchangeRateInterface
$this->responseHasExchangeRate(
$exchangeRate->getRatio(),
$exchangeRate->getSourceCurrency(),
- $exchangeRate->getTargetCurrency()
+ $exchangeRate->getTargetCurrency(),
),
sprintf(
'Exchange rate with ratio %s between %s and %s still exists, but it should not.',
$exchangeRate->getRatio(),
$exchangeRate->getSourceCurrency()->getName(),
- $exchangeRate->getTargetCurrency()->getName()
- )
+ $exchangeRate->getTargetCurrency()->getName(),
+ ),
);
}
@@ -229,7 +229,7 @@ public function thisExchangeRateShouldNoLongerBeOnTheList(ExchangeRateInterface
*/
public function theExchangeRateBetweenAndShouldNotBeAdded(
CurrencyInterface $sourceCurrency,
- CurrencyInterface $targetCurrency
+ CurrencyInterface $targetCurrency,
): void {
$this->client->index();
@@ -243,7 +243,7 @@ public function thisExchangeRateShouldHaveARatioOf(ExchangeRateInterface $exchan
{
$exchangeRate = $this->getExchangeRateFromResponse(
$exchangeRate->getSourceCurrency(),
- $exchangeRate->getTargetCurrency()
+ $exchangeRate->getTargetCurrency(),
);
Assert::same($exchangeRate['ratio'], $ratio);
@@ -272,7 +272,7 @@ public function iShouldBeNotifiedThatIsRequired(string $element): void
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- sprintf('%s: Please enter exchange rate %s.', $element, $element)
+ sprintf('%s: Please enter exchange rate %s.', $element, $element),
);
}
@@ -283,7 +283,7 @@ public function iShouldBeNotifiedThatRatioMustBeGreaterThanZero(): void
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- 'The ratio must be greater than 0.'
+ 'The ratio must be greater than 0.',
);
}
@@ -294,7 +294,7 @@ public function iShouldBeNotifiedThatSourceAndTargetCurrenciesMustDiffer(): void
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- 'The source and target currencies must differ.'
+ 'The source and target currencies must differ.',
);
}
@@ -305,7 +305,7 @@ public function iShouldBeNotifiedThatTheCurrencyPairMustBeUnique(): void
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- 'The currency pair must be unique.'
+ 'The currency pair must be unique.',
);
}
@@ -316,7 +316,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyCreated(): void
{
Assert::true(
$this->responseChecker->isCreationSuccessful($this->client->getLastResponse()),
- 'Exchange rate could not be created'
+ 'Exchange rate could not be created',
);
}
@@ -327,7 +327,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyEdited(): void
{
Assert::true(
$this->responseChecker->isUpdateSuccessful($this->client->getLastResponse()),
- 'Exchange rate could not be edited'
+ 'Exchange rate could not be edited',
);
}
@@ -338,7 +338,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyDeleted(): void
{
Assert::true(
$this->responseChecker->isDeletionSuccessful($this->client->getLastResponse()),
- 'Exchange rate could not be deleted'
+ 'Exchange rate could not be deleted',
);
}
@@ -354,15 +354,15 @@ private function assertIfNotBeAbleToEditItCurrency(string $currencyType): void
$this->client->index(),
0,
$currencyType,
- '/api/v2/admin/currencies/EUR'
+ '/api/v2/admin/currencies/EUR',
),
- sprintf('It was possible to change %s', $currencyType)
+ sprintf('It was possible to change %s', $currencyType),
);
}
private function getExchangeRateFromResponse(
CurrencyInterface $sourceCurrency,
- CurrencyInterface $targetCurrency
+ CurrencyInterface $targetCurrency,
): ?array {
/** @var array $item */
foreach ($this->responseChecker->getCollection($this->client->index()) as $item) {
@@ -380,7 +380,7 @@ private function getExchangeRateFromResponse(
private function responseHasExchangeRate(
float $ratio,
CurrencyInterface $sourceCurrency,
- CurrencyInterface $targetCurrency
+ CurrencyInterface $targetCurrency,
): bool {
$exchangeRateResponse = $this->getExchangeRateFromResponse($sourceCurrency, $targetCurrency);
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingLocalesContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingLocalesContext.php
index 7d755c4a0bb..9ae59f4550f 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingLocalesContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingLocalesContext.php
@@ -26,7 +26,7 @@ final class ManagingLocalesContext implements Context
public function __construct(
ApiClientInterface $client,
- ResponseCheckerInterface $responseChecker
+ ResponseCheckerInterface $responseChecker,
) {
$this->client = $client;
$this->responseChecker = $responseChecker;
@@ -64,7 +64,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyCreated(): void
{
Assert::true(
$this->responseChecker->isCreationSuccessful($this->client->getLastResponse()),
- 'Locale could not be created'
+ 'Locale could not be created',
);
}
@@ -76,7 +76,7 @@ public function theStoreShouldBeAvailableInTheLanguage(string $localeCode): void
$response = $this->client->index();
Assert::true(
$this->responseChecker->hasItemWithValue($response, 'code', $localeCode),
- sprintf('There is no locale with code "%s"', $localeCode)
+ sprintf('There is no locale with code "%s"', $localeCode),
);
}
@@ -89,7 +89,7 @@ public function iShouldNotBeAbleToChoose(string $localeCode): void
$response = $this->client->create();
Assert::false(
$this->responseChecker->isCreationSuccessful($response),
- 'Locale has been created successfully, but it should not'
+ 'Locale has been created successfully, but it should not',
);
Assert::same($this->responseChecker->getError($response), 'code: Locale code must be unique.');
}
@@ -102,7 +102,7 @@ public function iShouldBeNotifiedThatACodeIsRequired(): void
$response = $this->client->getLastResponse();
Assert::false(
$this->responseChecker->isCreationSuccessful($response),
- 'Locale has been created successfully, but it should not'
+ 'Locale has been created successfully, but it should not',
);
Assert::same($this->responseChecker->getError($response), 'code: Please choose locale code.');
}
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingOrdersContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingOrdersContext.php
index 519bd5a1f86..aac9efbdf77 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingOrdersContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingOrdersContext.php
@@ -50,7 +50,7 @@ public function __construct(
ResponseCheckerInterface $responseChecker,
IriConverterInterface $iriConverter,
SecurityServiceInterface $adminSecurityService,
- SharedStorageInterface $sharedStorage
+ SharedStorageInterface $sharedStorage,
) {
$this->client = $client;
$this->shipmentsClient = $shipmentsClient;
@@ -85,7 +85,7 @@ public function iCancelThisOrder(OrderInterface $order): void
{
$this->client->applyTransition(
$this->responseChecker->getValue($this->client->show($order->getTokenValue()), 'tokenValue'),
- OrderTransitions::TRANSITION_CANCEL
+ OrderTransitions::TRANSITION_CANCEL,
);
}
@@ -96,7 +96,7 @@ public function iMarkThisOrderAsAPaid(OrderInterface $order): void
{
$this->paymentsClient->applyTransition(
(string) $order->getLastPayment()->getId(),
- PaymentTransitions::TRANSITION_COMPLETE
+ PaymentTransitions::TRANSITION_COMPLETE,
);
}
@@ -107,7 +107,7 @@ public function iShipThisOrder(OrderInterface $order): void
{
$this->shipmentsClient->applyTransition(
(string) $order->getShipments()->first()->getId(),
- ShipmentTransitions::TRANSITION_SHIP
+ ShipmentTransitions::TRANSITION_SHIP,
);
}
@@ -127,11 +127,11 @@ public function iShouldSeeASingleOrderFromCustomer(CustomerInterface $customer):
{
Assert::true(
$this->responseChecker->hasItemWithValue(
- $this->client->getLastResponse(),
- 'customer',
- $this->iriConverter->getIriFromItem($customer)
- ),
- sprintf('There is no order for customer %s', $customer->getEmail())
+ $this->client->getLastResponse(),
+ 'customer',
+ $this->iriConverter->getIriFromItem($customer),
+ ),
+ sprintf('There is no order for customer %s', $customer->getEmail()),
);
}
@@ -151,7 +151,7 @@ public function iShouldBeNotifiedAboutItHasBeenSuccessfullyCanceled(): void
$response = $this->client->getLastResponse();
Assert::true(
$this->responseChecker->isUpdateSuccessful($response),
- 'Resource could not be completed. Reason: ' . $response->getContent()
+ 'Resource could not be completed. Reason: ' . $response->getContent(),
);
}
@@ -175,12 +175,12 @@ public function itShouldHaveShipmentState(string $state): void
{
$shipmentIri = $this->responseChecker->getValue(
$this->client->show($this->sharedStorage->get('order')->getTokenValue()),
- 'shipments'
+ 'shipments',
)[0];
Assert::true(
$this->responseChecker->hasValue($this->client->showByIri($shipmentIri['@id']), 'state', strtolower($state)),
- sprintf('Shipment for this order is not %s', $state)
+ sprintf('Shipment for this order is not %s', $state),
);
}
@@ -191,12 +191,12 @@ public function itShouldHavePaymentState($state): void
{
$paymentIri = $this->responseChecker->getValue(
$this->client->show($this->sharedStorage->get('order')->getTokenValue()),
- 'payments'
+ 'payments',
)[0];
Assert::true(
$this->responseChecker->hasValue($this->client->showByIri($paymentIri['@id']), 'state', strtolower($state)),
- sprintf('payment for this order is not %s', $state)
+ sprintf('payment for this order is not %s', $state),
);
}
@@ -207,7 +207,7 @@ public function theOrderShouldHaveNumberOfPayments(int $number): void
{
Assert::count(
$this->responseChecker->getValue($this->client->show($this->sharedStorage->get('order')->getTokenValue()), 'payments'),
- $number
+ $number,
);
}
@@ -218,7 +218,7 @@ public function theOrderShouldHavePaymentState(OrderInterface $order, string $pa
{
Assert::true(
$this->responseChecker->hasValue($this->client->show($order->getTokenValue()), 'paymentState', strtolower($paymentState)),
- sprintf('Order %s does not have %s payment state', $order->getTokenValue(), $paymentState)
+ sprintf('Order %s does not have %s payment state', $order->getTokenValue(), $paymentState),
);
}
@@ -230,7 +230,7 @@ public function iShouldNotBeAbleToCancelThisOrder(OrderInterface $order): void
$this->iCancelThisOrder($order);
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- 'Transition "cancel" cannot be applied'
+ 'Transition "cancel" cannot be applied',
);
}
@@ -241,7 +241,7 @@ public function theOrdersTotalShouldBe(int $total): void
{
Assert::same(
$this->responseChecker->getValue($this->client->getLastResponse(), 'total'),
- $total
+ $total,
);
}
@@ -252,7 +252,7 @@ public function theOrdersPromotionTotalShouldBe(int $promotionTotal): void
{
Assert::same(
$this->responseChecker->getValue($this->client->getLastResponse(), 'orderPromotionTotal'),
- $promotionTotal
+ $promotionTotal,
);
}
@@ -262,7 +262,7 @@ public function theOrdersPromotionTotalShouldBe(int $promotionTotal): void
public function theCustomerServiceShouldKnowAboutThisAdditionalNotes(
AdminUserInterface $user,
string $notes,
- OrderInterface $order
+ OrderInterface $order,
): void {
$this->adminSecurityService->logIn($user);
@@ -277,7 +277,7 @@ public function theCustomerServiceShouldKnowAboutThisAdditionalNotes(
public function theAdministratorShouldSeeThatThisOrderHasBeenPlacedIn(
AdminUserInterface $user,
OrderInterface $order,
- string $currency
+ string $currency,
): void {
$this->adminSecurityService->logIn($user);
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingPaymentsContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingPaymentsContext.php
index d52aca75408..3fab0bd88b6 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingPaymentsContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingPaymentsContext.php
@@ -35,7 +35,7 @@ final class ManagingPaymentsContext implements Context
public function __construct(
ApiClientInterface $client,
ResponseCheckerInterface $responseChecker,
- IriConverterInterface $iriConverter
+ IriConverterInterface $iriConverter,
) {
$this->client = $client;
$this->responseChecker = $responseChecker;
@@ -61,7 +61,7 @@ public function iCompleteThePaymentOfOrder(OrderInterface $order): void
$this->client->applyTransition(
(string) $payment->getId(),
- PaymentTransitions::TRANSITION_COMPLETE
+ PaymentTransitions::TRANSITION_COMPLETE,
);
}
@@ -104,12 +104,12 @@ public function iShouldSeePaymentsInTheList(int $count = 1): void
public function thePaymentOfTheOrderShouldBeFor(
string $orderNumber,
string $paymentState,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$payments = $this->responseChecker->getCollectionItemsWithValue(
$this->client->getLastResponse(),
'state',
- StringInflector::nameToLowercaseCode($paymentState)
+ StringInflector::nameToLowercaseCode($paymentState),
);
foreach ($payments as $payment) {
@@ -140,7 +140,7 @@ public function iShouldSeePaymentForTheOrderInTheList(OrderInterface $order, int
$this->client->getLastResponse(),
$position - 1,
'order',
- sprintf('/api/v2/admin/orders/%s', $order->getTokenValue())
+ sprintf('/api/v2/admin/orders/%s', $order->getTokenValue()),
));
}
@@ -163,7 +163,7 @@ public function iShouldSeeThePaymentOfOrderAs(OrderInterface $order, string $pay
Assert::true($this->responseChecker->hasValue(
$this->client->show((string) $payment->getId()),
'state',
- StringInflector::nameToLowercaseCode($paymentState)
+ StringInflector::nameToLowercaseCode($paymentState),
));
}
@@ -175,7 +175,7 @@ public function iShouldSeeThePaymentOfTheOrder(OrderInterface $order): void
Assert::true($this->responseChecker->hasItemWithValue(
$this->client->getLastResponse(),
'order',
- $this->iriConverter->getIriFromItem($order)
+ $this->iriConverter->getIriFromItem($order),
));
}
@@ -187,7 +187,7 @@ public function iShouldNotSeeThePaymentOfTheOrder(OrderInterface $order): void
Assert::false($this->responseChecker->hasItemWithValue(
$this->client->getLastResponse(),
'order',
- $this->iriConverter->getIriFromItem($order)
+ $this->iriConverter->getIriFromItem($order),
));
}
}
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingProductAssociationTypesContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingProductAssociationTypesContext.php
index 620084249ef..c137ad50909 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingProductAssociationTypesContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingProductAssociationTypesContext.php
@@ -31,7 +31,7 @@ final class ManagingProductAssociationTypesContext implements Context
public function __construct(
ApiClientInterface $client,
ResponseCheckerInterface $responseChecker,
- SharedStorageInterface $sharedStorage
+ SharedStorageInterface $sharedStorage,
) {
$this->client = $client;
$this->responseChecker = $responseChecker;
@@ -85,7 +85,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyCreated(): void
{
Assert::true(
$this->responseChecker->isCreationSuccessful($this->client->getLastResponse()),
- 'Product association type could not be created'
+ 'Product association type could not be created',
);
}
@@ -96,7 +96,7 @@ public function theProductAssociationTypeShouldAppearInTheStore(string $name): v
{
Assert::true(
$this->responseChecker->hasItemWithValue($this->client->index(), 'name', $name),
- sprintf('There is no product association type with name "%s"', $name)
+ sprintf('There is no product association type with name "%s"', $name),
);
}
@@ -126,7 +126,7 @@ public function iShouldSeeTheProductAssociationTypeInTheList(string $name): void
{
Assert::true(
$this->responseChecker->hasItemWithValue($this->client->index(), 'name', $name),
- sprintf('There is no product association type with name "%s"', $name)
+ sprintf('There is no product association type with name "%s"', $name),
);
}
@@ -145,9 +145,9 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyDeleted(): void
{
Assert::true(
$this->responseChecker->isDeletionSuccessful(
- $this->client->getLastResponse()
- ),
- 'Product association type could not be deleted'
+ $this->client->getLastResponse(),
+ ),
+ 'Product association type could not be deleted',
);
}
@@ -158,7 +158,7 @@ public function thisProductAssociationTypeShouldNoLongerExistInTheRegistry(Produ
{
Assert::false(
$this->responseChecker->hasItemWithValue($this->client->index(), 'code', $productAssociationType->getCode()),
- sprintf('Product association type with code %s exist', $productAssociationType->getCode())
+ sprintf('Product association type with code %s exist', $productAssociationType->getCode()),
);
}
@@ -193,7 +193,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyEdited(): void
{
Assert::true(
$this->responseChecker->isUpdateSuccessful($this->client->getLastResponse()),
- 'Product association type could not be edited'
+ 'Product association type could not be edited',
);
}
@@ -204,7 +204,7 @@ public function thisProductAssociationTypeNameShouldBe(ProductAssociationTypeInt
{
Assert::true(
$this->responseChecker->hasValue($this->client->show($productAssociationType->getCode()), 'name', $name),
- sprintf('Product association type name is not %s', $name)
+ sprintf('Product association type name is not %s', $name),
);
}
@@ -217,7 +217,7 @@ public function iShouldNotBeAbleToEditItsCode(): void
Assert::false(
$this->responseChecker->hasValue($this->client->update(), 'code', 'NEW_CODE'),
- 'The shipping category code should not be changed to "NEW_CODE", but it is'
+ 'The shipping category code should not be changed to "NEW_CODE", but it is',
);
}
@@ -277,7 +277,7 @@ public function iShouldBeNotifiedThatProductAssociationTypeWithThisCodeAlreadyEx
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- 'The association type with given code already exists.'
+ 'The association type with given code already exists.',
);
}
@@ -289,7 +289,7 @@ public function thereShouldStillBeOnlyOneProductAssociationTypeWithACode(string
Assert::count(
$this->responseChecker->getCollectionItemsWithValue($this->client->index(), 'code', $code),
1,
- sprintf('More then one Product association type have code %s.', $code)
+ sprintf('More then one Product association type have code %s.', $code),
);
}
@@ -308,7 +308,7 @@ public function iShouldBeNotifiedThatCodeIsRequired(string $type): void
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- sprintf('Please enter association type %s.', $type)
+ sprintf('Please enter association type %s.', $type),
);
}
@@ -319,7 +319,7 @@ public function theProductAssociationTypeWithNameShouldNotBeAdded(string $type,
{
Assert::false(
$this->responseChecker->hasItemWithValue($this->client->index(), $type, $value),
- sprintf('Product association type with %s %s exist', $type, $value)
+ sprintf('Product association type with %s %s exist', $type, $value),
);
}
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingProductOptionsContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingProductOptionsContext.php
index a5b7569f68b..5ea254a1df7 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingProductOptionsContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingProductOptionsContext.php
@@ -31,7 +31,7 @@ final class ManagingProductOptionsContext implements Context
public function __construct(
ApiClientInterface $client,
ResponseCheckerInterface $responseChecker,
- SharedStorageInterface $sharedStorage
+ SharedStorageInterface $sharedStorage,
) {
$this->client = $client;
$this->responseChecker = $responseChecker;
@@ -111,7 +111,7 @@ public function iAddTheOptionValueWithCodeAndValue(string $value, string $code):
{
$this->client->addSubResourceData(
'values',
- ['code' => $code, 'translations' => ['en_US' => ['value' => $value, 'locale' => 'en_US']]]
+ ['code' => $code, 'translations' => ['en_US' => ['value' => $value, 'locale' => 'en_US']]],
);
}
@@ -159,7 +159,7 @@ public function theProductOptionShouldAppearInTheRegistry(ProductOptionInterface
Assert::true(
$this->responseChecker->hasItemWithValue($this->client->index(), 'name', $productOption->getName()),
- sprintf('Product option should have name "%s", but it does not.', $productOption->getName())
+ sprintf('Product option should have name "%s", but it does not.', $productOption->getName()),
);
}
@@ -170,7 +170,7 @@ public function theFirstProductOptionInTheListShouldHave(string $field, string $
{
Assert::true(
$this->responseChecker->hasItemOnPositionWithValue($this->client->getLastResponse(), 0, $field, $value),
- sprintf('There should be product option with %s "%s" on position %d, but it does not.', $field, $value, 1)
+ sprintf('There should be product option with %s "%s" on position %d, but it does not.', $field, $value, 1),
);
}
@@ -183,7 +183,7 @@ public function theLastProductOptionInTheListShouldHave(string $field, string $v
Assert::true(
$this->responseChecker->hasItemOnPositionWithValue($this->client->getLastResponse(), $count - 1, $field, $value),
- sprintf('There should be product option with %s "%s" on position %d, but it does not.', $field, $value, $count - 1)
+ sprintf('There should be product option with %s "%s" on position %d, but it does not.', $field, $value, $count - 1),
);
}
@@ -194,7 +194,7 @@ public function theProductOptionWithElementValueShouldNotBeAdded(string $element
{
Assert::false(
$this->responseChecker->hasItemWithValue($this->client->index(), $element, $value),
- sprintf('Product option should not have %s "%s", but it does,', $element, $value)
+ sprintf('Product option should not have %s "%s", but it does,', $element, $value),
);
}
@@ -225,13 +225,13 @@ public function thisProductOptionNameShouldBe(ProductOptionInterface $productOpt
*/
public function productOptionShouldHaveTheOptionValue(
ProductOptionInterface $productOption,
- string $optionValueName
+ string $optionValueName,
): void {
Assert::true($this->responseChecker->hasItemWithTranslation(
$this->client->subResourceIndex('values', $productOption->getCode()),
'en_US',
'value',
- $optionValueName
+ $optionValueName,
));
}
@@ -253,11 +253,11 @@ public function iShouldBeNotifiedThatProductOptionWithThisCodeAlreadyExists(): v
$response = $this->client->getLastResponse();
Assert::false(
$this->responseChecker->isCreationSuccessful($response),
- 'Product option has been created successfully, but it should not'
+ 'Product option has been created successfully, but it should not',
);
Assert::same(
$this->responseChecker->getError($response),
- 'code: The option with given code already exists.'
+ 'code: The option with given code already exists.',
);
}
@@ -268,7 +268,7 @@ public function iShouldBeNotifiedThatElementIsRequired(string $element): void
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- sprintf('%s: Please enter option %s.', $element, $element)
+ sprintf('%s: Please enter option %s.', $element, $element),
);
}
@@ -279,7 +279,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyCreated(): void
{
Assert::true(
$this->responseChecker->isCreationSuccessful($this->client->getLastResponse()),
- 'Product option could not be created'
+ 'Product option could not be created',
);
}
@@ -290,7 +290,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyEdited(): void
{
Assert::true(
$this->responseChecker->isUpdateSuccessful($this->client->getLastResponse()),
- 'Product option could not be edited'
+ 'Product option could not be edited',
);
}
}
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingProductReviewsContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingProductReviewsContext.php
index b6142f03f0a..8085d97b966 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingProductReviewsContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingProductReviewsContext.php
@@ -31,7 +31,7 @@ final class ManagingProductReviewsContext implements Context
public function __construct(
ApiClientInterface $client,
ResponseCheckerInterface $responseChecker,
- SharedStorageInterface $sharedStorage
+ SharedStorageInterface $sharedStorage,
) {
$this->client = $client;
$this->responseChecker = $responseChecker;
@@ -113,7 +113,7 @@ public function iShouldSeeTheProductReviewTitleInTheList(string $title): void
{
Assert::true(
$this->isItemOnIndex('title', $title),
- sprintf('Product review with title %s does not exist', $title)
+ sprintf('Product review with title %s does not exist', $title),
);
}
@@ -166,7 +166,7 @@ public function thisProductReviewShouldNoLongerExistInTheRegistry(): void
$id = (string) $this->sharedStorage->get('product_review_id');
Assert::false(
$this->isItemOnIndex('id', $id),
- sprintf('Product review with id %s exist', $id)
+ sprintf('Product review with id %s exist', $id),
);
}
@@ -177,7 +177,7 @@ public function iShouldBeNotifiedThatElementIsRequired(string $element): void
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- sprintf('%s: Review %s should not be blank', $element, $element)
+ sprintf('%s: Review %s should not be blank', $element, $element),
);
}
@@ -204,7 +204,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyEdited(): void
{
Assert::true(
$this->responseChecker->isUpdateSuccessful($this->client->getLastResponse()),
- 'Product review could not be edited'
+ 'Product review could not be edited',
);
}
@@ -215,7 +215,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyDeleted(): void
{
Assert::true(
$this->responseChecker->isDeletionSuccessful($this->client->getLastResponse()),
- 'Product review could not be deleted'
+ 'Product review could not be deleted',
);
}
@@ -229,7 +229,7 @@ private function assertIfReviewHasElementWithValue(ReviewInterface $productRevie
{
Assert::true(
$this->responseChecker->hasValue($this->client->show((string) $productReview->getId()), $element, $value),
- sprintf('Product review %s is not %s', $element, $value)
+ sprintf('Product review %s is not %s', $element, $value),
);
}
}
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingProductVariantsContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingProductVariantsContext.php
index e199339e500..bcff22f7746 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingProductVariantsContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingProductVariantsContext.php
@@ -43,7 +43,7 @@ public function iLookForVariantWithDescriptorWithinProduct($phrase, ProductInter
'/admin/ajax/product-variants/search',
['phrase' => $phrase, 'productCode' => $product->getCode()],
[],
- ['ACCEPT' => 'application/json']
+ ['ACCEPT' => 'application/json'],
);
}
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingProductsContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingProductsContext.php
index 2cd4403cea8..61728088e2e 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingProductsContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingProductsContext.php
@@ -49,7 +49,7 @@ public function __construct(
ApiClientInterface $productReviewsClient,
ResponseCheckerInterface $responseChecker,
IriConverterInterface $iriConverter,
- SharedStorageInterface $sharedStorage
+ SharedStorageInterface $sharedStorage,
) {
$this->client = $client;
$this->adminUsersClient = $adminUsersClient;
@@ -266,7 +266,7 @@ public function theProductShouldAppearInTheShop(string $productName): void
$response = $this->client->index();
Assert::true(
- $this->responseChecker->hasItemWithTranslation($response, 'en_US', 'name', $productName)
+ $this->responseChecker->hasItemWithTranslation($response, 'en_US', 'name', $productName),
);
}
@@ -301,7 +301,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyEdited(): void
{
Assert::true(
$this->responseChecker->isUpdateSuccessful($this->client->getLastResponse()),
- 'Product could not be edited'
+ 'Product could not be edited',
);
}
@@ -312,7 +312,7 @@ public function iShouldBeNotifiedThatThisProductIsInUseAndCannotBeDeleted(): voi
{
Assert::false(
$this->responseChecker->isDeletionSuccessful($this->client->getLastResponse()),
- 'Product can be deleted, but it should not'
+ 'Product can be deleted, but it should not',
);
}
@@ -323,7 +323,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyDeleted(): void
{
Assert::true(
$this->responseChecker->isDeletionSuccessful($this->client->getLastResponse()),
- 'Product still exists, but it should not'
+ 'Product still exists, but it should not',
);
}
@@ -334,7 +334,7 @@ public function iShouldBeNotifiedThatIsRequired(string $element): void
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- sprintf('Please enter product %s.', $element)
+ sprintf('Please enter product %s.', $element),
);
}
@@ -345,7 +345,7 @@ public function iShouldBeNotifiedThatCodeHasToBeUnique(): void
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- 'Product code must be unique.'
+ 'Product code must be unique.',
);
}
@@ -364,7 +364,7 @@ public function iShouldSeeProductWith(string $field, string $value): void
{
Assert::true(
$this->hasProductWithFieldValue($this->client->getLastResponse(), $field, $value),
- sprintf('Product has not %s with %s', $field, $value)
+ sprintf('Product has not %s with %s', $field, $value),
);
}
@@ -377,7 +377,7 @@ public function iShouldNotSeeAnyProductWith(string $field, string $value): void
$this
->responseChecker
->hasItemWithTranslation($this->client->getLastResponse(), 'en_US', $field, $value),
- sprintf('Product with %s set as %s still exists, but it should not', $field, $value)
+ sprintf('Product with %s set as %s still exists, but it should not', $field, $value),
);
}
@@ -395,9 +395,9 @@ public function iShouldNotBeAbleToEditItsCode(): void
$this->client->getLastResponse(),
0,
'code',
- '/api/v2/admin/products/_NEW'
+ '/api/v2/admin/products/_NEW',
),
- sprintf('It was possible to change %s', '_NEW')
+ sprintf('It was possible to change %s', '_NEW'),
);
}
@@ -423,7 +423,7 @@ public function thisProductNameShouldBe(ProductInterface $product, string $name)
Assert::true(
$this->responseChecker->hasTranslation($response, 'en_US', 'name', $name),
- sprintf('Product\'s name %s does not exist', $name)
+ sprintf('Product\'s name %s does not exist', $name),
);
}
@@ -436,7 +436,7 @@ public function productShouldNotExist(ProductInterface $product): void
Assert::false(
$this->responseChecker->hasItemWithValue($response, 'code', $product->getCode()),
- sprintf('Product with name %s still exists, but it should not', $product->getName())
+ sprintf('Product with name %s still exists, but it should not', $product->getName()),
);
}
@@ -451,7 +451,7 @@ public function thisProductShouldHaveOption(ProductInterface $product, ProductOp
Assert::true(
in_array($this->iriConverter->getIriFromItem($productOption), $productFromResponse['options'], true),
- sprintf('Product with option %s does not exist', $productOption->getName())
+ sprintf('Product with option %s does not exist', $productOption->getName()),
);
}
@@ -475,7 +475,7 @@ public function productSlugShouldBe(ProductInterface $product, string $slug, $lo
Assert::true(
$this->responseChecker->hasTranslation($response, $localeCode, 'slug', $slug),
- sprintf('Product\'s slug %s does not exist', $slug)
+ sprintf('Product\'s slug %s does not exist', $slug),
);
}
@@ -490,9 +490,9 @@ public function thereAreNoProductReviews(ProductInterface $product): void
$this->responseChecker->getCollectionItemsWithValue(
$response,
'reviewSubject',
- $this->iriConverter->getIriFromItem($product)
+ $this->iriConverter->getIriFromItem($product),
),
- 'Should be no reviews, but some exist'
+ 'Should be no reviews, but some exist',
);
}
@@ -506,7 +506,7 @@ public function productShouldExistInTheProductCatalog(ProductInterface $product)
Assert::true(
$this->responseChecker->hasItemWithValue($response, 'code', $code),
- sprintf('Product with code %s does not exist', $code)
+ sprintf('Product with code %s does not exist', $code),
);
}
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingPromotionsContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingPromotionsContext.php
index 6a50d57a913..ef3b5a1a5c6 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingPromotionsContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingPromotionsContext.php
@@ -27,7 +27,7 @@ final class ManagingPromotionsContext implements Context
public function __construct(
ApiClientInterface $client,
- ResponseCheckerInterface $responseChecker
+ ResponseCheckerInterface $responseChecker,
) {
$this->client = $client;
$this->responseChecker = $responseChecker;
@@ -50,7 +50,7 @@ public function thereShouldBePromotion(int $amount = 1): void
{
Assert::same(
count($this->responseChecker->getCollection($this->client->getLastResponse())),
- $amount
+ $amount,
);
}
@@ -62,7 +62,7 @@ public function thePromotionShouldAppearInTheRegistry(string $promotionName): vo
$returnedPromotion = current($this->responseChecker->getCollectionItemsWithValue(
$this->client->getLastResponse(),
'name',
- $promotionName
+ $promotionName,
));
Assert::notNull($returnedPromotion, sprintf('There is no promotion %s in registry', $promotionName));
@@ -76,12 +76,12 @@ public function thisPromotionShouldBeCouponBased(PromotionInterface $promotion):
$returnedPromotion = current($this->responseChecker->getCollectionItemsWithValue(
$this->client->getLastResponse(),
'name',
- $promotion->getName()
+ $promotion->getName(),
));
Assert::true(
$returnedPromotion['couponBased'],
- sprintf('The promotion %s isn\'t coupon based', $promotion->getName())
+ sprintf('The promotion %s isn\'t coupon based', $promotion->getName()),
);
}
@@ -93,7 +93,7 @@ public function iShouldBeAbleToManageCouponsForThisPromotion(PromotionInterface
$returnedPromotion = current($this->responseChecker->getCollectionItemsWithValue(
$this->client->getLastResponse(),
'name',
- $promotion->getName()
+ $promotion->getName(),
));
Assert::keyExists($returnedPromotion, 'coupons');
@@ -115,7 +115,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyDeleted(): void
{
Assert::true(
$this->responseChecker->isDeletionSuccessful($this->client->getLastResponse()),
- 'Promotion still exists, but it should not'
+ 'Promotion still exists, but it should not',
);
}
@@ -129,7 +129,7 @@ public function promotionShouldNotExistInTheRegistry(PromotionInterface $promoti
Assert::false(
$this->responseChecker->hasItemWithValue($response, 'name', $promotionName),
- sprintf('Promotion with name %s still exist', $promotionName)
+ sprintf('Promotion with name %s still exist', $promotionName),
);
}
}
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingShipmentsContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingShipmentsContext.php
index 615ceddbd1d..38b0de98dbb 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingShipmentsContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingShipmentsContext.php
@@ -43,7 +43,7 @@ public function __construct(
ApiClientInterface $client,
ApiIriClientInterface $iriClient,
ResponseCheckerInterface $responseChecker,
- IriConverterInterface $iriConverter
+ IriConverterInterface $iriConverter,
) {
$this->client = $client;
$this->iriClient = $iriClient;
@@ -126,7 +126,7 @@ public function iTryToShipShipmentOfOrder(OrderInterface $order): void
$this->client->customAction(
sprintf('/api/v2/admin/shipments/%s/ship', (string) $shipment->getId()),
- HttpRequest::METHOD_PATCH
+ HttpRequest::METHOD_PATCH,
);
}
@@ -138,7 +138,7 @@ public function iShipTheShipmentOfOrderWithTrackingCode(OrderInterface $order, s
$this->client->applyTransition(
(string) $order->getShipments()->first()->getId(),
ShipmentTransitions::TRANSITION_SHIP,
- ['tracking' => $trackingCode]
+ ['tracking' => $trackingCode],
);
}
@@ -158,7 +158,7 @@ public function iShouldBeNotifiedThatTheShipmentHasBeenAlreadyShipped(): void
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
'You cannot ship a shipment that was shipped before.',
- 'Shipment was able to be shipped when should not.'
+ 'Shipment was able to be shipped when should not.',
);
}
@@ -172,7 +172,7 @@ public function iShouldSeeTheShipmentOfOrderAs(OrderInterface $order, string $sh
'order' => $this->iriConverter->getIriFromItem($order),
'state' => strtolower($shippingState),
]),
- sprintf('Shipment for order %s with state %s does not exist', $order->getNumber(), $shippingState)
+ sprintf('Shipment for order %s with state %s does not exist', $order->getNumber(), $shippingState),
);
}
@@ -186,9 +186,9 @@ public function iShouldSeeShipmentForTheOrderInTheList(OrderInterface $order, in
$this->client->getLastResponse(),
--$position,
'order',
- $this->iriConverter->getIriFromItem($order)
+ $this->iriConverter->getIriFromItem($order),
),
- sprintf('On position %s there is no shipment for order %s', $position, $order->getNumber())
+ sprintf('On position %s there is no shipment for order %s', $position, $order->getNumber()),
);
}
@@ -200,7 +200,7 @@ public function iShouldSeeTheShippingDateAs(OrderInterface $order, string $dateT
Assert::eq(
new \DateTime($this->responseChecker->getValue($this->client->show((string) $order->getShipments()->first()->getId()), 'shippedAt')),
new \DateTime($dateTime),
- 'Shipment was shipped in different date'
+ 'Shipment was shipped in different date',
);
}
@@ -212,14 +212,14 @@ public function shipmentOfOrderShouldBe(
string $orderNumber,
string $shippingState,
CustomerInterface $customer,
- ChannelInterface $channel = null
+ ChannelInterface $channel = null,
): void {
$this->client->index();
foreach ($this->responseChecker->getCollectionItemsWithValue(
$this->client->getLastResponse(),
'state',
- StringInflector::nameToLowercaseCode($shippingState)
+ StringInflector::nameToLowercaseCode($shippingState),
) as $shipment) {
$orderShowResponse = $this->client->showByIri($shipment['order']);
@@ -251,7 +251,7 @@ public function iShouldSeeShipmentWithOrderNumber(OrderInterface $order): void
{
Assert::true(
$this->isShipmentForOrder($order),
- sprintf('There is no shipment for order %s', $order->getNumber())
+ sprintf('There is no shipment for order %s', $order->getNumber()),
);
}
@@ -262,7 +262,7 @@ public function iShouldNotSeeShipmentWithOrderNumber(OrderInterface $order): voi
{
Assert::false(
$this->isShipmentForOrder($order),
- sprintf('There is shipment for order %s', $order->getNumber())
+ sprintf('There is shipment for order %s', $order->getNumber()),
);
}
@@ -277,10 +277,10 @@ public function iShouldSeeUnitsInTheList(int $amount, ProductInterface $product)
foreach ($shipmentUnitsFromResponse as $shipmentUnitFromResponse) {
$shipmentUnitResponse = $this->iriClient->showByIri($shipmentUnitFromResponse);
$productVariantResponse = $this->iriClient->showByIri(
- $this->responseChecker->getValue($shipmentUnitResponse, 'shippable')['@id']
+ $this->responseChecker->getValue($shipmentUnitResponse, 'shippable')['@id'],
);
$productResponse = $this->iriClient->showByIri(
- $this->responseChecker->getValue($productVariantResponse, 'product')
+ $this->responseChecker->getValue($productVariantResponse, 'product'),
);
$productName = $this->responseChecker->getValue($productResponse, 'translations')['en_US']['name'];
@@ -298,7 +298,7 @@ private function isShipmentForOrder(OrderInterface $order): bool
return $this->responseChecker->hasItemWithValue(
$this->client->getLastResponse(),
'order',
- $this->iriConverter->getIriFromItem($order)
+ $this->iriConverter->getIriFromItem($order),
);
}
}
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingShippingCategoriesContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingShippingCategoriesContext.php
index 9f78a40721a..152931c8b52 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingShippingCategoriesContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingShippingCategoriesContext.php
@@ -125,7 +125,7 @@ public function iShouldBeNotifiedThatShippingCategoryWithThisCodeAlreadyExists()
{
Assert::same(
$this->responseChecker->getError($this->client->getLastResponse()),
- 'code: The shipping category with given code already exists.'
+ 'code: The shipping category with given code already exists.',
);
}
@@ -136,7 +136,7 @@ public function iShouldBeNotifiedThatElementIsRequired(string $element): void
{
Assert::same(
$this->responseChecker->getError($this->client->getLastResponse()),
- sprintf('%s: Please enter shipping category %s.', $element, $element)
+ sprintf('%s: Please enter shipping category %s.', $element, $element),
);
}
@@ -157,7 +157,7 @@ public function theShippingCategoryShouldAppearInTheRegistry(string $shippingCat
{
Assert::true(
$this->isItemOnIndex('name', $shippingCategoryName),
- sprintf('Shipping category with name %s does not exists', $shippingCategoryName)
+ sprintf('Shipping category with name %s does not exists', $shippingCategoryName),
);
}
@@ -168,7 +168,7 @@ public function shippingCategoryWithNameShouldNotBeAdded(string $name): void
{
Assert::false(
$this->isItemOnIndex('name', $name),
- sprintf('Shipping category with name %s exists', $name)
+ sprintf('Shipping category with name %s exists', $name),
);
}
@@ -176,12 +176,12 @@ public function shippingCategoryWithNameShouldNotBeAdded(string $name): void
* @Then /^(this shipping category) should no longer exist in the registry$/
*/
public function thisShippingCategoryShouldNoLongerExistInTheRegistry(
- ShippingCategoryInterface $shippingCategory
+ ShippingCategoryInterface $shippingCategory,
): void {
$shippingCategoryName = $shippingCategory->getName();
Assert::false(
$this->isItemOnIndex('name', $shippingCategoryName),
- sprintf('Shipping category with name %s exist', $shippingCategoryName)
+ sprintf('Shipping category with name %s exist', $shippingCategoryName),
);
}
@@ -194,7 +194,7 @@ public function iShouldNotBeAbleToEditItsCode(): void
Assert::false(
$this->responseChecker->hasValue($this->client->update(), 'code', 'NEW_CODE'),
- 'The shipping category code should not be changed to "NEW_CODE", but it is'
+ 'The shipping category code should not be changed to "NEW_CODE", but it is',
);
}
@@ -205,7 +205,7 @@ public function thereShouldStillBeOnlyOneShippingCategoryWith(string $code): voi
{
Assert::same(
count($this->responseChecker->getCollectionItemsWithValue($this->client->index(), 'code', $code)),
- 1
+ 1,
);
}
@@ -216,7 +216,7 @@ public function thisShippingCategoryNameShouldBe(string $name): void
{
Assert::true(
$this->responseChecker->hasValue($this->client->getLastResponse(), 'name', $name),
- sprintf('Shipping category with name %s does not exists', $name)
+ sprintf('Shipping category with name %s does not exists', $name),
);
}
@@ -227,7 +227,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyCreated(): void
{
Assert::true(
$this->responseChecker->isCreationSuccessful($this->client->getLastResponse()),
- 'Shipping category could not be created'
+ 'Shipping category could not be created',
);
}
@@ -238,7 +238,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyEdited(): void
{
Assert::true(
$this->responseChecker->isUpdateSuccessful($this->client->getLastResponse()),
- 'Shipping category could not be edited'
+ 'Shipping category could not be edited',
);
}
@@ -249,7 +249,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyDeleted(): void
{
Assert::true(
$this->responseChecker->isDeletionSuccessful($this->client->getLastResponse()),
- 'Shipping category could not be deleted'
+ 'Shipping category could not be deleted',
);
}
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingShippingMethodsContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingShippingMethodsContext.php
index 1f50882c0ae..ce309dadb07 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingShippingMethodsContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingShippingMethodsContext.php
@@ -44,7 +44,7 @@ public function __construct(
ApiClientInterface $adminUsersClient,
ResponseCheckerInterface $responseChecker,
IriConverterInterface $iriConverter,
- SharedStorageInterface $sharedStorage
+ SharedStorageInterface $sharedStorage,
) {
$this->client = $client;
$this->adminUsersClient = $adminUsersClient;
@@ -325,7 +325,7 @@ public function theShippingMethodShouldAppearInTheRegistry(string $name): void
{
Assert::true(
$this->responseChecker->hasItemWithTranslation($this->client->index(), 'en_US', 'name', $name),
- sprintf('Shipping method with name %s does not exists', $name)
+ sprintf('Shipping method with name %s does not exists', $name),
);
}
@@ -338,7 +338,7 @@ public function thisShippingMethodShouldAppearInTheRegistry(ShippingMethodInterf
Assert::true(
$this->responseChecker->hasItemWithTranslation($this->client->index(), 'en_US', 'name', $name),
- sprintf('Shipping method with name %s does not exists', $name)
+ sprintf('Shipping method with name %s does not exists', $name),
);
}
@@ -349,7 +349,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyDeleted(): void
{
Assert::true(
$this->responseChecker->isDeletionSuccessful($this->client->getLastResponse()),
- 'Shipping method could not be deleted'
+ 'Shipping method could not be deleted',
);
}
@@ -362,7 +362,7 @@ public function thisShippingMethodShouldNoLongerExistInTheRegistry(ShippingMetho
Assert::false(
$this->responseChecker->hasItemWithTranslation($this->client->index(), 'en_US', 'name', $shippingMethodName),
- sprintf('Shipping method with name %s does not exists', $shippingMethodName)
+ sprintf('Shipping method with name %s does not exists', $shippingMethodName),
);
}
@@ -373,7 +373,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyCreated(): void
{
Assert::true(
$this->responseChecker->isCreationSuccessful($this->client->getLastResponse()),
- 'Shipping method could not be created'
+ 'Shipping method could not be created',
);
}
@@ -394,9 +394,9 @@ public function theShippingMethodShouldBeAvailableInChannel(ShippingMethodInterf
$this->responseChecker->hasValueInCollection(
$this->client->show($shippingMethod->getCode()),
'channels',
- $this->iriConverter->getIriFromItem($channel)
+ $this->iriConverter->getIriFromItem($channel),
),
- sprintf('Shipping method is not assigned to %s channel', $channel->getName())
+ sprintf('Shipping method is not assigned to %s channel', $channel->getName()),
);
}
@@ -411,9 +411,9 @@ public function thisShippingMethodNameShouldBe(ShippingMethodInterface $shipping
$this->client->show($shippingMethod->getCode()),
'en_US',
'name',
- $name
+ $name,
),
- 'Shipping method name has not been changed'
+ 'Shipping method name has not been changed',
);
}
@@ -426,9 +426,9 @@ public function thisShippingMethodShouldBeDisabled(ShippingMethodInterface $ship
$this->responseChecker->hasValue(
$this->client->show($shippingMethod->getCode()),
'enabled',
- false
+ false,
),
- 'Shipping method name is not disabled'
+ 'Shipping method name is not disabled',
);
}
@@ -441,9 +441,9 @@ public function thisShippingMethodShouldBeEnabled(ShippingMethodInterface $shipp
$this->responseChecker->hasValue(
$this->client->show($shippingMethod->getCode()),
'enabled',
- true
+ true,
),
- 'Shipping method name is not disabled'
+ 'Shipping method name is not disabled',
);
}
@@ -456,7 +456,7 @@ public function iShouldNotBeAbleToEditItsCode(): void
Assert::false(
$this->responseChecker->hasValue($this->client->update(), 'code', 'NEW_CODE'),
- 'The code field with value NEW_CODE exist'
+ 'The code field with value NEW_CODE exist',
);
}
@@ -467,7 +467,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyEdited(): void
{
Assert::true(
$this->responseChecker->isUpdateSuccessful($this->client->getLastResponse()),
- 'Shipping method could not be edited'
+ 'Shipping method could not be edited',
);
}
@@ -479,11 +479,11 @@ public function iShouldBeNotifiedThatShippingMethodWithThisCodeAlreadyExists():
$response = $this->client->getLastResponse();
Assert::false(
$this->responseChecker->isCreationSuccessful($response),
- 'Shipping method has been created successfully, but it should not'
+ 'Shipping method has been created successfully, but it should not',
);
Assert::same(
$this->responseChecker->getError($response),
- 'code: The shipping method with given code already exists.'
+ 'code: The shipping method with given code already exists.',
);
}
@@ -531,7 +531,7 @@ public function iShouldBeNotifiedThatItIsInUse(): void
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- 'Cannot delete, the shipping method is in use.'
+ 'Cannot delete, the shipping method is in use.',
);
}
@@ -542,7 +542,7 @@ public function iShouldBeNotifiedThatElementIsRequired(string $element): void
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- sprintf('%s: Please enter shipping method %s.', $element, $element)
+ sprintf('%s: Please enter shipping method %s.', $element, $element),
);
}
@@ -553,7 +553,7 @@ public function iShouldBeNotifiedThatZoneHasToBeSelected(): void
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- 'zone: Please select shipping method zone.'
+ 'zone: Please select shipping method zone.',
);
}
@@ -564,7 +564,7 @@ public function theShippingMethodWithElementValueShouldNotBeAdded(string $elemen
{
Assert::false(
$this->responseChecker->hasItemWithValue($this->client->index(), $element, $value),
- sprintf('Shipping method should not have %s "%s", but it does,', $element, $value)
+ sprintf('Shipping method should not have %s "%s", but it does,', $element, $value),
);
}
diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingTaxCategoriesContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingTaxCategoriesContext.php
index 573220492dc..81260f40249 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingTaxCategoriesContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingTaxCategoriesContext.php
@@ -127,7 +127,7 @@ public function thisTaxCategoryShouldNoLongerExistInTheRegistry(TaxCategoryInter
$code = $taxCategory->getCode();
Assert::false(
$this->isItemOnIndex('code', $code),
- sprintf('Tax category with code %s exist', $code)
+ sprintf('Tax category with code %s exist', $code),
);
}
@@ -139,7 +139,7 @@ public function theTaxCategoryShouldAppearInTheRegistry(string $taxCategoryName)
{
Assert::true(
$this->isItemOnIndex('name', $taxCategoryName),
- sprintf('Tax category with name %s does not exist', $taxCategoryName)
+ sprintf('Tax category with name %s does not exist', $taxCategoryName),
);
}
@@ -152,7 +152,7 @@ public function iShouldNotBeAbleToEditItsCode(): void
Assert::false(
$this->responseChecker->hasValue($this->client->update(), 'code', 'NEW_CODE'),
- 'The code field with value NEW_CODE exist'
+ 'The code field with value NEW_CODE exist',
);
}
@@ -164,7 +164,7 @@ public function thisTaxCategoryNameShouldBe(TaxCategoryInterface $taxCategory, s
{
Assert::true(
$this->responseChecker->hasValue($this->client->show($taxCategory->getCode()), 'name', $taxCategoryName),
- sprintf('Tax category name is not %s', $taxCategoryName)
+ sprintf('Tax category name is not %s', $taxCategoryName),
);
}
@@ -175,7 +175,7 @@ public function iShouldBeNotifiedThatTaxCategoryWithThisCodeAlreadyExists(): voi
{
Assert::same(
$this->responseChecker->getError($this->client->getLastResponse()),
- 'code: The tax category with given code already exists.'
+ 'code: The tax category with given code already exists.',
);
}
@@ -186,7 +186,7 @@ public function thereShouldStillBeOnlyOneTaxCategoryWith(string $element, string
{
Assert::same(
count($this->responseChecker->getCollectionItemsWithValue($this->client->index(), $element, $value)),
- 1
+ 1,
);
}
@@ -197,7 +197,7 @@ public function iShouldBeNotifiedThatIsRequired(string $element): void
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- sprintf('%s: Please enter tax category %s.', $element, $element)
+ sprintf('%s: Please enter tax category %s.', $element, $element),
);
}
@@ -224,7 +224,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyCreated(): void
{
Assert::true(
$this->responseChecker->isCreationSuccessful($this->client->getLastResponse()),
- 'Tax category could not be created'
+ 'Tax category could not be created',
);
}
@@ -235,7 +235,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyEdited(): void
{
Assert::true(
$this->responseChecker->isUpdateSuccessful($this->client->getLastResponse()),
- 'Tax category could not be edited'
+ 'Tax category could not be edited',
);
}
@@ -246,7 +246,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyDeleted(): void
{
Assert::true(
$this->responseChecker->isDeletionSuccessful($this->client->getLastResponse()),
- 'Tax category could not be deleted'
+ 'Tax category 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 2133993dbf4..176398604cf 100644
--- a/src/Sylius/Behat/Context/Api/Admin/ManagingZonesContext.php
+++ b/src/Sylius/Behat/Context/Api/Admin/ManagingZonesContext.php
@@ -41,7 +41,7 @@ public function __construct(
ResponseCheckerInterface $responseChecker,
SharedStorageInterface $sharedStorage,
IriConverterInterface $iriConverter,
- string $zoneMemberClass
+ string $zoneMemberClass,
) {
$this->client = $client;
$this->responseChecker = $responseChecker;
@@ -216,12 +216,12 @@ public function iSaveMyChanges(): void
*/
public function theZoneNamedWithTheCountryMemberShouldAppearInTheRegistry(
ZoneInterface $zone,
- CountryInterface $country
+ CountryInterface $country,
): void {
Assert::true($this->responseChecker->hasItemWithValue(
$this->client->subResourceIndex('members', $zone->getCode()),
'code',
- $country->getCode()
+ $country->getCode(),
));
}
@@ -234,7 +234,7 @@ public function iShouldNotBeAbleToEditItsCode(): void
Assert::false(
$this->responseChecker->hasValue($this->client->update(), 'code', 'NEW_CODE'),
- 'The code field with value NEW_CODE exists'
+ 'The code field with value NEW_CODE exists',
);
}
@@ -249,7 +249,7 @@ public function iCanNotAddAZone(ZoneInterface $zone): void
Assert::contains(
$this->responseChecker->getError($this->client->update()),
- 'members: Zone member cannot be the same as a zone.'
+ 'members: Zone member cannot be the same as a zone.',
);
}
@@ -258,12 +258,12 @@ public function iCanNotAddAZone(ZoneInterface $zone): void
*/
public function theZoneNamedWithTheProvinceMemberShouldAppearInTheRegistry(
ZoneInterface $zone,
- ProvinceInterface $province
+ ProvinceInterface $province,
): void {
Assert::true($this->responseChecker->hasItemWithValue(
$this->client->subResourceIndex('members', $zone->getCode()),
'code',
- $province->getCode()
+ $province->getCode(),
));
}
@@ -272,12 +272,12 @@ public function theZoneNamedWithTheProvinceMemberShouldAppearInTheRegistry(
*/
public function theZoneNamedWithTheZoneMemberShouldAppearInTheRegistry(
ZoneInterface $zone,
- ZoneInterface $otherZone
+ ZoneInterface $otherZone,
): void {
Assert::true($this->responseChecker->hasItemWithValue(
$this->client->subResourceIndex('members', $zone->getCode()),
'code',
- $otherZone->getCode()
+ $otherZone->getCode(),
));
}
@@ -288,7 +288,7 @@ public function itsScopeShouldBe(string $scope): void
{
Assert::true(
$this->responseChecker->hasValue($this->client->show('EU'), 'scope', $scope),
- sprintf('Its Zone does not have %s scope', $scope)
+ sprintf('Its Zone does not have %s scope', $scope),
);
}
@@ -309,7 +309,7 @@ public function iShouldSeeTheZoneNamedInTheList(string $name): void
{
Assert::true(
$this->responseChecker->hasItemWithValue($this->client->index(), 'name', $name),
- sprintf('There is no zone with name "%s"', $name)
+ sprintf('There is no zone with name "%s"', $name),
);
}
@@ -321,7 +321,7 @@ public function thereShouldStillBeOnlyOneZoneWithCode(string $code): void
Assert::count(
$this->responseChecker->getCollectionItemsWithValue($this->client->index(), 'code', $code),
1,
- sprintf('There should be only one zone with code "%s"', $code)
+ sprintf('There should be only one zone with code "%s"', $code),
);
}
@@ -332,7 +332,7 @@ public function theZoneNamedShouldNoLongerExistInTheRegistry(string $name): void
{
Assert::false(
$this->responseChecker->hasItemWithValue($this->client->index(), 'name', $name),
- sprintf('Zone with name %s exists', $name)
+ sprintf('Zone with name %s exists', $name),
);
}
@@ -343,7 +343,7 @@ public function zoneShouldNotBeAdded(string $field, string $value): void
{
Assert::false(
$this->responseChecker->hasItemWithValue($this->client->index(), $field, $value),
- sprintf('Zone with %s %s exists', $field, $value)
+ sprintf('Zone with %s %s exists', $field, $value),
);
}
@@ -355,12 +355,12 @@ public function thisZoneShouldHaveOnlyTheProvinceMember(ZoneInterface $zone, Zon
Assert::true($this->responseChecker->hasItemWithValue(
$this->client->subResourceIndex('members', $zone->getCode()),
'code',
- $zoneMember->getCode()
+ $zoneMember->getCode(),
));
Assert::same(
$this->responseChecker->countCollectionItems($this->client->subResourceIndex('members', $zone->getCode())),
- 1
+ 1,
);
}
@@ -371,7 +371,7 @@ public function thisZoneNameShouldBe(ZoneInterface $zone, string $name): void
{
Assert::true(
$this->responseChecker->hasValue($this->client->show($zone->getCode()), 'name', $name),
- sprintf('Its Zone does not have name %s.', $name)
+ sprintf('Its Zone does not have name %s.', $name),
);
}
@@ -382,7 +382,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyCreated(): void
{
Assert::true(
$this->responseChecker->isCreationSuccessful($this->client->getLastResponse()),
- 'Zone could not be created'
+ 'Zone could not be created',
);
}
@@ -393,7 +393,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyEdited(): void
{
Assert::true(
$this->responseChecker->isUpdateSuccessful($this->client->getLastResponse()),
- 'Zone could not be edited'
+ 'Zone could not be edited',
);
}
@@ -405,9 +405,9 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyDeleted(): void
{
Assert::true(
$this->responseChecker->isDeletionSuccessful(
- $this->client->getLastResponse()
- ),
- 'Zone could not be deleted'
+ $this->client->getLastResponse(),
+ ),
+ 'Zone could not be deleted',
);
}
@@ -418,7 +418,7 @@ public function iShouldBeNotifiedThatThisZoneCannotBeDeleted(): void
{
Assert::false(
$this->responseChecker->isDeletionSuccessful($this->client->getLastResponse()),
- 'Zone can be deleted, but it should not'
+ 'Zone can be deleted, but it should not',
);
}
@@ -429,7 +429,7 @@ public function iShouldBeNotifiedThatZoneWithThisCodeAlreadyExists(): void
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- 'code: Zone code must be unique.'
+ 'code: Zone code must be unique.',
);
}
@@ -440,7 +440,7 @@ public function iShouldBeNotifiedThatIsRequired(string $element): void
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- sprintf('Please enter zone %s.', $element)
+ sprintf('Please enter zone %s.', $element),
);
}
@@ -451,7 +451,7 @@ public function iShouldBeNotifiedThatAtLeastOneZoneMemberIsRequired(): void
{
Assert::contains(
$this->responseChecker->getError($this->client->getLastResponse()),
- 'members: Please add at least 1 zone member.'
+ 'members: Please add at least 1 zone member.',
);
}
diff --git a/src/Sylius/Behat/Context/Api/EmailContext.php b/src/Sylius/Behat/Context/Api/EmailContext.php
index f1d664dc96c..1a0cdfaac5e 100644
--- a/src/Sylius/Behat/Context/Api/EmailContext.php
+++ b/src/Sylius/Behat/Context/Api/EmailContext.php
@@ -32,7 +32,7 @@ final class EmailContext implements Context
public function __construct(
SharedStorageInterface $sharedStorage,
EmailCheckerInterface $emailChecker,
- TranslatorInterface $translator
+ TranslatorInterface $translator,
) {
$this->sharedStorage = $sharedStorage;
$this->emailChecker = $emailChecker;
@@ -47,7 +47,7 @@ public function anEmailWithResetTokenShouldBeSentTo(string $recipient, string $l
{
$this->assertEmailContainsMessageTo(
$this->translator->trans('sylius.email.password_reset.reset_your_password', [], null, $localeCode),
- $recipient
+ $recipient,
);
}
@@ -68,9 +68,9 @@ public function anEmailWithShipmentsConfirmationForTheOrderShouldBeSentTo(string
sprintf(
'Your order with number %s has been sent using %s.',
$orderNumber,
- $method
+ $method,
),
- $recipient
+ $recipient,
));
}
@@ -90,16 +90,16 @@ public function anEmailWithSummaryOfOrderPlacedByShouldBeSentTo(OrderInterface $
public function anEmailWithTheConfirmationOfTheOrderShouldBeSentTo(
OrderInterface $order,
string $recipient,
- string $localeCode = 'en_US'
+ string $localeCode = 'en_US',
): void {
$this->assertEmailContainsMessageTo(
sprintf(
'%s %s %s',
$this->translator->trans('sylius.email.order_confirmation.your_order_number', [], null, $localeCode),
$order->getNumber(),
- $this->translator->trans('sylius.email.order_confirmation.has_been_successfully_placed', [], null, $localeCode)
+ $this->translator->trans('sylius.email.order_confirmation.has_been_successfully_placed', [], null, $localeCode),
),
- $recipient
+ $recipient,
);
}
@@ -112,7 +112,7 @@ public function anEmailWithTheConfirmationOfTheOrderShouldBeSentTo(
public function anEmailWithShipmentDetailsOfOrderShouldBeSentTo(
OrderInterface $order,
string $recipient,
- string $localeCode = 'en_US'
+ string $localeCode = 'en_US',
): void {
$this->assertEmailContainsMessageTo(
sprintf(
@@ -120,9 +120,9 @@ public function anEmailWithShipmentDetailsOfOrderShouldBeSentTo(
$this->translator->trans('sylius.email.shipment_confirmation.your_order_with_number', [], null, $localeCode),
$order->getNumber(),
$this->translator->trans('sylius.email.shipment_confirmation.has_been_sent_using', [], null, $localeCode),
- $this->getShippingMethodName($order)
+ $this->getShippingMethodName($order),
),
- $recipient
+ $recipient,
);
if ($this->sharedStorage->has('tracking_code')) {
@@ -131,9 +131,9 @@ public function anEmailWithShipmentDetailsOfOrderShouldBeSentTo(
'sylius.email.shipment_confirmation.you_can_check_its_location_with_the_tracking_code',
['%tracking_code%' => $this->sharedStorage->get('tracking_code')],
null,
- $localeCode
+ $localeCode,
),
- $recipient
+ $recipient,
);
}
}
diff --git a/src/Sylius/Behat/Context/Api/Shop/AddressContext.php b/src/Sylius/Behat/Context/Api/Shop/AddressContext.php
index af414892589..107b2ff38af 100644
--- a/src/Sylius/Behat/Context/Api/Shop/AddressContext.php
+++ b/src/Sylius/Behat/Context/Api/Shop/AddressContext.php
@@ -39,7 +39,7 @@ public function __construct(
ApiClientInterface $customerClient,
ResponseCheckerInterface $responseChecker,
IriConverterInterface $iriConverter,
- SharedStorageInterface $sharedStorage
+ SharedStorageInterface $sharedStorage,
) {
$this->addressClient = $addressClient;
$this->customerClient = $customerClient;
@@ -255,8 +255,8 @@ public function itShouldContain(string $value): void
Assert::true(
$this->containsValue(
$this->responseChecker->getCollection($this->addressClient->getLastResponse())[0],
- $value
- )
+ $value,
+ ),
);
}
@@ -301,7 +301,7 @@ public function thisAddressShouldBeAssignedTo(string $fullName): void
{
Assert::notNull(
$this->getAddressIriFromAddressBookByFullName($fullName),
- sprintf('There is no address assigned to %s', $fullName)
+ sprintf('There is no address assigned to %s', $fullName),
);
}
@@ -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.',
+ ),
);
}
@@ -415,7 +415,7 @@ public function iShouldHaveNoDefaultAddress(): void
$userShowResponse = $this->customerClient->show((string) $this->sharedStorage->get('user')->getCustomer()->getId());
Assert::null(
$this->responseChecker->getValue($userShowResponse, 'defaultAddress'),
- 'Default address should be null'
+ 'Default address should be null',
);
}
diff --git a/src/Sylius/Behat/Context/Api/Shop/CartContext.php b/src/Sylius/Behat/Context/Api/Shop/CartContext.php
index 1d6ecfa9f43..d7782a18e72 100644
--- a/src/Sylius/Behat/Context/Api/Shop/CartContext.php
+++ b/src/Sylius/Behat/Context/Api/Shop/CartContext.php
@@ -55,7 +55,7 @@ public function __construct(
ResponseCheckerInterface $responseChecker,
SharedStorageInterface $sharedStorage,
ProductVariantResolverInterface $productVariantResolver,
- IriConverterInterface $iriConverter
+ IriConverterInterface $iriConverter,
) {
$this->cartsClient = $cartsClient;
$this->ordersAdminClient = $ordersAdminClient;
@@ -136,7 +136,7 @@ public function iAddVariantOfThisProductToTheCart(ProductVariantInterface $produ
public function iAddThisProductWithToTheCart(
ProductInterface $product,
string $productOption,
- string $productOptionValue
+ string $productOptionValue,
): void {
$productData = json_decode($this->productsClient->show($product->getCode())->getContent(), true, 512, \JSON_THROW_ON_ERROR);
@@ -249,7 +249,7 @@ public function iShouldBeNotifiedThatThisProductDoesNotHaveSufficientStock(Produ
{
Assert::true($this->responseChecker->hasViolationWithMessage(
$this->cartsClient->getLastResponse(),
- sprintf('The product variant with %s code does not have sufficient stock.', $product->getCode())
+ sprintf('The product variant with %s code does not have sufficient stock.', $product->getCode()),
));
}
@@ -261,7 +261,7 @@ public function iShouldNotBeNotifiedThatThisProductDoesNotHaveSufficientStock(Pr
{
Assert::false($this->responseChecker->hasViolationWithMessage(
$this->cartsClient->getLastResponse(),
- sprintf('The product variant with %s code does not have sufficient stock.', $product->getCode())
+ sprintf('The product variant with %s code does not have sufficient stock.', $product->getCode()),
));
}
@@ -281,9 +281,9 @@ public function myCartLocaleShouldBe(LocaleInterface $locale): void
Assert::same(
$this->responseChecker->getValue(
$this->cartsClient->getLastResponse(),
- 'localeCode'
+ 'localeCode',
),
- $locale->getCode()
+ $locale->getCode(),
);
}
@@ -304,7 +304,7 @@ public function myCartShouldBeCleared(): void
Assert::true(
$this->responseChecker->isDeletionSuccessful($response),
- SprintfResponseEscaper::provideMessageWithEscapedResponseContent('Cart has not been created.', $response)
+ SprintfResponseEscaper::provideMessageWithEscapedResponseContent('Cart has not been created.', $response),
);
}
@@ -316,7 +316,7 @@ public function myCartTotalShouldBe(string $tokenValue, int $total): void
{
$responseTotal = $this->responseChecker->getValue(
$this->cartsClient->show($tokenValue),
- 'total'
+ 'total',
);
Assert::same($total, (int) $responseTotal);
@@ -331,7 +331,7 @@ public function myCartShouldBeEmpty(string $tokenValue): void
Assert::true(
$this->responseChecker->isShowSuccessful($response),
- SprintfResponseEscaper::provideMessageWithEscapedResponseContent('Cart has not been created.', $response)
+ SprintfResponseEscaper::provideMessageWithEscapedResponseContent('Cart has not been created.', $response),
);
}
@@ -344,7 +344,7 @@ public function theVisitorHasNoAccessToCustomer(?string $tokenValue): void
Assert::false(
$this->responseChecker->isShowSuccessful($response),
- SprintfResponseEscaper::provideMessageWithEscapedResponseContent('Cart has not been created.', $response)
+ SprintfResponseEscaper::provideMessageWithEscapedResponseContent('Cart has not been created.', $response),
);
}
@@ -364,7 +364,7 @@ public function iShouldBeNotifiedThatTheProductHasBeenSuccessfullyAdded(): void
$response = $this->cartsClient->getLastResponse();
Assert::true(
$this->responseChecker->isUpdateSuccessful($response),
- SprintfResponseEscaper::provideMessageWithEscapedResponseContent('Item has not been added.', $response)
+ SprintfResponseEscaper::provideMessageWithEscapedResponseContent('Item has not been added.', $response),
);
}
@@ -377,7 +377,7 @@ public function iShouldBeNotifiedThatLocaleDoesNotExist(): void
Assert::false(
$this->responseChecker->isCreationSuccessful($response),
- SprintfResponseEscaper::provideMessageWithEscapedResponseContent('The given locale exists but it should not', $response)
+ SprintfResponseEscaper::provideMessageWithEscapedResponseContent('The given locale exists but it should not', $response),
);
Assert::same($this->responseChecker->getError($response), 'The locale en does not exist.');
@@ -391,7 +391,7 @@ public function iShouldBeNotifiedThatQuantityOfAddedProductCannotBeLowerThan1():
$response = $this->cartsClient->getLastResponse();
Assert::false(
$this->responseChecker->isUpdateSuccessful($response),
- SprintfResponseEscaper::provideMessageWithEscapedResponseContent('Quantity of an order item cannot be lower than 1.', $response)
+ SprintfResponseEscaper::provideMessageWithEscapedResponseContent('Quantity of an order item cannot be lower than 1.', $response),
);
}
@@ -446,7 +446,7 @@ public function thisItemShouldHaveName(array $item, string $productName): void
Assert::true(
$this->responseChecker->hasTranslation($response, 'en_US', 'name', $productName),
- SprintfResponseEscaper::provideMessageWithEscapedResponseContent('Name not found.', $response)
+ SprintfResponseEscaper::provideMessageWithEscapedResponseContent('Name not found.', $response),
);
}
@@ -459,7 +459,7 @@ public function thisItemShouldHaveVariant(array $item, string $variantName): voi
Assert::true(
$this->responseChecker->hasTranslation($response, 'en_US', 'name', $variantName),
- SprintfResponseEscaper::provideMessageWithEscapedResponseContent('Name not found.', $response)
+ SprintfResponseEscaper::provideMessageWithEscapedResponseContent('Name not found.', $response),
);
}
@@ -472,7 +472,7 @@ public function thisItemShouldHaveCode(array $item, string $variantCode): void
Assert::true(
$this->responseChecker->hasValue($response, 'code', $variantCode),
- SprintfResponseEscaper::provideMessageWithEscapedResponseContent('Name not found.', $response)
+ SprintfResponseEscaper::provideMessageWithEscapedResponseContent('Name not found.', $response),
);
}
@@ -530,7 +530,7 @@ public function theAdministratorShouldSeeProductWithQuantityInTheCart(string $pr
public function theVisitorCanSeeProductInTheCart(
ProductInterface $product,
string $tokenValue,
- int $quantity = 1
+ int $quantity = 1,
): void {
$this->cartsClient->show($tokenValue);
@@ -554,7 +554,7 @@ public function myCartShouldHaveItemsTotal(int $itemsTotal): void
{
Assert::same(
$this->responseChecker->getValue($this->cartsClient->getLastResponse(), 'itemsTotal'),
- $itemsTotal
+ $itemsTotal,
);
}
@@ -580,7 +580,7 @@ public function myCartShippingFeeShouldBe(int $shippingTotal = 0): void
Assert::same(
$this->responseChecker->getValue($response, 'shippingTotal'),
- $shippingTotal
+ $shippingTotal,
);
}
@@ -692,7 +692,7 @@ private function removeOrderItemFromCart(string $orderItemId, string $tokenValue
'orders',
$tokenValue,
HttpRequest::METHOD_DELETE,
- \sprintf('items/%s', $orderItemId)
+ \sprintf('items/%s', $orderItemId),
);
$this->cartsClient->executeCustomRequest($request);
@@ -703,7 +703,7 @@ private function getProductForItem(array $item): Response
if (!isset($item['variant'])) {
throw new \InvalidArgumentException(
'Expected array to have variant key and variant to have product, but one these keys is missing. Current array: ' .
- $item
+ $item,
);
}
@@ -717,7 +717,7 @@ private function getProductVariantForItem(array $item): Response
if (!isset($item['variant'])) {
throw new \InvalidArgumentException(
'Expected array to have variant key and variant to have product, but one these keys is missing. Current array: ' .
- $item
+ $item,
);
}
@@ -767,7 +767,7 @@ private function hasItemWithNameAndQuantity(Response $response, string $productN
private function checkProductQuantity(
Response $cartResponse,
string $productName,
- int $quantity
+ int $quantity,
): void {
$items = $this->responseChecker->getValue($cartResponse, 'items');
@@ -780,8 +780,8 @@ private function checkProductQuantity(
$quantity,
SprintfResponseEscaper::provideMessageWithEscapedResponseContent(
sprintf('Quantity did not match. Expected %s.', $quantity),
- $cartResponse
- )
+ $cartResponse,
+ ),
);
}
}
diff --git a/src/Sylius/Behat/Context/Api/Shop/ChannelContext.php b/src/Sylius/Behat/Context/Api/Shop/ChannelContext.php
index d6c33f71367..8a94175fa74 100644
--- a/src/Sylius/Behat/Context/Api/Shop/ChannelContext.php
+++ b/src/Sylius/Behat/Context/Api/Shop/ChannelContext.php
@@ -31,7 +31,7 @@ final class ChannelContext implements Context
public function __construct(
ApiClientInterface $client,
ResponseCheckerInterface $responseChecker,
- SharedStorageInterface $sharedStorage
+ SharedStorageInterface $sharedStorage,
) {
$this->client = $client;
$this->responseChecker = $responseChecker;
@@ -61,10 +61,10 @@ public function iShouldShopUsingTheCurrency(string $currencyCode): void
{
Assert::same(
$this->responseChecker->getValue(
- $this->client->getLastResponse(),
- 'baseCurrency'
- )['code'],
- $currencyCode
+ $this->client->getLastResponse(),
+ 'baseCurrency',
+ )['code'],
+ $currencyCode,
);
}
}
diff --git a/src/Sylius/Behat/Context/Api/Shop/CheckoutContext.php b/src/Sylius/Behat/Context/Api/Shop/CheckoutContext.php
index 3a948eca6a5..9fb4c1ed565 100644
--- a/src/Sylius/Behat/Context/Api/Shop/CheckoutContext.php
+++ b/src/Sylius/Behat/Context/Api/Shop/CheckoutContext.php
@@ -83,7 +83,7 @@ public function __construct(
IriConverterInterface $iriConverter,
SharedStorageInterface $sharedStorage,
string $paymentMethodClass,
- string $shippingMethodClass
+ string $shippingMethodClass,
) {
$this->ordersClient = $ordersClient;
$this->addressesClient = $addressesClient;
@@ -128,7 +128,7 @@ public function iSpecifiedTheBillingAddress(): void
*/
public function iProceedOrderWithShippingMethodAndPayment(
ShippingMethodInterface $shippingMethod,
- PaymentMethodInterface $paymentMethod
+ PaymentMethodInterface $paymentMethod,
): void {
$this->iProceededWithShippingMethod($shippingMethod);
$this->iChoosePaymentMethod($paymentMethod);
@@ -197,7 +197,7 @@ public function iTryToSpecifyTheIncorrectBillingAddressAs(
string $street,
string $postcode,
string $countryName,
- string $customerName
+ string $customerName,
): void {
$addressType = 'billingAddress';
@@ -211,7 +211,7 @@ public function iTryToSpecifyTheBillingAddressWithoutCountryAs(
string $city,
string $street,
string $postcode,
- string $customerName
+ string $customerName,
): void {
$this->addAddress('billingAddress', $city, $street, $postcode, $customerName);
}
@@ -353,7 +353,7 @@ public function iConfirmMyOrder(): void
$this->sharedStorage->set('response', $response);
$this->sharedStorage->set(
'order_number',
- $this->responseChecker->getValue($response, 'number')
+ $this->responseChecker->getValue($response, 'number'),
);
}
@@ -382,7 +382,7 @@ public function iTryToSelectShippingMethod(string $shippingMethodCode): void
'orders',
$this->sharedStorage->get('cart_token'),
HTTPRequest::METHOD_PATCH,
- sprintf('shipments/%s', $this->getCart()['shipments'][0]['id'])
+ sprintf('shipments/%s', $this->getCart()['shipments'][0]['id']),
);
$request->setContent(['shippingMethod' => $this->iriConverter->getItemIriFromResourceClass($this->shippingMethodClass, ['code' => $shippingMethodCode])]);
@@ -400,7 +400,7 @@ public function iTryToSelectPaymentMethod(string $paymentMethodCode): void
'orders',
$this->sharedStorage->get('cart_token'),
HTTPRequest::METHOD_PATCH,
- sprintf('payments/%s', $this->getCart()['payments'][0]['id'])
+ sprintf('payments/%s', $this->getCart()['payments'][0]['id']),
);
$request->setContent(['paymentMethod' => $this->iriConverter->getItemIriFromResourceClass($this->paymentMethodClass, ['code' => $paymentMethodCode])]);
@@ -415,7 +415,7 @@ public function iShouldBeInformedThatShippingMethodWithCodeDoesNotExist(string $
{
Assert::true($this->isViolationWithMessageInResponse(
$this->ordersClient->getLastResponse(),
- sprintf('The shipping method with %s code does not exist.', $code)
+ sprintf('The shipping method with %s code does not exist.', $code),
));
}
@@ -460,7 +460,7 @@ public function iChoosePaymentMethod(PaymentMethodInterface $paymentMethod): voi
'orders',
$this->sharedStorage->get('cart_token'),
HTTPRequest::METHOD_PATCH,
- \sprintf('payments/%s', $this->getCart()['payments'][0]['id'])
+ \sprintf('payments/%s', $this->getCart()['payments'][0]['id']),
);
$request->setContent(['paymentMethod' => $this->iriConverter->getIriFromItem($paymentMethod)]);
@@ -506,7 +506,7 @@ public function iShouldBeOnTheCheckoutCompleteStep(): void
{
Assert::inArray(
$this->getCheckoutState(),
- [OrderCheckoutStates::STATE_PAYMENT_SKIPPED, OrderCheckoutStates::STATE_PAYMENT_SELECTED]
+ [OrderCheckoutStates::STATE_PAYMENT_SKIPPED, OrderCheckoutStates::STATE_PAYMENT_SELECTED],
);
}
@@ -514,7 +514,7 @@ public function iShouldBeOnTheCheckoutCompleteStep(): void
* @Then I should not be able to confirm order because products do not fit :shippingMethod requirements
*/
public function iShouldNotBeAbleToConfirmOrderBecauseDoNotBelongsToShippingCategory(
- ShippingMethodInterface $shippingMethod
+ ShippingMethodInterface $shippingMethod,
): void {
$this->iConfirmMyOrder();
@@ -526,8 +526,8 @@ public function iShouldNotBeAbleToConfirmOrderBecauseDoNotBelongsToShippingCateg
$response,
sprintf(
'Product does not fit requirements for %s shipping method. Please reselect your shipping method.',
- $shippingMethod->getName()
- )
+ $shippingMethod->getName(),
+ ),
));
}
@@ -543,9 +543,9 @@ public function iShouldNotBeAbleToSelectPaymentMethod(PaymentMethodInterface $pa
$this->ordersClient->getLastResponse(),
sprintf(
'The payment method %s is not available for this order. Please choose another one.',
- $paymentMethod->getName()
- )
- )
+ $paymentMethod->getName(),
+ ),
+ ),
);
}
@@ -557,8 +557,8 @@ public function iShouldBeInformedThatPaymentMethodWithCodeDoesNotExist(string $c
Assert::true(
$this->responseChecker->hasViolationWithMessage(
$this->ordersClient->getLastResponse(),
- sprintf('The payment method with %s code does not exist.', $code)
- )
+ sprintf('The payment method with %s code does not exist.', $code),
+ ),
);
}
@@ -603,7 +603,7 @@ public function iShouldBeOnTheCheckoutPaymentStep(): void
{
Assert::inArray(
$this->getCheckoutState(),
- [OrderCheckoutStates::STATE_SHIPPING_SELECTED, OrderCheckoutStates::STATE_SHIPPING_SKIPPED]
+ [OrderCheckoutStates::STATE_SHIPPING_SELECTED, OrderCheckoutStates::STATE_SHIPPING_SKIPPED],
);
}
@@ -721,7 +721,7 @@ public function iShouldBeNotifiedThatCountryDoesNotExist(string $countryName): v
{
$this->responseChecker->hasViolationWithMessage(
$this->ordersClient->getLastResponse(),
- sprintf('The country %s does not exist.', StringInflector::nameToLowercaseCode($countryName))
+ sprintf('The country %s does not exist.', StringInflector::nameToLowercaseCode($countryName)),
);
}
@@ -733,7 +733,7 @@ public function iShouldBeNotifiedThatAddressWithoutCountryCannotExist(): void
{
$this->responseChecker->hasViolationWithMessage(
$this->ordersClient->getLastResponse(),
- 'The address without country cannot exist'
+ 'The address without country cannot exist',
);
}
@@ -775,7 +775,7 @@ public function iShouldNotBeAbleToSelectShippingMethod(ShippingMethodInterface $
Assert::same($response->getStatusCode(), 422);
Assert::true($this->isViolationWithMessageInResponse($response, sprintf(
'The shipping method %s is not available for this order. Please reselect your shipping method.',
- $shippingMethod->getName()
+ $shippingMethod->getName(),
)));
}
@@ -834,7 +834,7 @@ public function iShouldHaveProductsInTheCart(int $quantity, string $productName)
{
Assert::true(
$this->hasProductWithNameAndQuantityInCart($productName, $quantity),
- sprintf('There is no product %s with quantity %d.', $productName, $quantity)
+ sprintf('There is no product %s with quantity %d.', $productName, $quantity),
);
}
@@ -847,7 +847,7 @@ public function myDiscountShouldBe(int $discount = 0): void
if ($this->sharedStorage->has('cart_token')) {
$discountTotal = $this->responseChecker->getValue(
$this->ordersClient->show($this->sharedStorage->get('cart_token')),
- 'orderPromotionTotal'
+ 'orderPromotionTotal',
);
Assert::same($discount, (int) $discountTotal);
@@ -907,7 +907,7 @@ public function iShouldBeNotifiedThatTheAndTheInShippingDetailsAreRequired(strin
foreach ([$firstElement, $secondElement] as $element) {
$violation = $this->getViolation(
$violations,
- $detailType . '.' . StringInflector::nameToCamelCase($element)
+ $detailType . '.' . StringInflector::nameToCamelCase($element),
);
Assert::same($violation['message'], sprintf('Please enter %s.', $element));
}
@@ -921,7 +921,7 @@ public function iShouldBeInformedThatThisProductHasBeenDisabled(ProductInterface
{
Assert::true($this->isViolationWithMessageInResponse(
$this->ordersClient->getLastResponse(),
- sprintf('This product %s has been disabled.', $product->getName())
+ sprintf('This product %s has been disabled.', $product->getName()),
));
}
@@ -932,7 +932,7 @@ public function iShouldBeInformedThatThisProductDoesNotExist(ProductInterface $p
{
Assert::true($this->isViolationWithMessageInResponse(
$this->ordersClient->getLastResponse(),
- sprintf('The product %s does not exist.', $product->getName())
+ sprintf('The product %s does not exist.', $product->getName()),
));
}
@@ -943,7 +943,7 @@ public function iShouldBeInformedThatProductVariantDoesNotExist(ProductVariantIn
{
Assert::true($this->isViolationWithMessageInResponse(
$this->ordersClient->getLastResponse(),
- sprintf('The product variant with %s does not exist.', $productVariant->getCode())
+ sprintf('The product variant with %s does not exist.', $productVariant->getCode()),
));
}
@@ -954,7 +954,7 @@ public function iShouldBeInformedThatProductVariantWithCodeDoesNotExist(string $
{
Assert::true($this->isViolationWithMessageInResponse(
$this->ordersClient->getLastResponse(),
- sprintf('The product variant with %s does not exist.', $code)
+ sprintf('The product variant with %s does not exist.', $code),
));
}
@@ -998,8 +998,8 @@ public function iShouldBeInformedThatThisPaymentMethodHasBeenDisabled(PaymentMet
$response,
sprintf(
'This payment method %s has been disabled. Please reselect your payment method.',
- $paymentMethod->getName()
- )
+ $paymentMethod->getName(),
+ ),
));
}
@@ -1033,7 +1033,7 @@ public function iTryToAddProductVariantWithCode(ProductInterface $product, strin
'orders',
$tokenValue,
HTTPRequest::METHOD_PATCH,
- 'items'
+ 'items',
);
$request->setContent([
@@ -1101,7 +1101,7 @@ public function iShouldBeNotifiedThatThisProductDoesNotHaveSufficientStock(Produ
Assert::true($this->responseChecker->hasViolationWithMessage(
$this->ordersClient->getLastResponse(),
- sprintf('The product variant with %s name does not have sufficient stock.', $variant->getName())
+ sprintf('The product variant with %s name does not have sufficient stock.', $variant->getName()),
));
}
@@ -1113,7 +1113,7 @@ private function assertProvinceMessage(string $addressType): void
Assert::true($this->isViolationWithMessageInResponse(
$response,
'Please select proper province.',
- $addressType
+ $addressType,
));
}
@@ -1144,7 +1144,7 @@ private function addressOrder(array $content): void
'orders',
$this->getCartTokenValue(),
HTTPRequest::METHOD_PATCH,
- 'address'
+ 'address',
);
$request->setContent($content);
@@ -1186,7 +1186,7 @@ private function getCartShippingMethods(array $cart): array
'orders',
$cart['tokenValue'],
HTTPRequest::METHOD_GET,
- sprintf('shipments/%s/methods', $cart['shipments'][0]['id'])
+ sprintf('shipments/%s/methods', $cart['shipments'][0]['id']),
);
$this->ordersClient->executeCustomRequest($request);
@@ -1234,7 +1234,7 @@ private function getPossiblePaymentMethods(): array
'orders',
$this->sharedStorage->get('cart_token'),
HTTPRequest::METHOD_GET,
- sprintf('payments/%s/methods', $order->getLastPayment()->getId())
+ sprintf('payments/%s/methods', $order->getLastPayment()->getId()),
);
$this->ordersClient->executeCustomRequest($request);
@@ -1296,11 +1296,11 @@ private function hasFullNameInAddress(string $fullName, string $addressType): vo
Assert::same(
$this->responseChecker->getResponseContent($response)[$addressType]['firstName'],
- $names[0]
+ $names[0],
);
Assert::same(
$this->responseChecker->getResponseContent($response)[$addressType]['lastName'],
- $names[1]
+ $names[1],
);
}
@@ -1311,7 +1311,7 @@ private function hasProvinceNameInAddress(string $provinceName, string $addressT
Assert::same(
$this->responseChecker->getResponseContent($response)[$addressType]['provinceName'],
- $provinceName
+ $provinceName,
);
}
@@ -1329,7 +1329,7 @@ private function putVariantToCart(ProductVariantInterface $productVariant, strin
'orders',
$tokenValue,
HTTPRequest::METHOD_PATCH,
- 'items'
+ 'items',
);
$request->setContent([
@@ -1347,7 +1347,7 @@ private function removeOrderItemFromCart(int $orderItemId, string $tokenValue):
'orders',
$tokenValue,
HttpRequest::METHOD_DELETE,
- \sprintf('items/%s', $orderItemId)
+ \sprintf('items/%s', $orderItemId),
);
$this->sharedStorage->set('response', $this->ordersClient->executeCustomRequest($request));
@@ -1400,7 +1400,7 @@ private function completeOrder(): Response
'orders',
$this->sharedStorage->get('cart_token'),
HTTPRequest::METHOD_PATCH,
- 'complete'
+ 'complete',
);
$request->setContent(['notes' => $notes]);
@@ -1415,7 +1415,7 @@ private function selectShippingMethod(ShippingMethodInterface $shippingMethod):
'orders',
$this->sharedStorage->get('cart_token'),
HTTPRequest::METHOD_PATCH,
- sprintf('shipments/%s', $this->getCart()['shipments'][0]['id'])
+ sprintf('shipments/%s', $this->getCart()['shipments'][0]['id']),
);
$request->setContent(['shippingMethod' => $this->iriConverter->getIriFromItem($shippingMethod)]);
@@ -1429,7 +1429,7 @@ private function addAddress(
string $street,
string $postcode,
string $customerName,
- ?string $countryName = null
+ ?string $countryName = null,
): void {
[$firstName, $lastName] = explode(' ', $customerName);
diff --git a/src/Sylius/Behat/Context/Api/Shop/CustomerContext.php b/src/Sylius/Behat/Context/Api/Shop/CustomerContext.php
index 4dec8fc0822..9163c22b751 100644
--- a/src/Sylius/Behat/Context/Api/Shop/CustomerContext.php
+++ b/src/Sylius/Behat/Context/Api/Shop/CustomerContext.php
@@ -50,7 +50,7 @@ public function __construct(
ResponseCheckerInterface $responseChecker,
RegistrationContext $registrationContext,
LoginContext $loginContext,
- ShopSecurityContext $shopApiSecurityContext
+ ShopSecurityContext $shopApiSecurityContext,
) {
$this->customerClient = $customerClient;
$this->orderShopClient = $orderShopClient;
@@ -275,7 +275,7 @@ public function iShouldBeNotifiedThatFirstNameIsRequired(): void
{
Assert::true($this->isViolationWithMessageInResponse(
$this->customerClient->getLastResponse(),
- 'First name must be at least 2 characters long.'
+ 'First name must be at least 2 characters long.',
));
}
@@ -286,7 +286,7 @@ public function iShouldBeNotifiedThatLastNameIsRequired(): void
{
Assert::true($this->isViolationWithMessageInResponse(
$this->customerClient->getLastResponse(),
- 'Last name must be at least 2 characters long.'
+ 'Last name must be at least 2 characters long.',
));
}
@@ -297,7 +297,7 @@ public function iShouldBeNotifiedThatEmailIsRequired(): void
{
Assert::true($this->isViolationWithMessageInResponse(
$this->customerClient->getLastResponse(),
- 'Please enter your email.'
+ 'Please enter your email.',
));
}
@@ -308,7 +308,7 @@ public function iShouldBeNotifiedThatTheEmailIsAlreadyUsed(): void
{
Assert::true($this->isViolationWithMessageInResponse(
$this->customerClient->getLastResponse(),
- 'This email is already used.'
+ 'This email is already used.',
));
}
@@ -319,7 +319,7 @@ public function iShouldBeNotifiedThatElementIsInvalid(): void
{
Assert::true($this->isViolationWithMessageInResponse(
$this->customerClient->getLastResponse(),
- 'This email is invalid.'
+ 'This email is invalid.',
));
}
@@ -330,7 +330,7 @@ public function iShouldBeNotifiedThatTheVerificationTokenIsInvalid(): void
{
$this->isViolationWithMessageInResponse(
$this->customerClient->getLastResponse(),
- sprintf('There is no shop user with %s email verification token.', $this->verificationToken)
+ sprintf('There is no shop user with %s email verification token.', $this->verificationToken),
);
}
@@ -372,8 +372,8 @@ public function thisOrderShouldHaveNumber(string $orderNumber): void
$this->responseChecker->hasItemWithValue(
$this->orderShopClient->getLastResponse(),
'number',
- $orderNumber
- )
+ $orderNumber,
+ ),
);
}
@@ -397,7 +397,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyChanged(): void
Assert::same(
$response->getStatusCode(),
204,
- $response->getContent()
+ $response->getContent(),
);
}
@@ -410,7 +410,7 @@ public function iShouldBeNotifiedThatProvidedPasswordIsDifferentThanTheCurrentOn
Assert::contains(
$this->responseChecker->getError($this->customerClient->getLastResponse()),
- 'Provided password is different than the current one.'
+ 'Provided password is different than the current one.',
);
}
@@ -423,7 +423,7 @@ public function iShouldBeNotifiedThatTheEnteredPasswordsDoNotMatch(): void
Assert::contains(
$this->responseChecker->getError($this->customerClient->getLastResponse()),
- 'newPassword: The entered passwords don\'t match'
+ 'newPassword: The entered passwords don\'t match',
);
}
@@ -434,7 +434,7 @@ public function iShouldBeNotifiedThatTheElementShouldBe(string $elementName, str
{
Assert::contains(
$this->responseChecker->getError($this->customerClient->getLastResponse()),
- sprintf('%s must be %s.', ucfirst($elementName), $validationMessage)
+ sprintf('%s must be %s.', ucfirst($elementName), $validationMessage),
);
}
@@ -471,7 +471,7 @@ public function iShouldBeUnableToResendVerificationEmail(): void
Assert::same(
$this->responseChecker->getError($this->customerClient->getLastResponse()),
\sprintf('Account with email %s is currently verified.', $user->getEmail()),
- 'Validation message is different then expected.'
+ 'Validation message is different then expected.',
);
}
diff --git a/src/Sylius/Behat/Context/Api/Shop/HomepageContext.php b/src/Sylius/Behat/Context/Api/Shop/HomepageContext.php
index f35881bbcff..70a70bb9551 100644
--- a/src/Sylius/Behat/Context/Api/Shop/HomepageContext.php
+++ b/src/Sylius/Behat/Context/Api/Shop/HomepageContext.php
@@ -30,7 +30,7 @@ final class HomepageContext implements Context
public function __construct(
ApiClientInterface $productsClient,
ApiClientInterface $taxonsClient,
- ResponseCheckerInterface $responseChecker
+ ResponseCheckerInterface $responseChecker,
) {
$this->productsClient = $productsClient;
$this->taxonsClient = $taxonsClient;
@@ -44,7 +44,7 @@ public function iCheckLatestProducts(): void
{
$this->productsClient->customAction(
'api/v2/shop/products?itemsPerPage=3&order[createdAt]=desc',
- HttpRequest::METHOD_GET
+ HttpRequest::METHOD_GET,
);
}
diff --git a/src/Sylius/Behat/Context/Api/Shop/LoginContext.php b/src/Sylius/Behat/Context/Api/Shop/LoginContext.php
index 803fa6ca001..20c08b773fd 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;
@@ -50,7 +50,7 @@ public function __construct(
IriConverterInterface $iriConverter,
AbstractBrowser $shopAuthenticationTokenClient,
ResponseCheckerInterface $responseChecker,
- SharedStorageInterface $sharedStorage
+ SharedStorageInterface $sharedStorage,
) {
$this->apiSecurityClient = $apiSecurityClient;
$this->apiClient = $apiClient;
@@ -79,7 +79,7 @@ public function iLogInWithTheEmail(string $email): void
[],
[],
['CONTENT_TYPE' => 'application/json', 'HTTP_ACCEPT' => 'application/json'],
- json_encode(['email' => $email, 'password' => 'sylius'])
+ json_encode(['email' => $email, 'password' => 'sylius']),
);
$response = $this->shopAuthenticationTokenClient->getResponse();
@@ -122,7 +122,7 @@ public function iFollowLinkOnMyEmailToResetPassword(ShopUserInterface $user): vo
{
$this->request = Request::custom(
sprintf('api/v2/shop/reset-password-requests/%s', $user->getPasswordResetToken()),
- HttpRequest::METHOD_PATCH
+ HttpRequest::METHOD_PATCH,
);
}
@@ -272,9 +272,9 @@ public function iShouldSeeWhoIAm(): void
Assert::same(
$this->responseChecker->getValue(
$this->shopAuthenticationTokenClient->getResponse(),
- 'customer'
+ 'customer',
),
- $this->iriConverter->getIriFromItem($customer)
+ $this->iriConverter->getIriFromItem($customer),
);
}
diff --git a/src/Sylius/Behat/Context/Api/Shop/OrderContext.php b/src/Sylius/Behat/Context/Api/Shop/OrderContext.php
index 1ec55fd7fa0..684640229f8 100644
--- a/src/Sylius/Behat/Context/Api/Shop/OrderContext.php
+++ b/src/Sylius/Behat/Context/Api/Shop/OrderContext.php
@@ -45,7 +45,7 @@ public function __construct(
ApiClientInterface $client,
ResponseCheckerInterface $responseChecker,
SharedStorageInterface $sharedStorage,
- IriConverterInterface $iriConverter
+ IriConverterInterface $iriConverter,
) {
$this->client = $client;
$this->responseChecker = $responseChecker;
@@ -65,10 +65,10 @@ public function iChangeMyPaymentMethodTo(PaymentMethodInterface $paymentMethod):
\sprintf(
'/api/v2/shop/account/orders/%s/payments/%s',
$order->getTokenValue(),
- (string) $order->getPayments()->first()->getId()
+ (string) $order->getPayments()->first()->getId(),
),
HttpRequest::METHOD_PATCH,
- $this->client->getToken()
+ $this->client->getToken(),
);
$request->setContent(['paymentMethod' => $this->iriConverter->getIriFromItem($paymentMethod)]);
@@ -106,11 +106,11 @@ public function iShouldBeAbleToAccessThisOrderDetails(): void
Assert::same($response->getStatusCode(), Response::HTTP_OK);
Assert::same(
$this->responseChecker->getValue($this->client->getLastResponse(), 'checkoutState'),
- OrderCheckoutStates::STATE_COMPLETED
+ OrderCheckoutStates::STATE_COMPLETED,
);
Assert::same(
$this->sharedStorage->get('order_number'),
- $this->responseChecker->getValue($this->client->getLastResponse(), 'number')
+ $this->responseChecker->getValue($this->client->getLastResponse(), 'number'),
);
}
@@ -131,7 +131,7 @@ public function iShouldSeeAsShippingAddress(
string $postcode,
string $city,
CountryInterface $country,
- string $addressType
+ string $addressType,
): void {
$address = $this->responseChecker->getValue($this->client->getLastResponse(), ($addressType . 'Address'));
@@ -176,7 +176,7 @@ public function theProductShouldBeInTheItemsList(string $productName): void
public function theShipmentStatusShouldBe(
string $elementType,
string $elementStatus,
- int $position = 0
+ int $position = 0,
): void {
$resources = $this->responseChecker->getValue($this->client->getLastResponse(), $elementType . 's');
@@ -200,9 +200,9 @@ public function iShouldSeeItsOrderSStatusAs(string $elementType, string $orderEl
StringInflector::codeToName(
$this->responseChecker->getValue(
$this->client->getLastResponse(),
- $elementType . 'State'
- )
- )
+ $elementType . 'State',
+ ),
+ ),
);
}
@@ -327,7 +327,7 @@ private function getAdjustmentsForOrderItem(string $itemId): array
{
$response = $this->client->customAction(
sprintf('/api/v2/shop/orders/%s/items/%s/adjustments', $this->sharedStorage->get('cart_token'), $itemId),
- HttpRequest::METHOD_GET
+ HttpRequest::METHOD_GET,
);
return $this->responseChecker->getCollection($response);
@@ -352,7 +352,7 @@ private function getProductForItem(array $item): Response
if (!isset($item['variant'])) {
throw new \InvalidArgumentException(
'Expected array to have variant key, but this key is missing. Current array: ' .
- json_encode($item)
+ json_encode($item),
);
}
diff --git a/src/Sylius/Behat/Context/Api/Shop/OrderItemContext.php b/src/Sylius/Behat/Context/Api/Shop/OrderItemContext.php
index 59c984e942e..f4fac06dd76 100644
--- a/src/Sylius/Behat/Context/Api/Shop/OrderItemContext.php
+++ b/src/Sylius/Behat/Context/Api/Shop/OrderItemContext.php
@@ -37,7 +37,7 @@ public function __construct(
ApiClientInterface $orderItemsClient,
ApiClientInterface $orderItemUnitsClient,
ResponseCheckerInterface $responseChecker,
- SharedStorageInterface $sharedStorage
+ SharedStorageInterface $sharedStorage,
) {
$this->orderItemsClient = $orderItemsClient;
$this->orderItemUnitsClient = $orderItemUnitsClient;
diff --git a/src/Sylius/Behat/Context/Api/Shop/PaymentContext.php b/src/Sylius/Behat/Context/Api/Shop/PaymentContext.php
index 8a4c9c34ab3..b4bf91f4a58 100644
--- a/src/Sylius/Behat/Context/Api/Shop/PaymentContext.php
+++ b/src/Sylius/Behat/Context/Api/Shop/PaymentContext.php
@@ -33,7 +33,7 @@ final class PaymentContext implements Context
public function __construct(
ApiClientInterface $paymentsClient,
ResponseCheckerInterface $responseChecker,
- SharedStorageInterface $sharedStorage
+ SharedStorageInterface $sharedStorage,
) {
$this->paymentsClient = $paymentsClient;
$this->responseChecker = $responseChecker;
diff --git a/src/Sylius/Behat/Context/Api/Shop/ProductContext.php b/src/Sylius/Behat/Context/Api/Shop/ProductContext.php
index f1337666345..b161e583a88 100644
--- a/src/Sylius/Behat/Context/Api/Shop/ProductContext.php
+++ b/src/Sylius/Behat/Context/Api/Shop/ProductContext.php
@@ -40,7 +40,7 @@ public function __construct(
ApiClientInterface $client,
ResponseCheckerInterface $responseChecker,
SharedStorageInterface $sharedStorage,
- IriConverterInterface $iriConverter
+ IriConverterInterface $iriConverter,
) {
$this->client = $client;
$this->responseChecker = $responseChecker;
@@ -117,7 +117,7 @@ public function iShouldSeeTheProduct(string $name): void
{
Assert::true($this->hasProductWithName(
$this->responseChecker->getCollection($this->client->getLastResponse()),
- $name
+ $name,
));
}
@@ -141,7 +141,7 @@ public function iShouldNotSeeTheProduct(string $name): void
{
Assert::false($this->hasProductWithName(
$this->responseChecker->getCollection($this->client->getLastResponse()),
- $name
+ $name,
));
}
@@ -154,7 +154,7 @@ public function iShouldSeeTheProductPrice(int $price): void
$this->hasProductWithPrice(
[$this->responseChecker->getResponseContent($this->client->getLastResponse())],
$price,
- )
+ ),
);
}
@@ -167,9 +167,9 @@ public function iShouldSeeTheProductWithPrice(ProductInterface $product, int $pr
$this->hasProductWithPrice(
$this->responseChecker->getCollection($this->client->getLastResponse()),
$price,
- $product->getCode()
+ $product->getCode(),
),
- sprintf('There is no product with %s code and %s price', $product->getCode(), $price)
+ sprintf('There is no product with %s code and %s price', $product->getCode(), $price),
);
}
@@ -182,9 +182,9 @@ public function iShouldSeeTheProductWithShortDescription(ProductInterface $produ
$this->hasProductWithNameAndShortDescription(
$this->responseChecker->getCollection($this->client->getLastResponse()),
$product->getName(),
- $shortDescription
+ $shortDescription,
),
- sprintf('There is no product with %s name and %s short description', $product->getName(), $shortDescription)
+ sprintf('There is no product with %s name and %s short description', $product->getName(), $shortDescription),
);
}
@@ -224,7 +224,7 @@ public function iShouldSeeOnlyProducts(int $count): void
Assert::same(
count($this->responseChecker->getCollection($this->client->getLastResponse())),
$count,
- 'Number of products from response is different then expected'
+ 'Number of products from response is different then expected',
);
}
@@ -238,8 +238,8 @@ public function iShouldNotSeeProductWithName(string $name): void
$this->client->getLastResponse(),
'en_US',
'name',
- $name
- )
+ $name,
+ ),
);
}
@@ -253,8 +253,8 @@ public function iShouldSeeProductName(string $name): void
$this->client->getLastResponse(),
'en_US',
'name',
- $name
- )
+ $name,
+ ),
);
Assert::same($this->responseChecker->getTranslationValue($this->client->getLastResponse(), 'name'), $name);
@@ -275,8 +275,8 @@ public function itsCurrentVariantShouldBeNamed(string $variantName): void
$this->client->getLastResponse(),
'en_US',
'name',
- $variantName
- )
+ $variantName,
+ ),
);
}
@@ -318,7 +318,7 @@ public function theyShouldHaveOrderLikeAnd(string ...$productNames): void
public function theProductPriceShouldBe(int $price): void
{
$defaultVariantResponse = $this->client->showByIri(
- $this->responseChecker->getValue($this->client->getLastResponse(), 'defaultVariant')
+ $this->responseChecker->getValue($this->client->getLastResponse(), 'defaultVariant'),
);
Assert::same($this->responseChecker->getValue($defaultVariantResponse, 'price'), $price);
@@ -331,12 +331,12 @@ public function iShouldSeeTheProductDescription(string $description): void
{
Assert::same(
$this->responseChecker->getValue($this->client->getLastResponse(), 'description'),
- $description
+ $description,
);
Assert::same(
$this->responseChecker->getValue($this->client->getLastResponse(), 'translations')['en_US']['description'],
- $description
+ $description,
);
}
diff --git a/src/Sylius/Behat/Context/Api/Shop/ProductReviewContext.php b/src/Sylius/Behat/Context/Api/Shop/ProductReviewContext.php
index 17f65587a02..1bbfb8eb55b 100644
--- a/src/Sylius/Behat/Context/Api/Shop/ProductReviewContext.php
+++ b/src/Sylius/Behat/Context/Api/Shop/ProductReviewContext.php
@@ -36,7 +36,7 @@ public function __construct(
ApiClientInterface $client,
ResponseCheckerInterface $responseChecker,
SharedStorageInterface $sharedStorage,
- IriConverterInterface $iriConverter
+ IriConverterInterface $iriConverter,
) {
$this->client = $client;
$this->responseChecker = $responseChecker;
@@ -145,7 +145,7 @@ public function iShouldBeNotifiedThatMyReviewIsWaitingForTheAcceptation(): void
{
Assert::same(
$this->responseChecker->getValue($this->client->getLastResponse(), 'status'),
- ReviewInterface::STATUS_NEW
+ ReviewInterface::STATUS_NEW,
);
}
diff --git a/src/Sylius/Behat/Context/Api/Shop/PromotionContext.php b/src/Sylius/Behat/Context/Api/Shop/PromotionContext.php
index cffb3f73ec2..9f8736a256a 100644
--- a/src/Sylius/Behat/Context/Api/Shop/PromotionContext.php
+++ b/src/Sylius/Behat/Context/Api/Shop/PromotionContext.php
@@ -32,7 +32,7 @@ final class PromotionContext implements Context
public function __construct(
ApiClientInterface $cartsClient,
SharedStorageInterface $sharedStorage,
- ResponseCheckerInterface $responseChecker
+ ResponseCheckerInterface $responseChecker,
) {
$this->cartsClient = $cartsClient;
$this->sharedStorage = $sharedStorage;
diff --git a/src/Sylius/Behat/Context/Api/Shop/RegistrationContext.php b/src/Sylius/Behat/Context/Api/Shop/RegistrationContext.php
index 0fdf31cf29d..44b70d3c497 100644
--- a/src/Sylius/Behat/Context/Api/Shop/RegistrationContext.php
+++ b/src/Sylius/Behat/Context/Api/Shop/RegistrationContext.php
@@ -40,7 +40,7 @@ public function __construct(
ApiClientInterface $customerClient,
LoginContext $loginContext,
SharedStorageInterface $sharedStorage,
- ResponseCheckerInterface $responseChecker
+ ResponseCheckerInterface $responseChecker,
) {
$this->client = $client;
$this->customerClient = $customerClient;
@@ -125,7 +125,7 @@ public function iVerifyMyAccountUsingLink(CustomerInterface $customer): void
[],
[],
['HTTP_ACCEPT' => 'application/ld+json', 'CONTENT_TYPE' => 'application/merge-patch+json'],
- json_encode([], \JSON_THROW_ON_ERROR)
+ json_encode([], \JSON_THROW_ON_ERROR),
);
}
@@ -159,7 +159,7 @@ public function iRegisterThisAccount(): void
[],
[],
['HTTP_ACCEPT' => 'application/ld+json', 'CONTENT_TYPE' => 'application/ld+json'],
- json_encode($this->content, \JSON_THROW_ON_ERROR)
+ json_encode($this->content, \JSON_THROW_ON_ERROR),
);
$this->content = [];
}
@@ -206,7 +206,7 @@ public function iShouldBeNotifiedThatFieldHaveToBeProvided(string ...$fields): v
Assert::same(
$content['message'],
- 'Request does not have the following required fields specified: ' . implode(', ', $fields) . '.'
+ 'Request does not have the following required fields specified: ' . implode(', ', $fields) . '.',
);
Assert::same($content['code'], 400);
}
@@ -278,7 +278,7 @@ private function assertFieldValidationMessage(string $path, string $message): vo
Assert::keyExists($decodedResponse, 'violations');
Assert::same(
$decodedResponse['violations'][0],
- ['propertyPath' => $path, 'message' => $message, 'code' => $decodedResponse['violations'][0]['code']]
+ ['propertyPath' => $path, 'message' => $message, 'code' => $decodedResponse['violations'][0]['code']],
);
}
diff --git a/src/Sylius/Behat/Context/Api/Shop/ShipmentContext.php b/src/Sylius/Behat/Context/Api/Shop/ShipmentContext.php
index 188e1cd22d4..200c23d6ac6 100644
--- a/src/Sylius/Behat/Context/Api/Shop/ShipmentContext.php
+++ b/src/Sylius/Behat/Context/Api/Shop/ShipmentContext.php
@@ -33,7 +33,7 @@ final class ShipmentContext implements Context
public function __construct(
ApiClientInterface $shipmentsClient,
ResponseCheckerInterface $responseChecker,
- SharedStorageInterface $sharedStorage
+ SharedStorageInterface $sharedStorage,
) {
$this->shipmentsClient = $shipmentsClient;
$this->responseChecker = $responseChecker;
diff --git a/src/Sylius/Behat/Context/Cli/CancelUnpaidOrdersContext.php b/src/Sylius/Behat/Context/Cli/CancelUnpaidOrdersContext.php
index 763be2a8752..1e368cf08a9 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 c1f136ed78e..8325f250bf9 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 73dc7ef2efc..b9bca864f87 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/Domain/CartContext.php b/src/Sylius/Behat/Context/Domain/CartContext.php
index 47ee59ba9bd..be464f87e18 100644
--- a/src/Sylius/Behat/Context/Domain/CartContext.php
+++ b/src/Sylius/Behat/Context/Domain/CartContext.php
@@ -27,7 +27,7 @@ final class CartContext implements Context
public function __construct(
ObjectManager $orderManager,
- ExpiredCartsRemoverInterface $expiredCartsRemover
+ ExpiredCartsRemoverInterface $expiredCartsRemover,
) {
$this->orderManager = $orderManager;
$this->expiredCartsRemover = $expiredCartsRemover;
diff --git a/src/Sylius/Behat/Context/Domain/ManagingOrdersContext.php b/src/Sylius/Behat/Context/Domain/ManagingOrdersContext.php
index 614dd71ef4c..6d0dee3ea21 100644
--- a/src/Sylius/Behat/Context/Domain/ManagingOrdersContext.php
+++ b/src/Sylius/Behat/Context/Domain/ManagingOrdersContext.php
@@ -51,7 +51,7 @@ public function __construct(
RepositoryInterface $adjustmentRepository,
ObjectManager $orderManager,
ProductVariantResolverInterface $variantResolver,
- UnpaidOrdersStateUpdaterInterface $unpaidOrdersStateUpdater
+ UnpaidOrdersStateUpdaterInterface $unpaidOrdersStateUpdater,
) {
$this->sharedStorage = $sharedStorage;
$this->orderRepository = $orderRepository;
diff --git a/src/Sylius/Behat/Context/Domain/ManagingProductsContext.php b/src/Sylius/Behat/Context/Domain/ManagingProductsContext.php
index 0ea7a7d976f..a1bc7de8c28 100644
--- a/src/Sylius/Behat/Context/Domain/ManagingProductsContext.php
+++ b/src/Sylius/Behat/Context/Domain/ManagingProductsContext.php
@@ -35,7 +35,7 @@ public function __construct(
SharedStorageInterface $sharedStorage,
RepositoryInterface $productRepository,
RepositoryInterface $productVariantRepository,
- RepositoryInterface $productReviewRepository
+ RepositoryInterface $productReviewRepository,
) {
$this->sharedStorage = $sharedStorage;
$this->productRepository = $productRepository;
diff --git a/src/Sylius/Behat/Context/Domain/ManagingPromotionsContext.php b/src/Sylius/Behat/Context/Domain/ManagingPromotionsContext.php
index 003c598986d..d263bb1780a 100644
--- a/src/Sylius/Behat/Context/Domain/ManagingPromotionsContext.php
+++ b/src/Sylius/Behat/Context/Domain/ManagingPromotionsContext.php
@@ -28,7 +28,7 @@ final class ManagingPromotionsContext implements Context
public function __construct(
SharedStorageInterface $sharedStorage,
- PromotionRepositoryInterface $promotionRepository
+ PromotionRepositoryInterface $promotionRepository,
) {
$this->sharedStorage = $sharedStorage;
$this->promotionRepository = $promotionRepository;
diff --git a/src/Sylius/Behat/Context/Setup/AddressContext.php b/src/Sylius/Behat/Context/Setup/AddressContext.php
index d36bdc6ec60..256171bfa94 100644
--- a/src/Sylius/Behat/Context/Setup/AddressContext.php
+++ b/src/Sylius/Behat/Context/Setup/AddressContext.php
@@ -33,7 +33,7 @@ final class AddressContext implements Context
public function __construct(
AddressRepositoryInterface $addressRepository,
ObjectManager $customerManager,
- SharedStorageInterface $sharedStorage
+ SharedStorageInterface $sharedStorage,
) {
$this->addressRepository = $addressRepository;
$this->customerManager = $customerManager;
diff --git a/src/Sylius/Behat/Context/Setup/AdminSecurityContext.php b/src/Sylius/Behat/Context/Setup/AdminSecurityContext.php
index 415a983eeb1..034ab6ada86 100644
--- a/src/Sylius/Behat/Context/Setup/AdminSecurityContext.php
+++ b/src/Sylius/Behat/Context/Setup/AdminSecurityContext.php
@@ -34,7 +34,7 @@ public function __construct(
SharedStorageInterface $sharedStorage,
SecurityServiceInterface $securityService,
ExampleFactoryInterface $userFactory,
- UserRepositoryInterface $userRepository
+ UserRepositoryInterface $userRepository,
) {
$this->sharedStorage = $sharedStorage;
$this->securityService = $securityService;
diff --git a/src/Sylius/Behat/Context/Setup/AdminUserContext.php b/src/Sylius/Behat/Context/Setup/AdminUserContext.php
index a8cc14588ac..4a3ea135114 100644
--- a/src/Sylius/Behat/Context/Setup/AdminUserContext.php
+++ b/src/Sylius/Behat/Context/Setup/AdminUserContext.php
@@ -43,7 +43,7 @@ public function __construct(
UserRepositoryInterface $userRepository,
ImageUploaderInterface $imageUploader,
ObjectManager $objectManager,
- \ArrayAccess $minkParameters
+ \ArrayAccess $minkParameters,
) {
$this->sharedStorage = $sharedStorage;
$this->userFactory = $userFactory;
diff --git a/src/Sylius/Behat/Context/Setup/CartContext.php b/src/Sylius/Behat/Context/Setup/CartContext.php
index c59e2bbc281..9c7435e784b 100644
--- a/src/Sylius/Behat/Context/Setup/CartContext.php
+++ b/src/Sylius/Behat/Context/Setup/CartContext.php
@@ -41,7 +41,7 @@ public function __construct(
MessageBusInterface $commandBus,
ProductVariantResolverInterface $productVariantResolver,
RandomnessGeneratorInterface $generator,
- SharedStorageInterface $sharedStorage
+ SharedStorageInterface $sharedStorage,
) {
$this->commandBus = $commandBus;
$this->productVariantResolver = $productVariantResolver;
@@ -89,7 +89,7 @@ public function iHaveVariantOfProductInTheCart(ProductVariantInterface $productV
$this->commandBus->dispatch(AddItemToCart::createFromData(
$tokenValue,
$productVariant->getCode(),
- 1
+ 1,
));
$this->sharedStorage->set('product', $productVariant->getProduct());
@@ -102,7 +102,7 @@ public function iAddThisProductWithToTheCart(
ProductInterface $product,
ProductOptionInterface $productOption,
string $productOptionValue,
- ?string $tokenValue
+ ?string $tokenValue,
): void {
if ($tokenValue === null) {
$tokenValue = $this->pickupCart();
@@ -114,10 +114,10 @@ public function iAddThisProductWithToTheCart(
->getProductVariantWithProductOptionAndProductOptionValue(
$product,
$productOption,
- $productOptionValue
+ $productOptionValue,
)
->getCode(),
- 1
+ 1,
));
}
@@ -154,7 +154,7 @@ private function pickupCart(): string
private function getProductVariantWithProductOptionAndProductOptionValue(
ProductInterface $product,
ProductOptionInterface $productOption,
- string $productOptionValue
+ string $productOptionValue,
): ?ProductVariantInterface {
foreach ($product->getVariants() as $productVariant) {
/** @var ProductOptionValueInterface $variantProductOptionValue */
@@ -180,7 +180,7 @@ private function addProductToCart(ProductInterface $product, ?string $tokenValue
$this->commandBus->dispatch(AddItemToCart::createFromData(
$tokenValue,
$this->productVariantResolver->getVariant($product)->getCode(),
- $quantity
+ $quantity,
));
$this->sharedStorage->set('product', $product);
diff --git a/src/Sylius/Behat/Context/Setup/ChannelContext.php b/src/Sylius/Behat/Context/Setup/ChannelContext.php
index 35436022e50..9b0ad83a351 100644
--- a/src/Sylius/Behat/Context/Setup/ChannelContext.php
+++ b/src/Sylius/Behat/Context/Setup/ChannelContext.php
@@ -46,7 +46,7 @@ public function __construct(
DefaultChannelFactoryInterface $unitedStatesChannelFactory,
DefaultChannelFactoryInterface $defaultChannelFactory,
ChannelRepositoryInterface $channelRepository,
- ObjectManager $channelManager
+ ObjectManager $channelManager,
) {
$this->sharedStorage = $sharedStorage;
$this->channelContextSetter = $channelContextSetter;
@@ -177,7 +177,7 @@ public function onThisChannelShippingStepIsSkippedIfOnlyASingleShippingMethodIsA
* @Given /^on (this channel) payment step is skipped if only a single payment method is available$/
*/
public function onThisChannelPaymentStepIsSkippedIfOnlyASinglePaymentMethodIsAvailable(
- ChannelInterface $channel
+ ChannelInterface $channel,
) {
$channel->setSkippingPaymentStepAllowed(true);
@@ -204,7 +204,7 @@ public function channelBillingDataIs(
string $postcode,
string $city,
CountryInterface $country,
- string $taxId
+ string $taxId,
): void {
$shopBillingData = new ShopBillingData();
$shopBillingData->setCompany($company);
diff --git a/src/Sylius/Behat/Context/Setup/CheckoutContext.php b/src/Sylius/Behat/Context/Setup/CheckoutContext.php
index 22af8529bc9..d5fdcfaf11b 100644
--- a/src/Sylius/Behat/Context/Setup/CheckoutContext.php
+++ b/src/Sylius/Behat/Context/Setup/CheckoutContext.php
@@ -48,7 +48,7 @@ public function __construct(
RepositoryInterface $paymentMethodRepository,
MessageBusInterface $commandBus,
FactoryInterface $addressFactory,
- SharedStorageInterface $sharedStorage
+ SharedStorageInterface $sharedStorage,
) {
$this->orderRepository = $orderRepository;
$this->shippingMethodRepository = $shippingMethodRepository;
diff --git a/src/Sylius/Behat/Context/Setup/CurrencyContext.php b/src/Sylius/Behat/Context/Setup/CurrencyContext.php
index 0af83e07b0d..04f5aa28928 100644
--- a/src/Sylius/Behat/Context/Setup/CurrencyContext.php
+++ b/src/Sylius/Behat/Context/Setup/CurrencyContext.php
@@ -35,7 +35,7 @@ public function __construct(
SharedStorageInterface $sharedStorage,
RepositoryInterface $currencyRepository,
FactoryInterface $currencyFactory,
- ObjectManager $channelManager
+ ObjectManager $channelManager,
) {
$this->sharedStorage = $sharedStorage;
$this->currencyRepository = $currencyRepository;
diff --git a/src/Sylius/Behat/Context/Setup/CustomerContext.php b/src/Sylius/Behat/Context/Setup/CustomerContext.php
index e6795c665db..31dcb0f2a14 100644
--- a/src/Sylius/Behat/Context/Setup/CustomerContext.php
+++ b/src/Sylius/Behat/Context/Setup/CustomerContext.php
@@ -44,7 +44,7 @@ public function __construct(
ObjectManager $customerManager,
FactoryInterface $customerFactory,
FactoryInterface $userFactory,
- FactoryInterface $addressFactory
+ FactoryInterface $addressFactory,
) {
$this->sharedStorage = $sharedStorage;
$this->customerRepository = $customerRepository;
@@ -198,7 +198,7 @@ private function createCustomer(
$firstName = null,
$lastName = null,
\DateTimeInterface $createdAt = null,
- $phoneNumber = null
+ $phoneNumber = null,
) {
/** @var CustomerInterface $customer */
$customer = $this->customerFactory->createNew();
@@ -232,7 +232,7 @@ private function createCustomerWithUserAccount(
$enabled = true,
$firstName = null,
$lastName = null,
- $role = null
+ $role = null,
) {
/** @var ShopUserInterface $user */
$user = $this->userFactory->createNew();
diff --git a/src/Sylius/Behat/Context/Setup/CustomerGroupContext.php b/src/Sylius/Behat/Context/Setup/CustomerGroupContext.php
index 55fef982f10..c9f0fcd5232 100644
--- a/src/Sylius/Behat/Context/Setup/CustomerGroupContext.php
+++ b/src/Sylius/Behat/Context/Setup/CustomerGroupContext.php
@@ -31,7 +31,7 @@ final class CustomerGroupContext implements Context
public function __construct(
SharedStorageInterface $sharedStorage,
RepositoryInterface $customerGroupRepository,
- FactoryInterface $customerGroupFactory
+ FactoryInterface $customerGroupFactory,
) {
$this->sharedStorage = $sharedStorage;
$this->customerGroupRepository = $customerGroupRepository;
diff --git a/src/Sylius/Behat/Context/Setup/ExchangeRateContext.php b/src/Sylius/Behat/Context/Setup/ExchangeRateContext.php
index 480b11cddc2..096d24e4126 100644
--- a/src/Sylius/Behat/Context/Setup/ExchangeRateContext.php
+++ b/src/Sylius/Behat/Context/Setup/ExchangeRateContext.php
@@ -31,7 +31,7 @@ final class ExchangeRateContext implements Context
public function __construct(
SharedStorageInterface $sharedStorage,
FactoryInterface $exchangeRateFactory,
- ExchangeRateRepositoryInterface $exchangeRateRepository
+ ExchangeRateRepositoryInterface $exchangeRateRepository,
) {
$this->sharedStorage = $sharedStorage;
$this->exchangeRateFactory = $exchangeRateFactory;
@@ -44,7 +44,7 @@ public function __construct(
public function thereIsAnExchangeRateWithSourceCurrencyAndTargetCurrency(
CurrencyInterface $sourceCurrency,
CurrencyInterface $targetCurrency,
- $ratio
+ $ratio,
) {
$exchangeRate = $this->createExchangeRate($sourceCurrency, $targetCurrency, $ratio);
diff --git a/src/Sylius/Behat/Context/Setup/GeographicalContext.php b/src/Sylius/Behat/Context/Setup/GeographicalContext.php
index 77061f99625..4108c91a75c 100644
--- a/src/Sylius/Behat/Context/Setup/GeographicalContext.php
+++ b/src/Sylius/Behat/Context/Setup/GeographicalContext.php
@@ -42,7 +42,7 @@ public function __construct(
FactoryInterface $provinceFactory,
RepositoryInterface $countryRepository,
CountryNameConverterInterface $countryNameConverter,
- ObjectManager $countryManager
+ ObjectManager $countryManager,
) {
$this->sharedStorage = $sharedStorage;
$this->countryFactory = $countryFactory;
diff --git a/src/Sylius/Behat/Context/Setup/LocaleContext.php b/src/Sylius/Behat/Context/Setup/LocaleContext.php
index b90c39a8aa9..37a8290b62f 100644
--- a/src/Sylius/Behat/Context/Setup/LocaleContext.php
+++ b/src/Sylius/Behat/Context/Setup/LocaleContext.php
@@ -42,7 +42,7 @@ public function __construct(
FactoryInterface $localeFactory,
RepositoryInterface $localeRepository,
ObjectManager $localeManager,
- ObjectManager $channelManager
+ ObjectManager $channelManager,
) {
$this->sharedStorage = $sharedStorage;
$this->localeConverter = $localeConverter;
diff --git a/src/Sylius/Behat/Context/Setup/OrderContext.php b/src/Sylius/Behat/Context/Setup/OrderContext.php
index aafbda98686..16c85f69df6 100644
--- a/src/Sylius/Behat/Context/Setup/OrderContext.php
+++ b/src/Sylius/Behat/Context/Setup/OrderContext.php
@@ -93,7 +93,7 @@ public function __construct(
ShippingMethodRepositoryInterface $shippingMethodRepository,
ProductVariantResolverInterface $variantResolver,
OrderItemQuantityModifierInterface $itemQuantityModifier,
- ObjectManager $objectManager
+ ObjectManager $objectManager,
) {
$this->sharedStorage = $sharedStorage;
$this->orderFactory = $orderFactory;
@@ -123,7 +123,7 @@ public function __construct(
public function thereIsCustomerThatPlacedOrder(
CustomerInterface $customer,
string $orderNumber = null,
- ChannelInterface $channel = null
+ ChannelInterface $channel = null,
): void {
$order = $this->createOrder($customer, $orderNumber, $channel);
@@ -150,7 +150,7 @@ public function thereIsACustomerThatPlacedOrderWithProductToBasedBillingAddressW
ProductInterface $product,
AddressInterface $address,
ShippingMethodInterface $shippingMethod,
- PaymentMethodInterface $paymentMethod
+ PaymentMethodInterface $paymentMethod,
) {
$this->placeOrder($product, $shippingMethod, $address, $paymentMethod, $customer, 1);
$this->objectManager->flush();
@@ -164,7 +164,7 @@ public function theGuestCustomerPlacedOrderWithForAndBasedShippingAddress(
string $email,
AddressInterface $address,
ShippingMethodInterface $shippingMethod,
- PaymentMethodInterface $paymentMethod
+ PaymentMethodInterface $paymentMethod,
) {
$customer = $this->createCustomer($email);
@@ -182,7 +182,7 @@ public function theAnotherGuestCustomerPlacedOrderWithForAndBasedShippingAddress
string $email,
AddressInterface $address,
ShippingMethodInterface $shippingMethod,
- PaymentMethodInterface $paymentMethod
+ PaymentMethodInterface $paymentMethod,
) {
$customer = $this->createCustomer($email);
@@ -216,7 +216,7 @@ public function theCustomerAddedProductToTheCart(CustomerInterface $customer, Pr
$cart,
$this->sharedStorage->get('channel'),
$this->variantResolver->getVariant($product),
- 1
+ 1,
);
$this->orderRepository->add($cart);
@@ -300,7 +300,7 @@ public function theCustomerAddressedItToWithIdenticalBillingAddress(AddressInter
public function theCustomerChoseShippingToWithPayment(
ShippingMethodInterface $shippingMethod,
AddressInterface $address,
- PaymentMethodInterface $paymentMethod
+ PaymentMethodInterface $paymentMethod,
) {
/** @var OrderInterface $order */
$order = $this->sharedStorage->get('order');
@@ -337,7 +337,7 @@ public function theCustomerChoseShippingTo(ShippingMethodInterface $shippingMeth
*/
public function theCustomerChoseShippingWithPayment(
ShippingMethodInterface $shippingMethod,
- PaymentMethodInterface $paymentMethod
+ PaymentMethodInterface $paymentMethod,
) {
/** @var OrderInterface $order */
$order = $this->sharedStorage->get('order');
@@ -403,7 +403,7 @@ public function theCustomerBoughtSingleProduct(ProductInterface $product, ?Chann
*/
public function theCustomerBoughtAnotherProductWithSeparateShipment(
ProductInterface $product,
- ShippingMethodInterface $shippingMethod
+ ShippingMethodInterface $shippingMethod,
): void {
$this->addProductVariantToOrder($this->variantResolver->getVariant($product), 1);
@@ -492,7 +492,7 @@ public function iHaveAlreadyPlacedOrderNthTimes(
ProductInterface $product,
ShippingMethodInterface $shippingMethod,
AddressInterface $address,
- PaymentMethodInterface $paymentMethod
+ PaymentMethodInterface $paymentMethod,
) {
$customer = $user->getCustomer();
for ($i = 0; $i < $numberOfOrders; ++$i) {
@@ -512,7 +512,7 @@ public function thereIsAOrderWithProduct(
string $orderNumber,
ProductInterface $product,
string $state = null,
- ?ChannelInterface $channel = null
+ ?ChannelInterface $channel = null,
): void {
$order = $this->createOrder($this->createOrProvideCustomer('amba@fatima.org'), $orderNumber, $channel);
@@ -583,7 +583,7 @@ public function thisCustomerPlacedOrdersOnChannelBuyingProducts(
int $orderCount,
ChannelInterface $channel,
int $productCount,
- ProductInterface $product
+ ProductInterface $product,
): void {
$this->createOrdersForCustomer($customer, $orderCount, $channel, $productCount, $product);
}
@@ -596,7 +596,7 @@ public function thisCustomerFulfilledOrdersPlacedOnChannelBuyingProducts(
int $orderCount,
ChannelInterface $channel,
int $productCount,
- ProductInterface $product
+ ProductInterface $product,
): void {
$this->createOrdersForCustomer($customer, $orderCount, $channel, $productCount, $product, true);
}
@@ -633,7 +633,7 @@ public function customersHaveAddedProductsToTheCartForTotalOf($numberOfCustomers
public function customersHavePlacedOrdersForTotalOf(
string $total,
int $numberOfCustomers = 1,
- int $numberOfOrders = 1
+ int $numberOfOrders = 1,
): void {
$this->createOrders($numberOfCustomers, $numberOfOrders, $total);
}
@@ -645,7 +645,7 @@ public function customersHavePlacedOrdersForTotalOf(
public function customersHaveFulfilledOrdersPlacedForTotalOf(
int $numberOfCustomers,
int $numberOfOrders,
- string $total
+ string $total,
): void {
$this->createOrders($numberOfCustomers, $numberOfOrders, $total, true);
}
@@ -658,7 +658,7 @@ public function customersHavePlacedOrdersForTotalOfMostlyProduct(
int $numberOfCustomers,
int $numberOfOrders,
string $total,
- ProductInterface $product
+ ProductInterface $product,
): void {
$this->createOrdersWithProduct($numberOfCustomers, $numberOfOrders, $total, $product);
}
@@ -670,7 +670,7 @@ public function customersHaveFulfilledOrdersPlacedForTotalOfMostlyProduct(
int $numberOfCustomers,
int $numberOfOrders,
string $total,
- ProductInterface $product
+ ProductInterface $product,
): void {
$this->createOrdersWithProduct($numberOfCustomers, $numberOfOrders, $total, $product, true);
}
@@ -681,7 +681,7 @@ public function customersHaveFulfilledOrdersPlacedForTotalOfMostlyProduct(
public function thenMoreCustomersHavePaidOrdersPlacedForTotalOf(
int $numberOfCustomers,
int $numberOfOrders,
- string $total
+ string $total,
): void {
$this->createPaidOrders($numberOfCustomers, $numberOfOrders, $total);
}
@@ -694,7 +694,7 @@ public function customerHasPlacedAnOrderBuyingASingleProductForOnTheChannel(
$orderNumber,
ProductInterface $product,
$price,
- ChannelInterface $channel
+ ChannelInterface $channel,
) {
$order = $this->createOrder($customer, $orderNumber, $channel);
$order->setState(OrderInterface::STATE_NEW);
@@ -837,7 +837,7 @@ private function applyTransitionOnOrder(OrderInterface $order, string $transitio
private function addProductVariantToOrder(
ProductVariantInterface $productVariant,
$quantity = 1,
- ?ChannelInterface $channel = null
+ ?ChannelInterface $channel = null,
) {
$order = $this->sharedStorage->get('order');
@@ -845,7 +845,7 @@ private function addProductVariantToOrder(
$order,
$channel ?? $this->sharedStorage->get('channel'),
$productVariant,
- (int) $quantity
+ (int) $quantity,
);
return $order;
@@ -855,7 +855,7 @@ private function addProductVariantsToOrderWithChannelPrice(
OrderInterface $order,
ChannelInterface $channel,
ProductVariantInterface $productVariant,
- int $quantity = 1
+ int $quantity = 1,
) {
/** @var OrderItemInterface $item */
$item = $this->orderItemFactory->createNew();
@@ -880,7 +880,7 @@ private function createOrder(
CustomerInterface $customer,
$number = null,
ChannelInterface $channel = null,
- $localeCode = null
+ $localeCode = null,
) {
$order = $this->createCart($customer, $channel, $localeCode);
@@ -901,7 +901,7 @@ private function createOrder(
private function createCart(
CustomerInterface $customer,
ChannelInterface $channel = null,
- $localeCode = null
+ $localeCode = null,
) {
/** @var OrderInterface $order */
$order = $this->orderFactory->createNew();
@@ -966,7 +966,7 @@ private function checkoutUsing(
OrderInterface $order,
ShippingMethodInterface $shippingMethod,
AddressInterface $address,
- PaymentMethodInterface $paymentMethod
+ PaymentMethodInterface $paymentMethod,
) {
$order->setShippingAddress($address);
$order->setBillingAddress(clone $address);
@@ -1036,7 +1036,7 @@ private function createOrders(
int $numberOfCustomers,
int $numberOfOrders,
string $total,
- bool $isFulfilled = false
+ bool $isFulfilled = false,
): void {
$customers = $this->generateCustomers($numberOfCustomers);
$sampleProductVariant = $this->sharedStorage->get('variant');
@@ -1094,7 +1094,7 @@ private function createOrdersWithProduct(
int $numberOfOrders,
string $total,
ProductInterface $product,
- bool $isFulfilled = false
+ bool $isFulfilled = false,
): void {
$customers = $this->generateCustomers($numberOfCustomers);
$sampleProductVariant = $product->getVariants()->first();
@@ -1127,7 +1127,7 @@ private function createOrdersForCustomer(
ChannelInterface $channel,
int $productCount,
ProductInterface $product,
- bool $isFulfilled = false
+ bool $isFulfilled = false,
): void {
for ($i = 0; $i < $orderCount; ++$i) {
$order = $this->createOrder($customer, uniqid('#'), $channel);
@@ -1136,7 +1136,7 @@ private function createOrdersForCustomer(
$order,
$channel,
$this->variantResolver->getVariant($product),
- (int) $productCount
+ (int) $productCount,
);
$order->setState($isFulfilled ? OrderInterface::STATE_FULFILLED : OrderInterface::STATE_NEW);
@@ -1169,7 +1169,7 @@ private function placeOrder(
AddressInterface $address,
PaymentMethodInterface $paymentMethod,
CustomerInterface $customer,
- int $number
+ int $number,
): void {
/** @var ProductVariantInterface $variant */
$variant = $this->variantResolver->getVariant($product);
diff --git a/src/Sylius/Behat/Context/Setup/PaymentContext.php b/src/Sylius/Behat/Context/Setup/PaymentContext.php
index 16afacb2654..dbc390bf272 100644
--- a/src/Sylius/Behat/Context/Setup/PaymentContext.php
+++ b/src/Sylius/Behat/Context/Setup/PaymentContext.php
@@ -45,7 +45,7 @@ public function __construct(
ExampleFactoryInterface $paymentMethodExampleFactory,
FactoryInterface $paymentMethodTranslationFactory,
ObjectManager $paymentMethodManager,
- array $gatewayFactories
+ array $gatewayFactories,
) {
$this->sharedStorage = $sharedStorage;
$this->paymentMethodRepository = $paymentMethodRepository;
@@ -89,7 +89,7 @@ public function theStoreHasAPaymentMethodWithACode($paymentMethodName, $paymentM
*/
public function theStoreHasPaymentMethodWithCodeAndPaypalExpressCheckoutGateway(
$paymentMethodName,
- $paymentMethodCode
+ $paymentMethodCode,
) {
$paymentMethod = $this->createPaymentMethod($paymentMethodName, $paymentMethodCode, 'Paypal Express Checkout');
$paymentMethod->getGatewayConfig()->setConfig([
@@ -185,7 +185,7 @@ private function createPaymentMethod(
$gatewayFactory = 'Offline',
$description = '',
$addForCurrentChannel = true,
- $position = null
+ $position = null,
) {
$gatewayFactory = array_search($gatewayFactory, $this->gatewayFactories);
diff --git a/src/Sylius/Behat/Context/Setup/ProductAssociationContext.php b/src/Sylius/Behat/Context/Setup/ProductAssociationContext.php
index 4f0cd6ad70e..3b7c72251ff 100644
--- a/src/Sylius/Behat/Context/Setup/ProductAssociationContext.php
+++ b/src/Sylius/Behat/Context/Setup/ProductAssociationContext.php
@@ -47,7 +47,7 @@ public function __construct(
FactoryInterface $productAssociationFactory,
ProductAssociationTypeRepositoryInterface $productAssociationTypeRepository,
RepositoryInterface $productAssociationRepository,
- ObjectManager $objectManager
+ ObjectManager $objectManager,
) {
$this->sharedStorage = $sharedStorage;
$this->productAssociationTypeFactory = $productAssociationTypeFactory;
@@ -98,7 +98,7 @@ public function theStoreHasProductAssociationTypes(...$names)
public function theProductHasAnAssociationWithProduct(
ProductInterface $product,
ProductAssociationTypeInterface $productAssociationType,
- ProductInterface $associatedProduct
+ ProductInterface $associatedProduct,
) {
$this->createProductAssociation($product, $productAssociationType, [$associatedProduct]);
}
@@ -109,7 +109,7 @@ public function theProductHasAnAssociationWithProduct(
public function theProductHasAnAssociationWithProducts(
ProductInterface $product,
ProductAssociationTypeInterface $productAssociationType,
- array $associatedProducts
+ array $associatedProducts,
) {
$this->createProductAssociation($product, $productAssociationType, $associatedProducts);
}
@@ -140,7 +140,7 @@ private function createProductAssociationType($name, $code = null)
private function createProductAssociation(
ProductInterface $product,
ProductAssociationTypeInterface $productAssociationType,
- array $associatedProducts
+ array $associatedProducts,
) {
/** @var ProductAssociationInterface $productAssociation */
$productAssociation = $this->productAssociationFactory->createNew();
@@ -158,7 +158,7 @@ private function createProductAssociation(
private function addProductAssociationTypeTranslation(
ProductAssociationTypeInterface $productAssociationType,
string $name,
- string $locale
+ string $locale,
) {
/** @var ProductAssociationTypeTranslationInterface $translation */
$translation = $this->productAssociationTypeTranslationFactory->createNew();
diff --git a/src/Sylius/Behat/Context/Setup/ProductAttributeContext.php b/src/Sylius/Behat/Context/Setup/ProductAttributeContext.php
index 4860e6b82af..e41e5e48dfe 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;
@@ -46,7 +46,7 @@ public function __construct(
RepositoryInterface $productAttributeRepository,
AttributeFactoryInterface $productAttributeFactory,
FactoryInterface $productAttributeValueFactory,
- ObjectManager $objectManager
+ ObjectManager $objectManager,
) {
$this->sharedStorage = $sharedStorage;
$this->productAttributeRepository = $productAttributeRepository;
@@ -104,7 +104,7 @@ public function theStoreHasANonTranslatableProductAttribute(string $type, string
public function thisProductAttributeHasAValueInLocale(
ProductAttributeInterface $productAttribute,
string $value,
- string $localeCode
+ string $localeCode,
): void {
$choices = [
$this->faker->uuid => [
@@ -127,7 +127,7 @@ public function thisProductAttributeHasAValueInLocaleAndInLocale(
string $firstValue,
string $firstLocaleCode,
string $secondValue,
- string $secondLocaleCode
+ string $secondLocaleCode,
): void {
$choices = [
$this->faker->uuid => [
@@ -190,7 +190,7 @@ public function thisAttributeHasSetMinValueAsAndMaxValueAs(ProductAttributeInter
public function thisProductHasSelectAttributeWithValues(
ProductInterface $product,
string $productAttributeName,
- string ...$productAttributeValues
+ string ...$productAttributeValues,
): void {
$this->createSelectProductAttributeValue($product, $productAttributeName, $productAttributeValues);
}
@@ -202,7 +202,7 @@ public function thisProductHasSelectAttributeWithValueInLocale(
ProductInterface $product,
string $productAttributeName,
string $productAttributeValue,
- string $localeCode
+ string $localeCode,
): void {
$this->createSelectProductAttributeValue($product, $productAttributeName, [$productAttributeValue], $localeCode);
}
@@ -216,7 +216,7 @@ public function thisProductHasAttributeWithValue(
string $productAttributeType,
string $productAttributeName,
string $value,
- string $language = 'en_US'
+ string $language = 'en_US',
): void {
$attribute = $this->provideProductAttribute($productAttributeType, $productAttributeName);
$attributeValue = $this->createProductAttributeValue($value, $attribute, $language);
@@ -233,7 +233,7 @@ public function thisProductHasNonTranslatableTextAttributeWithValue(
string $productAttributeType,
string $productAttributeName,
string $value,
- string $language = 'en_US'
+ string $language = 'en_US',
): void {
$attribute = $this->provideProductAttribute($productAttributeType, $productAttributeName);
$attributeValue = $this->createProductAttributeValue($value, $attribute, $language, false);
@@ -273,7 +273,7 @@ public function thisProductHasCheckboxAttributeWithValue(
ProductInterface $product,
$productAttributeType,
$productAttributeName,
- $value
+ $value,
) {
$attribute = $this->provideProductAttribute($productAttributeType, $productAttributeName);
$booleanValue = ('Yes' === $value);
@@ -290,7 +290,7 @@ public function thisProductHasNonTranslatableCheckboxAttributeWithValue(
ProductInterface $product,
string $productAttributeType,
string $productAttributeName,
- $value
+ $value,
) {
$attribute = $this->provideProductAttribute($productAttributeType, $productAttributeName);
$booleanValue = ('Yes' === $value);
@@ -306,7 +306,7 @@ public function thisProductHasNonTranslatableCheckboxAttributeWithValue(
public function thisProductHasPercentAttributeWithValueAtPosition(
ProductInterface $product,
$productAttributeName,
- $position
+ $position,
) {
$attribute = $this->provideProductAttribute('percent', $productAttributeName);
$attribute->setPosition((int) $position);
@@ -324,7 +324,7 @@ public function thisProductHasDateTimeAttributeWithDate(
ProductInterface $product,
$productAttributeType,
$productAttributeName,
- $date
+ $date,
) {
$attribute = $this->provideProductAttribute($productAttributeType, $productAttributeName);
$attributeValue = $this->createProductAttributeValue(new \DateTime($date), $attribute);
@@ -341,7 +341,7 @@ public function thisProductHasNonTranslatableDateTimeAttributeWithDate(
ProductInterface $product,
string $productAttributeType,
string $productAttributeName,
- $date
+ $date,
) {
$attribute = $this->provideProductAttribute($productAttributeType, $productAttributeName);
$attributeValue = $this->createProductAttributeValue(new \DateTime($date), $attribute, 'en_US', false);
@@ -355,7 +355,7 @@ private function createProductAttribute(
string $type,
string $name,
?string $code = null,
- bool $translatable = true
+ bool $translatable = true,
): ProductAttributeInterface {
/** @var ProductAttributeInterface $productAttribute */
$productAttribute = $this->productAttributeFactory->createTyped($type);
@@ -396,7 +396,7 @@ private function createProductAttributeValue(
$value,
ProductAttributeInterface $attribute,
?string $localeCode = 'en_US',
- bool $translatable = true
+ bool $translatable = true,
): ProductAttributeValueInterface {
/** @var ProductAttributeValueInterface $attributeValue */
$attribute->setTranslatable($translatable);
@@ -422,7 +422,7 @@ private function createSelectProductAttributeValue(
ProductInterface $product,
string $productAttributeName,
array $values,
- string $localeCode = 'en_US'
+ string $localeCode = 'en_US',
): void {
$attribute = $this->provideProductAttribute(SelectAttributeType::TYPE, $productAttributeName);
diff --git a/src/Sylius/Behat/Context/Setup/ProductContext.php b/src/Sylius/Behat/Context/Setup/ProductContext.php
index 8e9163ace63..d6730d75c6a 100644
--- a/src/Sylius/Behat/Context/Setup/ProductContext.php
+++ b/src/Sylius/Behat/Context/Setup/ProductContext.php
@@ -92,13 +92,13 @@ public function __construct(
ProductVariantResolverInterface $defaultVariantResolver,
ImageUploaderInterface $imageUploader,
SlugGeneratorInterface $slugGenerator,
- $minkParameters
+ $minkParameters,
) {
if (!is_array($minkParameters) && !$minkParameters instanceof \ArrayAccess) {
throw new \InvalidArgumentException(sprintf(
'"$minkParameters" passed to "%s" has to be an array or implement "%s".',
self::class,
- \ArrayAccess::class
+ \ArrayAccess::class,
));
}
@@ -140,7 +140,7 @@ public function storeHasAProductPricedAt($productName, int $price = 100, Channel
public function thisProductHasOriginallyPriceInChannel(
ProductInterface $product,
int $originalPrice,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
/** @var ProductVariantInterface $productVariant */
$productVariant = $this->defaultVariantResolver->getVariant($product);
@@ -307,14 +307,14 @@ public function theProductHasVariantPricedAt(
ProductInterface $product,
$productVariantName,
$price,
- ChannelInterface $channel = null
+ ChannelInterface $channel = null,
) {
$this->createProductVariant(
$product,
$productVariantName,
$price,
StringInflector::nameToUppercaseCode($productVariantName),
- $channel ?? $this->sharedStorage->get('channel')
+ $channel ?? $this->sharedStorage->get('channel'),
);
}
@@ -324,7 +324,7 @@ public function theProductHasVariantPricedAt(
public function variantPricedAtInChannel(
ProductVariantInterface $productVariant,
int $price,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$productVariant->addChannelPricing($this->createChannelPricingForChannel($price, $channel));
@@ -337,7 +337,7 @@ public function variantPricedAtInChannel(
public function variantIsOriginalPricedAtInChannel(
ProductVariantInterface $productVariant,
int $originalPrice,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
/** @var ChannelPricingInterface $channelPricing */
$channelPricing = $productVariant->getChannelPricingForChannel($channel);
@@ -359,7 +359,7 @@ public function theProductHasVariants(ProductInterface $product, ...$variantName
$name,
0,
StringInflector::nameToUppercaseCode($name),
- $channel
+ $channel,
);
}
}
@@ -394,7 +394,7 @@ public function theProductHasVariantWithCode(ProductInterface $product, $variant
public function theProductHasVariantWhichDoesNotRequireShipping(
ProductInterface $product,
$productVariantName,
- $price
+ $price,
) {
$this->createProductVariant(
$product,
@@ -403,7 +403,7 @@ public function theProductHasVariantWhichDoesNotRequireShipping(
StringInflector::nameToUppercaseCode($productVariantName),
$this->sharedStorage->get('channel'),
null,
- false
+ false,
);
}
@@ -415,7 +415,7 @@ public function theProductHasVariantWhichDoesNotRequireShipping(
public function theProductHasVariantAtPosition(
ProductInterface $product,
$productVariantName,
- $position = null
+ $position = null,
) {
$this->createProductVariant(
$product,
@@ -423,7 +423,7 @@ public function theProductHasVariantAtPosition(
0,
StringInflector::nameToUppercaseCode($productVariantName),
$this->sharedStorage->get('channel'),
- $position
+ $position,
);
}
@@ -434,7 +434,7 @@ public function thisVariantIsAlsoPricedAtInChannel(ProductVariantInterface $prod
{
$productVariant->addChannelPricing($this->createChannelPricingForChannel(
$this->getPriceFromString(str_replace(['$', '€', '£'], '', $price)),
- $channel
+ $channel,
));
$this->objectManager->flush();
@@ -450,7 +450,7 @@ public function itHasVariantNamedInAndIn(ProductInterface $product, $firstName,
$firstName,
100,
StringInflector::nameToUppercaseCode($firstName),
- $this->sharedStorage->get('channel')
+ $this->sharedStorage->get('channel'),
);
$names = [$firstName => $firstLocale, $secondName => $secondLocale];
@@ -468,7 +468,7 @@ public function theProductHasVariantPricedAtIdentifiedBy(
ProductInterface $product,
$productVariantName,
$price,
- $code
+ $code,
) {
$this->createProductVariant($product, $productVariantName, $price, $code, $this->sharedStorage->get('channel'));
}
@@ -526,7 +526,7 @@ public function itComesInTheFollowingVariations(ProductInterface $product, Table
$variant->setCode(StringInflector::nameToUppercaseCode($variantHash['name']));
$variant->addChannelPricing($this->createChannelPricingForChannel(
$this->getPriceFromString(str_replace(['$', '€', '£'], '', $variantHash['price'])),
- $channel
+ $channel,
));
$variant->setProduct($product);
@@ -541,7 +541,7 @@ public function itComesInTheFollowingVariations(ProductInterface $product, Table
*/
public function productVariantBelongsToTaxCategory(
ProductVariantInterface $productVariant,
- TaxCategoryInterface $taxCategory
+ TaxCategoryInterface $taxCategory,
) {
$productVariant->setTaxCategory($taxCategory);
@@ -761,7 +761,7 @@ public function thisProductHasAnImageWithTypeForVariant(
ProductInterface $product,
string $imagePath,
string $imageType,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$this->createProductImage($product, $imagePath, $imageType, $variant);
}
@@ -897,7 +897,7 @@ public function productHasOption(
ProductInterface $product,
ProductOption $productOption,
string $optionValue,
- string $optionCode
+ string $optionCode,
): void {
/** @var ProductOptionValueInterface $productOptionValue */
$productOptionValue = $this->productOptionValueFactory->createNew();
@@ -1001,7 +1001,7 @@ public function theProductIsDisabled(ProductInterface $product): void
public function allTheProductVariantsWithTheColorAreDisabled(
ProductInterface $product,
string $optionValue,
- string $optionName
+ string $optionName,
): void {
foreach ($product->getVariants() as $variant) {
foreach ($variant->getOptionValues() as $variantOptionValue) {
@@ -1142,7 +1142,7 @@ private function createProductVariant(
ChannelInterface $channel = null,
$position = null,
$shippingRequired = true,
- int $currentStock = 0
+ int $currentStock = 0,
) {
$product->setVariantSelectionMethod(ProductInterface::VARIANT_SELECTION_CHOICE);
@@ -1238,7 +1238,7 @@ private function createProductImage(
ProductInterface $product,
string $imagePath,
string $imageType,
- ?ProductVariantInterface $variant = null
+ ?ProductVariantInterface $variant = null,
): void {
$filesPath = $this->getParameter('files_path');
diff --git a/src/Sylius/Behat/Context/Setup/ProductOptionContext.php b/src/Sylius/Behat/Context/Setup/ProductOptionContext.php
index 341501fc8b2..d100175ae80 100644
--- a/src/Sylius/Behat/Context/Setup/ProductOptionContext.php
+++ b/src/Sylius/Behat/Context/Setup/ProductOptionContext.php
@@ -39,7 +39,7 @@ public function __construct(
ProductOptionRepositoryInterface $productOptionRepository,
FactoryInterface $productOptionFactory,
FactoryInterface $productOptionValueFactory,
- ObjectManager $objectManager
+ ObjectManager $objectManager,
) {
$this->sharedStorage = $sharedStorage;
$this->productOptionRepository = $productOptionRepository;
@@ -73,7 +73,7 @@ public function theStoreHasAProductOptionAtPosition($name, $position)
public function thisProductOptionHasTheOptionValueWithCode(
ProductOptionInterface $productOption,
$productOptionValueName,
- $productOptionValueCode
+ $productOptionValueCode,
) {
$productOptionValue = $this->createProductOptionValue($productOptionValueName, $productOptionValueCode);
$productOption->addValue($productOptionValue);
diff --git a/src/Sylius/Behat/Context/Setup/ProductReviewContext.php b/src/Sylius/Behat/Context/Setup/ProductReviewContext.php
index 99c4ae0d85a..9a03dbd79dd 100644
--- a/src/Sylius/Behat/Context/Setup/ProductReviewContext.php
+++ b/src/Sylius/Behat/Context/Setup/ProductReviewContext.php
@@ -37,7 +37,7 @@ public function __construct(
SharedStorageInterface $sharedStorage,
FactoryInterface $productReviewFactory,
RepositoryInterface $productReviewRepository,
- StateMachineFactoryInterface $stateMachineFactory
+ StateMachineFactoryInterface $stateMachineFactory,
) {
$this->sharedStorage = $sharedStorage;
$this->productReviewFactory = $productReviewFactory;
@@ -63,7 +63,7 @@ public function thisProductHasAReviewTitledAndRatedAddedByCustomer(
$title,
$rating,
CustomerInterface $customer,
- $daysSinceCreation = null
+ $daysSinceCreation = null,
) {
$review = $this->createProductReview($product, $title, $rating, $title, $customer);
if (null !== $daysSinceCreation) {
@@ -81,7 +81,7 @@ public function thisProductHasAReviewTitledAndRatedWithACommentAddedByCustomer(
$title,
$rating,
$comment,
- CustomerInterface $customer
+ CustomerInterface $customer,
) {
$review = $this->createProductReview($product, $title, $rating, $comment, $customer);
@@ -95,7 +95,7 @@ public function thisProductHasAReviewTitledAndRatedAddedByCustomerWhichIsNotAcce
ProductInterface $product,
$title,
$rating,
- CustomerInterface $customer
+ CustomerInterface $customer,
) {
$review = $this->createProductReview($product, $title, $rating, $title, $customer, null);
@@ -149,7 +149,7 @@ private function createProductReview(
$rating,
$comment,
CustomerInterface $customer = null,
- $transition = ProductReviewTransitions::TRANSITION_ACCEPT
+ $transition = ProductReviewTransitions::TRANSITION_ACCEPT,
) {
/** @var ReviewInterface $review */
$review = $this->productReviewFactory->createNew();
diff --git a/src/Sylius/Behat/Context/Setup/ProductTaxonContext.php b/src/Sylius/Behat/Context/Setup/ProductTaxonContext.php
index 50001219617..ace487bdb20 100644
--- a/src/Sylius/Behat/Context/Setup/ProductTaxonContext.php
+++ b/src/Sylius/Behat/Context/Setup/ProductTaxonContext.php
@@ -28,7 +28,7 @@ final class ProductTaxonContext implements Context
public function __construct(
FactoryInterface $productTaxonFactory,
- ObjectManager $objectManager
+ ObjectManager $objectManager,
) {
$this->productTaxonFactory = $productTaxonFactory;
$this->objectManager = $objectManager;
diff --git a/src/Sylius/Behat/Context/Setup/PromotionContext.php b/src/Sylius/Behat/Context/Setup/PromotionContext.php
index cf57499842e..c178b2ee461 100644
--- a/src/Sylius/Behat/Context/Setup/PromotionContext.php
+++ b/src/Sylius/Behat/Context/Setup/PromotionContext.php
@@ -59,7 +59,7 @@ public function __construct(
TestPromotionFactoryInterface $testPromotionFactory,
PromotionRepositoryInterface $promotionRepository,
PromotionCouponGeneratorInterface $couponGenerator,
- ObjectManager $objectManager
+ ObjectManager $objectManager,
) {
$this->sharedStorage = $sharedStorage;
$this->actionFactory = $actionFactory;
@@ -99,7 +99,7 @@ public function thereIsAPromotionWithTotalPriceOfItemsFromTaxonRuleConfiguredWit
string $name,
TaxonInterface $taxon,
int $amount,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$promotion = $this->createPromotion($name);
$rule = $this->ruleFactory->createItemsFromTaxonTotal($channel->getCode(), $taxon->getCode(), $amount);
@@ -317,7 +317,7 @@ public function thisPromotionGivesDiscountToEveryOrderInTheChannelAndDiscountToE
int $firstChannelDiscount,
ChannelInterface $firstChannel,
int $secondChannelDiscount,
- ChannelInterface $secondChannel
+ ChannelInterface $secondChannel,
): void {
/** @var PromotionActionInterface $action */
$action = $this->actionFactory->createFixedDiscount($firstChannelDiscount, $firstChannel->getCode());
@@ -344,7 +344,7 @@ public function itGivesPercentageDiscountToEveryOrder(PromotionInterface $promot
public function itGivesFixedDiscountToEveryOrderWithQuantityAtLeast(
PromotionInterface $promotion,
int $discount,
- int $quantity
+ int $quantity,
): void {
$rule = $this->ruleFactory->createCartQuantity($quantity);
@@ -357,7 +357,7 @@ public function itGivesFixedDiscountToEveryOrderWithQuantityAtLeast(
public function itGivesFixedDiscountToEveryOrderWithItemsTotalAtLeast(
PromotionInterface $promotion,
int $discount,
- int $targetAmount
+ int $targetAmount,
): void {
$channelCode = $this->getChannelCode();
$rule = $this->ruleFactory->createItemTotal($channelCode, $targetAmount);
@@ -371,7 +371,7 @@ public function itGivesFixedDiscountToEveryOrderWithItemsTotalAtLeast(
public function itGivesPercentageDiscountToEveryOrderWithItemsTotalAtLeast(
PromotionInterface $promotion,
float $discount,
- int $targetAmount
+ int $targetAmount,
): void {
$channelCode = $this->getChannelCode();
$rule = $this->ruleFactory->createItemTotal($channelCode, $targetAmount);
@@ -385,7 +385,7 @@ public function itGivesPercentageDiscountToEveryOrderWithItemsTotalAtLeast(
public function itGivesOffOnEveryItemWhenItemTotalExceeds(
PromotionInterface $promotion,
float $discount,
- int $targetAmount
+ int $targetAmount,
): void {
$channelCode = $this->getChannelCode();
$rule = $this->ruleFactory->createItemTotal($channelCode, $targetAmount);
@@ -418,7 +418,7 @@ public function thePromotionGivesFreeShippingToEveryOrder(PromotionInterface $pr
public function itGivesPercentageOffEveryProductClassifiedAs(
PromotionInterface $promotion,
float $discount,
- TaxonInterface $taxon
+ TaxonInterface $taxon,
): void {
$this->createUnitPercentagePromotion($promotion, $discount, $this->getTaxonFilterConfiguration([$taxon->getCode()]));
}
@@ -429,7 +429,7 @@ public function itGivesPercentageOffEveryProductClassifiedAs(
public function itGivesFixedOffEveryProductClassifiedAs(
PromotionInterface $promotion,
int $discount,
- TaxonInterface $taxon
+ TaxonInterface $taxon,
): void {
$this->createUnitFixedPromotion($promotion, $discount, $this->getTaxonFilterConfiguration([$taxon->getCode()]));
}
@@ -440,7 +440,7 @@ public function itGivesFixedOffEveryProductClassifiedAs(
public function thisPromotionGivesOffOnEveryProductWithMinimumPriceAt(
PromotionInterface $promotion,
int $discount,
- int $amount
+ int $amount,
): void {
$this->createUnitFixedPromotion($promotion, $discount, $this->getPriceRangeFilterConfiguration($amount));
}
@@ -452,12 +452,12 @@ public function thisPromotionGivesOffOnEveryProductPricedBetween(
PromotionInterface $promotion,
int $discount,
int $minAmount,
- int $maxAmount
+ int $maxAmount,
): void {
$this->createUnitFixedPromotion(
$promotion,
$discount,
- $this->getPriceRangeFilterConfiguration($minAmount, $maxAmount)
+ $this->getPriceRangeFilterConfiguration($minAmount, $maxAmount),
);
}
@@ -467,7 +467,7 @@ public function thisPromotionGivesOffOnEveryProductPricedBetween(
public function thisPromotionPercentageGivesOffOnEveryProductWithMinimumPriceAt(
PromotionInterface $promotion,
float $discount,
- int $amount
+ int $amount,
): void {
$this->createUnitPercentagePromotion($promotion, $discount, $this->getPriceRangeFilterConfiguration($amount));
}
@@ -479,12 +479,12 @@ public function thisPromotionPercentageGivesOffOnEveryProductPricedBetween(
PromotionInterface $promotion,
float $discount,
int $minAmount,
- int $maxAmount
+ int $maxAmount,
): void {
$this->createUnitPercentagePromotion(
$promotion,
$discount,
- $this->getPriceRangeFilterConfiguration($minAmount, $maxAmount)
+ $this->getPriceRangeFilterConfiguration($minAmount, $maxAmount),
);
}
@@ -494,7 +494,7 @@ public function thisPromotionPercentageGivesOffOnEveryProductPricedBetween(
public function thePromotionGivesOffIfOrderContainsProductsClassifiedAs(
PromotionInterface $promotion,
int $discount,
- TaxonInterface $taxon
+ TaxonInterface $taxon,
): void {
$rule = $this->ruleFactory->createHasTaxon([$taxon->getCode()]);
@@ -507,7 +507,7 @@ public function thePromotionGivesOffIfOrderContainsProductsClassifiedAs(
public function thePromotionGivesOffIfOrderContainsProductsClassifiedAsOr(
PromotionInterface $promotion,
int $discount,
- array $taxons
+ array $taxons,
): void {
$rule = $this->ruleFactory->createHasTaxon([$taxons[0]->getCode(), $taxons[1]->getCode()]);
@@ -521,7 +521,7 @@ public function thePromotionGivesOffIfOrderContainsProductsClassifiedAsAndPriced
PromotionInterface $promotion,
int $discount,
TaxonInterface $taxon,
- int $amount
+ int $amount,
): void {
$channelCode = $this->getChannelCode();
$rule = $this->ruleFactory->createItemsFromTaxonTotal($channelCode, $taxon->getCode(), $amount);
@@ -556,7 +556,7 @@ public function itGivesPercentageOffOnEveryProductClassifiedAsAndAmountDiscountO
PromotionInterface $promotion,
float $productDiscount,
TaxonInterface $discountTaxon,
- int $orderDiscount
+ int $orderDiscount,
): void {
$this->createUnitPercentagePromotion($promotion, $productDiscount, $this->getTaxonFilterConfiguration([$discountTaxon->getCode()]));
$this->createFixedPromotion($promotion, $orderDiscount);
@@ -568,7 +568,7 @@ public function itGivesPercentageOffOnEveryProductClassifiedAsAndAmountDiscountO
public function itGivesOffOnEveryProductClassifiedAsAndAFreeShippingToEveryOrderWithItemsTotalEqualAtLeast(
PromotionInterface $promotion,
int $discount,
- int $targetAmount
+ int $targetAmount,
): void {
$freeShippingAction = $this->actionFactory->createShippingPercentageDiscount(1);
$promotion->addAction($freeShippingAction);
@@ -587,7 +587,7 @@ public function itGivesOffOnEveryProductClassifiedAsAndAFixedDiscountToEveryOrde
float $taxonDiscount,
TaxonInterface $taxon,
int $orderDiscount,
- int $targetAmount
+ int $targetAmount,
): void {
$channelCode = $this->getChannelCode();
@@ -600,7 +600,7 @@ public function itGivesOffOnEveryProductClassifiedAsAndAFixedDiscountToEveryOrde
$promotion,
$taxonDiscount,
$this->getTaxonFilterConfiguration([$taxon->getCode()]),
- $rule
+ $rule,
);
}
@@ -611,7 +611,7 @@ public function itGivesOffOnEveryProductClassifiedAsOrIfOrderContainsAnyProductC
PromotionInterface $promotion,
float $discount,
array $discountTaxons,
- array $targetTaxons
+ array $targetTaxons,
): void {
$discountTaxonsCodes = [$discountTaxons[0]->getCode(), $discountTaxons[1]->getCode()];
$targetTaxonsCodes = [$targetTaxons[0]->getCode(), $targetTaxons[1]->getCode()];
@@ -622,7 +622,7 @@ public function itGivesOffOnEveryProductClassifiedAsOrIfOrderContainsAnyProductC
$promotion,
$discount,
$this->getTaxonFilterConfiguration($discountTaxonsCodes),
- $rule
+ $rule,
);
}
@@ -633,7 +633,7 @@ public function itGivesOffOnEveryProductClassifiedAsIfOrderContainsAnyProductCla
PromotionInterface $promotion,
float $discount,
TaxonInterface $discountTaxon,
- TaxonInterface $targetTaxon
+ TaxonInterface $targetTaxon,
): void {
$rule = $this->ruleFactory->createHasTaxon([$targetTaxon->getCode()]);
@@ -641,7 +641,7 @@ public function itGivesOffOnEveryProductClassifiedAsIfOrderContainsAnyProductCla
$promotion,
$discount,
$this->getTaxonFilterConfiguration([$discountTaxon->getCode()]),
- $rule
+ $rule,
);
}
@@ -708,7 +708,7 @@ public function itGivesPercentageDiscountOffOnAProduct(PromotionInterface $promo
public function thePromotionGivesOffTheOrderForCustomersFromGroup(
PromotionInterface $promotion,
float $discount,
- CustomerGroupInterface $customerGroup
+ CustomerGroupInterface $customerGroup,
): void {
/** @var PromotionRuleInterface $rule */
$rule = $this->ruleFactory->createNew();
@@ -724,7 +724,7 @@ public function thePromotionGivesOffTheOrderForCustomersFromGroup(
public function itGivesDiscountOnShippingToEveryOrderOver(
PromotionInterface $promotion,
float $discount,
- int $itemTotal
+ int $itemTotal,
): void {
$channelCode = $this->getChannelCode();
$rule = $this->ruleFactory->createItemTotal($channelCode, $itemTotal);
@@ -750,7 +750,7 @@ public function iHaveGeneratedCouponsForThisPromotionWithCodeLengthPrefixAndSuff
PromotionInterface $promotion,
int $codeLength,
string $prefix,
- ?string $suffix = null
+ ?string $suffix = null,
): void {
$this->generateCoupons($amount, $promotion, $codeLength, $prefix, $suffix);
}
@@ -762,7 +762,7 @@ public function iHaveGeneratedCouponsForThisPromotionWithCodeLengthAndSuffix(
int $amount,
PromotionInterface $promotion,
int $codeLength,
- string $suffix
+ string $suffix,
): void {
$this->generateCoupons($amount, $promotion, $codeLength, null, $suffix);
}
@@ -805,7 +805,7 @@ private function createUnitFixedPromotion(
PromotionInterface $promotion,
int $discount,
array $configuration = [],
- PromotionRuleInterface $rule = null
+ PromotionRuleInterface $rule = null,
): void {
$channelCode = $this->getChannelCode();
@@ -813,7 +813,7 @@ private function createUnitFixedPromotion(
$promotion,
$this->actionFactory->createUnitFixedDiscount($discount, $channelCode),
[$channelCode => $configuration],
- $rule
+ $rule,
);
}
@@ -821,7 +821,7 @@ private function createUnitPercentagePromotion(
PromotionInterface $promotion,
float $discount,
array $configuration = [],
- PromotionRuleInterface $rule = null
+ PromotionRuleInterface $rule = null,
): void {
$channelCode = $this->getChannelCode();
@@ -829,7 +829,7 @@ private function createUnitPercentagePromotion(
$promotion,
$this->actionFactory->createUnitPercentageDiscount($discount, $channelCode),
[$channelCode => $configuration],
- $rule
+ $rule,
);
}
@@ -838,7 +838,7 @@ private function createFixedPromotion(
int $discount,
array $configuration = [],
PromotionRuleInterface $rule = null,
- ChannelInterface $channel = null
+ ChannelInterface $channel = null,
): void {
$channelCode = (null !== $channel) ? $channel->getCode() : $this->sharedStorage->get('channel')->getCode();
@@ -849,7 +849,7 @@ private function createPercentagePromotion(
PromotionInterface $promotion,
float $discount,
array $configuration = [],
- PromotionRuleInterface $rule = null
+ PromotionRuleInterface $rule = null,
): void {
$this->persistPromotion($promotion, $this->actionFactory->createPercentageDiscount($discount), $configuration, $rule);
}
@@ -858,7 +858,7 @@ private function persistPromotion(
PromotionInterface $promotion,
PromotionActionInterface $action,
array $configuration,
- PromotionRuleInterface $rule = null
+ PromotionRuleInterface $rule = null,
): void {
$configuration = array_merge_recursive($action->getConfiguration(), $configuration);
$action->setConfiguration($configuration);
@@ -886,7 +886,7 @@ private function generateCoupons(
PromotionInterface $promotion,
int $codeLength,
?string $prefix = null,
- ?string $suffix = null
+ ?string $suffix = null,
): void {
$instruction = new PromotionCouponGeneratorInstruction();
$instruction->setAmount($amount);
diff --git a/src/Sylius/Behat/Context/Setup/ShippingCategoryContext.php b/src/Sylius/Behat/Context/Setup/ShippingCategoryContext.php
index d8e097f6224..c0b392450a3 100644
--- a/src/Sylius/Behat/Context/Setup/ShippingCategoryContext.php
+++ b/src/Sylius/Behat/Context/Setup/ShippingCategoryContext.php
@@ -31,7 +31,7 @@ final class ShippingCategoryContext implements Context
public function __construct(
SharedStorageInterface $sharedStorage,
FactoryInterface $shippingCategoryFactory,
- RepositoryInterface $shippingCategoryRepository
+ RepositoryInterface $shippingCategoryRepository,
) {
$this->sharedStorage = $sharedStorage;
$this->shippingCategoryFactory = $shippingCategoryFactory;
diff --git a/src/Sylius/Behat/Context/Setup/ShippingContext.php b/src/Sylius/Behat/Context/Setup/ShippingContext.php
index be24d0fcf81..282cd45eaaa 100644
--- a/src/Sylius/Behat/Context/Setup/ShippingContext.php
+++ b/src/Sylius/Behat/Context/Setup/ShippingContext.php
@@ -55,7 +55,7 @@ public function __construct(
RepositoryInterface $zoneRepository,
ShippingMethodExampleFactory $shippingMethodExampleFactory,
FactoryInterface $shippingMethodRuleFactory,
- ObjectManager $shippingMethodManager
+ ObjectManager $shippingMethodManager,
) {
$this->sharedStorage = $sharedStorage;
$this->shippingMethodRepository = $shippingMethodRepository;
@@ -167,7 +167,7 @@ public function theStoreAllowsShippingMethodWithNameAndPosition($name, $position
public function thisShippingMethodIsNamedInLocale(
ShippingMethodInterface $shippingMethod,
string $name,
- string $locale
+ string $locale,
): void {
$translations = $shippingMethod->getTranslations();
/** @var ShippingMethodTranslationInterface $translation */
@@ -240,7 +240,7 @@ public function storeHasShippingMethodWithFeePerShipmentForChannels(
$firstFee,
ChannelInterface $firstChannel,
$secondFee,
- ChannelInterface $secondChannel
+ ChannelInterface $secondChannel,
): void {
$configuration = [];
$configuration[$firstChannel->getCode()] = ['amount' => $firstFee];
@@ -267,7 +267,7 @@ public function storeHasShippingMethodWithFeePerUnitForChannels(
$firstFee,
ChannelInterface $firstChannel,
$secondFee = null,
- ChannelInterface $secondChannel = null
+ ChannelInterface $secondChannel = null,
): void {
$configuration = [];
$channels = [];
@@ -378,7 +378,7 @@ public function storeHasShippingMethodWithFeeNotAssignedToAnyChannel($shippingMe
*/
public function shippingMethodBelongsToTaxCategory(
ShippingMethodInterface $shippingMethod,
- TaxCategoryInterface $taxCategory
+ TaxCategoryInterface $taxCategory,
): void {
$shippingMethod->setTaxCategory($taxCategory);
$this->shippingMethodManager->flush();
@@ -407,7 +407,7 @@ public function theShippingMethodIsDisabled(ShippingMethodInterface $shippingMet
*/
public function thisShippingMethodRequiresAtLeastOneUnitMatchToShippingCategory(
ShippingMethodInterface $shippingMethod,
- ShippingCategoryInterface $shippingCategory
+ ShippingCategoryInterface $shippingCategory,
): void {
$shippingMethod->setCategory($shippingCategory);
$shippingMethod->setCategoryRequirement(ShippingMethodInterface::CATEGORY_REQUIREMENT_MATCH_ANY);
@@ -419,7 +419,7 @@ public function thisShippingMethodRequiresAtLeastOneUnitMatchToShippingCategory(
*/
public function thisShippingMethodRequiresThatAllUnitsMatchToShippingCategory(
ShippingMethodInterface $shippingMethod,
- ShippingCategoryInterface $shippingCategory
+ ShippingCategoryInterface $shippingCategory,
) {
$shippingMethod->setCategory($shippingCategory);
$shippingMethod->setCategoryRequirement(ShippingMethodInterface::CATEGORY_REQUIREMENT_MATCH_ALL);
@@ -431,7 +431,7 @@ public function thisShippingMethodRequiresThatAllUnitsMatchToShippingCategory(
*/
public function thisShippingMethodRequiresThatNoUnitsMatchToShippingCategory(
ShippingMethodInterface $shippingMethod,
- ShippingCategoryInterface $shippingCategory
+ ShippingCategoryInterface $shippingCategory,
): void {
$shippingMethod->setCategory($shippingCategory);
$shippingMethod->setCategoryRequirement(ShippingMethodInterface::CATEGORY_REQUIREMENT_MATCH_NONE);
@@ -465,11 +465,11 @@ public function theShippingFeeForShippingMethodHasBeenChangedTo(ShippingMethodIn
*/
public function thisShippingMethodIsOnlyAvailableForOrdersOverOrEqualTo(
ShippingMethodInterface $shippingMethod,
- int $amount
+ int $amount,
): void {
$rule = $this->createShippingMethodRule(
OrderTotalGreaterThanOrEqualRuleChecker::TYPE,
- $this->getConfigurationByChannels([$this->sharedStorage->get('channel')], $amount)
+ $this->getConfigurationByChannels([$this->sharedStorage->get('channel')], $amount),
);
$this->addRuleToShippingMethod($rule, $shippingMethod);
@@ -480,11 +480,11 @@ public function thisShippingMethodIsOnlyAvailableForOrdersOverOrEqualTo(
*/
public function thisShippingMethodIsOnlyAvailableForOrdersUnderOrEqualTo(
ShippingMethodInterface $shippingMethod,
- int $amount
+ int $amount,
): void {
$rule = $this->createShippingMethodRule(
OrderTotalLessThanOrEqualRuleChecker::TYPE,
- $this->getConfigurationByChannels([$this->sharedStorage->get('channel')], $amount)
+ $this->getConfigurationByChannels([$this->sharedStorage->get('channel')], $amount),
);
$this->addRuleToShippingMethod($rule, $shippingMethod);
@@ -495,7 +495,7 @@ public function thisShippingMethodIsOnlyAvailableForOrdersUnderOrEqualTo(
*/
public function thisShippingMethodIsOnlyAvailableForOrdersWithATotalWeightGreaterOrEqualTo(
ShippingMethodInterface $shippingMethod,
- float $weight
+ float $weight,
): void {
$rule = $this->createShippingMethodRule(TotalWeightGreaterThanOrEqualRuleChecker::TYPE, [
'weight' => $weight,
@@ -509,7 +509,7 @@ public function thisShippingMethodIsOnlyAvailableForOrdersWithATotalWeightGreate
*/
public function thisShippingMethodIsOnlyAvailableForOrdersWithATotalWeightLessOrEqualTo(
ShippingMethodInterface $shippingMethod,
- float $weight
+ float $weight,
): void {
$rule = $this->createShippingMethodRule(TotalWeightLessThanOrEqualRuleChecker::TYPE, [
'weight' => $weight,
diff --git a/src/Sylius/Behat/Context/Setup/ShopSecurityContext.php b/src/Sylius/Behat/Context/Setup/ShopSecurityContext.php
index 1c1b96c483a..1dca3cfd280 100644
--- a/src/Sylius/Behat/Context/Setup/ShopSecurityContext.php
+++ b/src/Sylius/Behat/Context/Setup/ShopSecurityContext.php
@@ -34,7 +34,7 @@ public function __construct(
SharedStorageInterface $sharedStorage,
SecurityServiceInterface $securityService,
ExampleFactoryInterface $userFactory,
- UserRepositoryInterface $userRepository
+ UserRepositoryInterface $userRepository,
) {
$this->sharedStorage = $sharedStorage;
$this->securityService = $securityService;
diff --git a/src/Sylius/Behat/Context/Setup/TaxationContext.php b/src/Sylius/Behat/Context/Setup/TaxationContext.php
index f39231833f0..77c3a035550 100644
--- a/src/Sylius/Behat/Context/Setup/TaxationContext.php
+++ b/src/Sylius/Behat/Context/Setup/TaxationContext.php
@@ -45,7 +45,7 @@ public function __construct(
FactoryInterface $taxCategoryFactory,
RepositoryInterface $taxRateRepository,
TaxCategoryRepositoryInterface $taxCategoryRepository,
- ObjectManager $objectManager
+ ObjectManager $objectManager,
) {
$this->sharedStorage = $sharedStorage;
$this->taxRateFactory = $taxRateFactory;
@@ -66,7 +66,7 @@ public function storeHasTaxRateWithinZone(
$taxCategoryName,
ZoneInterface $zone,
$taxRateCode = null,
- $includedInPrice = false
+ $includedInPrice = false,
) {
$taxCategory = $this->getOrCreateTaxCategory($taxCategoryName);
@@ -156,7 +156,7 @@ private function getOrCreateTaxCategory($taxCategoryName)
Assert::eq(
count($taxCategories),
1,
- sprintf('%d tax categories has been found with name "%s".', count($taxCategories), $taxCategoryName)
+ sprintf('%d tax categories has been found with name "%s".', count($taxCategories), $taxCategoryName),
);
return $taxCategories[0];
diff --git a/src/Sylius/Behat/Context/Setup/TaxonomyContext.php b/src/Sylius/Behat/Context/Setup/TaxonomyContext.php
index d70fa21182d..582aec09359 100644
--- a/src/Sylius/Behat/Context/Setup/TaxonomyContext.php
+++ b/src/Sylius/Behat/Context/Setup/TaxonomyContext.php
@@ -53,13 +53,13 @@ public function __construct(
ObjectManager $objectManager,
ImageUploaderInterface $imageUploader,
TaxonSlugGeneratorInterface $taxonSlugGenerator,
- $minkParameters
+ $minkParameters,
) {
if (!is_array($minkParameters) && !$minkParameters instanceof \ArrayAccess) {
throw new \InvalidArgumentException(sprintf(
'"$minkParameters" passed to "%s" has to be an array or implement "%s".',
self::class,
- \ArrayAccess::class
+ \ArrayAccess::class,
));
}
diff --git a/src/Sylius/Behat/Context/Setup/ThemeContext.php b/src/Sylius/Behat/Context/Setup/ThemeContext.php
index f53fca9e57c..0c471f56348 100644
--- a/src/Sylius/Behat/Context/Setup/ThemeContext.php
+++ b/src/Sylius/Behat/Context/Setup/ThemeContext.php
@@ -35,7 +35,7 @@ public function __construct(
SharedStorageInterface $sharedStorage,
ThemeRepositoryInterface $themeRepository,
ObjectManager $channelManager,
- TestThemeConfigurationManagerInterface $testThemeConfigurationManager
+ TestThemeConfigurationManagerInterface $testThemeConfigurationManager,
) {
$this->sharedStorage = $sharedStorage;
$this->themeRepository = $themeRepository;
diff --git a/src/Sylius/Behat/Context/Setup/UserContext.php b/src/Sylius/Behat/Context/Setup/UserContext.php
index 86907eab5b5..200e73d4fab 100644
--- a/src/Sylius/Behat/Context/Setup/UserContext.php
+++ b/src/Sylius/Behat/Context/Setup/UserContext.php
@@ -40,7 +40,7 @@ public function __construct(
UserRepositoryInterface $userRepository,
ExampleFactoryInterface $userFactory,
ObjectManager $userManager,
- MessageBusInterface $messageBus
+ MessageBusInterface $messageBus,
) {
$this->sharedStorage = $sharedStorage;
$this->userRepository = $userRepository;
diff --git a/src/Sylius/Behat/Context/Setup/ZoneContext.php b/src/Sylius/Behat/Context/Setup/ZoneContext.php
index 768133a8109..40216286600 100644
--- a/src/Sylius/Behat/Context/Setup/ZoneContext.php
+++ b/src/Sylius/Behat/Context/Setup/ZoneContext.php
@@ -46,7 +46,7 @@ public function __construct(
RepositoryInterface $zoneRepository,
ObjectManager $objectManager,
ZoneFactoryInterface $zoneFactory,
- FactoryInterface $zoneMemberFactory
+ FactoryInterface $zoneMemberFactory,
) {
$this->sharedStorage = $sharedStorage;
$this->zoneRepository = $zoneRepository;
@@ -129,7 +129,7 @@ public function theStoreHasAScopedZoneWithCode($scope, $zoneName, $code)
*/
public function itHasTheCountryMemberAndTheCountryMember(
ZoneInterface $zone,
- CountryInterface $country
+ CountryInterface $country,
) {
$zone->setType(ZoneInterface::TYPE_COUNTRY);
$zone->addMember($this->createZoneMember($country));
@@ -143,7 +143,7 @@ public function itHasTheCountryMemberAndTheCountryMember(
*/
public function itHasTheProvinceMemberAndTheProvinceMember(
ZoneInterface $zone,
- ProvinceInterface $province
+ ProvinceInterface $province,
) {
$zone->setType(ZoneInterface::TYPE_PROVINCE);
$zone->addMember($this->createZoneMember($province));
@@ -157,7 +157,7 @@ public function itHasTheProvinceMemberAndTheProvinceMember(
*/
public function itHasTheZoneMemberAndTheZoneMember(
ZoneInterface $parentZone,
- ZoneInterface $childZone
+ ZoneInterface $childZone,
) {
$parentZone->setType(ZoneInterface::TYPE_ZONE);
$parentZone->addMember($this->createZoneMember($childZone));
diff --git a/src/Sylius/Behat/Context/Transform/AddressContext.php b/src/Sylius/Behat/Context/Transform/AddressContext.php
index 7d123164ae2..cf5f8a3adf8 100644
--- a/src/Sylius/Behat/Context/Transform/AddressContext.php
+++ b/src/Sylius/Behat/Context/Transform/AddressContext.php
@@ -35,7 +35,7 @@ public function __construct(
FactoryInterface $addressFactory,
CountryNameConverterInterface $countryNameConverter,
AddressRepositoryInterface $addressRepository,
- ExampleFactoryInterface $exampleAddressFactory
+ ExampleFactoryInterface $exampleAddressFactory,
) {
$this->addressFactory = $addressFactory;
$this->countryNameConverter = $countryNameConverter;
diff --git a/src/Sylius/Behat/Context/Transform/ChannelContext.php b/src/Sylius/Behat/Context/Transform/ChannelContext.php
index caba77a0340..d222c0b39c9 100644
--- a/src/Sylius/Behat/Context/Transform/ChannelContext.php
+++ b/src/Sylius/Behat/Context/Transform/ChannelContext.php
@@ -39,7 +39,7 @@ public function getChannelByName($channelName)
Assert::eq(
count($channels),
1,
- sprintf('%d channels has been found with name "%s".', count($channels), $channelName)
+ sprintf('%d channels has been found with name "%s".', count($channels), $channelName),
);
return $channels[0];
diff --git a/src/Sylius/Behat/Context/Transform/CountryContext.php b/src/Sylius/Behat/Context/Transform/CountryContext.php
index e7b03c3c9b1..2c6593b6082 100644
--- a/src/Sylius/Behat/Context/Transform/CountryContext.php
+++ b/src/Sylius/Behat/Context/Transform/CountryContext.php
@@ -26,7 +26,7 @@ final class CountryContext implements Context
public function __construct(
CountryNameConverterInterface $countryNameConverter,
- RepositoryInterface $countryRepository
+ RepositoryInterface $countryRepository,
) {
$this->countryNameConverter = $countryNameConverter;
$this->countryRepository = $countryRepository;
@@ -47,7 +47,7 @@ public function getCountryByName($countryName)
Assert::notNull(
$country,
- sprintf('Country with name "%s" does not exist', $countryName)
+ sprintf('Country with name "%s" does not exist', $countryName),
);
return $country;
diff --git a/src/Sylius/Behat/Context/Transform/CouponContext.php b/src/Sylius/Behat/Context/Transform/CouponContext.php
index ecab4d506c8..592670ec9a6 100644
--- a/src/Sylius/Behat/Context/Transform/CouponContext.php
+++ b/src/Sylius/Behat/Context/Transform/CouponContext.php
@@ -22,7 +22,7 @@ final class CouponContext implements Context
private RepositoryInterface $couponRepository;
public function __construct(
- RepositoryInterface $couponRepository
+ RepositoryInterface $couponRepository,
) {
$this->couponRepository = $couponRepository;
}
@@ -38,7 +38,7 @@ public function getCouponByCode($couponCode)
Assert::notNull(
$coupon,
- sprintf('Coupon with code "%s" does not exist', $couponCode)
+ sprintf('Coupon with code "%s" does not exist', $couponCode),
);
return $coupon;
diff --git a/src/Sylius/Behat/Context/Transform/CurrencyContext.php b/src/Sylius/Behat/Context/Transform/CurrencyContext.php
index ca7d37af8a3..a4ca43f9440 100644
--- a/src/Sylius/Behat/Context/Transform/CurrencyContext.php
+++ b/src/Sylius/Behat/Context/Transform/CurrencyContext.php
@@ -26,7 +26,7 @@ final class CurrencyContext implements Context
public function __construct(
CurrencyNameConverterInterface $currencyNameConverter,
- RepositoryInterface $currencyRepository
+ RepositoryInterface $currencyRepository,
) {
$this->currencyNameConverter = $currencyNameConverter;
$this->currencyRepository = $currencyRepository;
@@ -44,7 +44,7 @@ public function getCurrencyByName($currencyName)
$currency = $this->currencyRepository->findOneBy(['code' => $this->getCurrencyCodeByName($currencyName)]);
Assert::notNull(
$currency,
- sprintf('Currency with name %s does not exist.', $currencyName)
+ sprintf('Currency with name %s does not exist.', $currencyName),
);
return $currency;
diff --git a/src/Sylius/Behat/Context/Transform/CustomerContext.php b/src/Sylius/Behat/Context/Transform/CustomerContext.php
index e784aa3ec4a..dd0d58c3359 100644
--- a/src/Sylius/Behat/Context/Transform/CustomerContext.php
+++ b/src/Sylius/Behat/Context/Transform/CustomerContext.php
@@ -30,7 +30,7 @@ final class CustomerContext implements Context
public function __construct(
CustomerRepositoryInterface $customerRepository,
FactoryInterface $customerFactory,
- SharedStorageInterface $sharedStorage
+ SharedStorageInterface $sharedStorage,
) {
$this->customerRepository = $customerRepository;
$this->customerFactory = $customerFactory;
diff --git a/src/Sylius/Behat/Context/Transform/ExchangeRateContext.php b/src/Sylius/Behat/Context/Transform/ExchangeRateContext.php
index 911fb8cbd8a..e077dd7eadf 100644
--- a/src/Sylius/Behat/Context/Transform/ExchangeRateContext.php
+++ b/src/Sylius/Behat/Context/Transform/ExchangeRateContext.php
@@ -31,7 +31,7 @@ final class ExchangeRateContext implements Context
public function __construct(
CurrencyNameConverterInterface $currencyNameConverter,
RepositoryInterface $currencyRepository,
- ExchangeRateRepositoryInterface $exchangeRateRepository
+ ExchangeRateRepositoryInterface $exchangeRateRepository,
) {
$this->currencyNameConverter = $currencyNameConverter;
$this->currencyRepository = $currencyRepository;
@@ -43,7 +43,7 @@ public function __construct(
*/
public function getExchangeRateByCurrencies(
string $sourceCurrencyName,
- string $targetCurrencyName
+ string $targetCurrencyName,
): ExchangeRateInterface {
$sourceCurrencyCode = $this->currencyNameConverter->convertToCode($sourceCurrencyName);
$targetCurrencyCode = $this->currencyNameConverter->convertToCode($targetCurrencyName);
@@ -59,8 +59,8 @@ public function getExchangeRateByCurrencies(
sprintf(
'ExchangeRate for %s and %s currencies does not exist.',
$sourceCurrencyName,
- $targetCurrencyName
- )
+ $targetCurrencyName,
+ ),
);
return $exchangeRate;
diff --git a/src/Sylius/Behat/Context/Transform/LocaleContext.php b/src/Sylius/Behat/Context/Transform/LocaleContext.php
index 31ce7169fa9..12846840f1f 100644
--- a/src/Sylius/Behat/Context/Transform/LocaleContext.php
+++ b/src/Sylius/Behat/Context/Transform/LocaleContext.php
@@ -60,7 +60,7 @@ public function getLocaleByName(string $name): LocaleInterface
Assert::isInstanceOf(
$locale,
LocaleInterface::class,
- sprintf('Cannot find "%s" locale.', $name)
+ sprintf('Cannot find "%s" locale.', $name),
);
return $locale;
diff --git a/src/Sylius/Behat/Context/Transform/OrderContext.php b/src/Sylius/Behat/Context/Transform/OrderContext.php
index 66d9f3cb426..ea8e0c93b2e 100644
--- a/src/Sylius/Behat/Context/Transform/OrderContext.php
+++ b/src/Sylius/Behat/Context/Transform/OrderContext.php
@@ -27,7 +27,7 @@ final class OrderContext implements Context
public function __construct(
CustomerRepositoryInterface $customerRepository,
- OrderRepositoryInterface $orderRepository
+ OrderRepositoryInterface $orderRepository,
) {
$this->customerRepository = $customerRepository;
$this->orderRepository = $orderRepository;
diff --git a/src/Sylius/Behat/Context/Transform/PaymentMethodContext.php b/src/Sylius/Behat/Context/Transform/PaymentMethodContext.php
index ce819cdbc75..d62025e92fe 100644
--- a/src/Sylius/Behat/Context/Transform/PaymentMethodContext.php
+++ b/src/Sylius/Behat/Context/Transform/PaymentMethodContext.php
@@ -37,7 +37,7 @@ public function getPaymentMethodByName($paymentMethodName)
Assert::eq(
count($paymentMethods),
1,
- sprintf('%d payment methods has been found with name "%s".', count($paymentMethods), $paymentMethodName)
+ sprintf('%d payment methods has been found with name "%s".', count($paymentMethods), $paymentMethodName),
);
return $paymentMethods[0];
diff --git a/src/Sylius/Behat/Context/Transform/ProductAssociationTypeContext.php b/src/Sylius/Behat/Context/Transform/ProductAssociationTypeContext.php
index 6b5bce24973..02454523a60 100644
--- a/src/Sylius/Behat/Context/Transform/ProductAssociationTypeContext.php
+++ b/src/Sylius/Behat/Context/Transform/ProductAssociationTypeContext.php
@@ -34,7 +34,7 @@ public function getProductAssociationTypeByName($productAssociationTypeName)
{
$productAssociationTypes = $this->productAssociationTypeRepository->findByName(
$productAssociationTypeName,
- 'en_US'
+ 'en_US',
);
Assert::eq(
@@ -43,8 +43,8 @@ public function getProductAssociationTypeByName($productAssociationTypeName)
sprintf(
'%d product association types has been found with name "%s".',
count($productAssociationTypes),
- $productAssociationTypeName
- )
+ $productAssociationTypeName,
+ ),
);
return $productAssociationTypes[0];
diff --git a/src/Sylius/Behat/Context/Transform/ProductContext.php b/src/Sylius/Behat/Context/Transform/ProductContext.php
index fb8eb1c2857..cd4696ead76 100644
--- a/src/Sylius/Behat/Context/Transform/ProductContext.php
+++ b/src/Sylius/Behat/Context/Transform/ProductContext.php
@@ -42,7 +42,7 @@ public function getProductByName($productName)
Assert::eq(
count($products),
1,
- sprintf('%d products has been found with name "%s".', count($products), $productName)
+ sprintf('%d products has been found with name "%s".', count($products), $productName),
);
return $products[0];
diff --git a/src/Sylius/Behat/Context/Transform/ProductOptionContext.php b/src/Sylius/Behat/Context/Transform/ProductOptionContext.php
index 41f91e7bc42..4d72e6aeae0 100644
--- a/src/Sylius/Behat/Context/Transform/ProductOptionContext.php
+++ b/src/Sylius/Behat/Context/Transform/ProductOptionContext.php
@@ -38,7 +38,7 @@ public function getProductOptionByName($productOptionName)
Assert::eq(
count($productOptions),
1,
- sprintf('%d product options has been found with name "%s".', count($productOptions), $productOptionName)
+ sprintf('%d product options has been found with name "%s".', count($productOptions), $productOptionName),
);
return $productOptions[0];
diff --git a/src/Sylius/Behat/Context/Transform/ProductReviewContext.php b/src/Sylius/Behat/Context/Transform/ProductReviewContext.php
index 4f87ebdde9b..80c15ed4db8 100644
--- a/src/Sylius/Behat/Context/Transform/ProductReviewContext.php
+++ b/src/Sylius/Behat/Context/Transform/ProductReviewContext.php
@@ -37,7 +37,7 @@ public function getProductReviewByTitle(string $title): ReviewInterface
Assert::notNull(
$productReview,
- sprintf('Product review with title "%s" does not exist', $title)
+ sprintf('Product review with title "%s" does not exist', $title),
);
return $productReview;
diff --git a/src/Sylius/Behat/Context/Transform/ProductVariantContext.php b/src/Sylius/Behat/Context/Transform/ProductVariantContext.php
index 46187aa9ac9..afd97d62f47 100644
--- a/src/Sylius/Behat/Context/Transform/ProductVariantContext.php
+++ b/src/Sylius/Behat/Context/Transform/ProductVariantContext.php
@@ -32,7 +32,7 @@ final class ProductVariantContext implements Context
public function __construct(
ProductRepositoryInterface $productRepository,
ProductVariantRepositoryInterface $productVariantRepository,
- SharedStorageInterface $sharedStorage
+ SharedStorageInterface $sharedStorage,
) {
$this->productRepository = $productRepository;
$this->productVariantRepository = $productVariantRepository;
@@ -49,13 +49,13 @@ public function getProductVariantByNameAndProduct(string $variantName, string $p
Assert::eq(
count($products),
1,
- sprintf('%d products has been found with name "%s".', count($products), $productName)
+ sprintf('%d products has been found with name "%s".', count($products), $productName),
);
$productVariants = $this->productVariantRepository->findByNameAndProduct($variantName, 'en_US', $products[0]);
Assert::notEmpty(
$productVariants,
- sprintf('Product variant with name "%s" of product "%s" does not exist', $variantName, $productName)
+ sprintf('Product variant with name "%s" of product "%s" does not exist', $variantName, $productName),
);
return $productVariants[0];
@@ -71,7 +71,7 @@ public function getProductVariantByNameAndThisProduct(string $variantName): Prod
$productVariants = $this->productVariantRepository->findByNameAndProduct($variantName, 'en_US', $product);
Assert::notEmpty(
$productVariants,
- sprintf('Product variant with name "%s" of product "%s" does not exist', $variantName, $product->getName())
+ sprintf('Product variant with name "%s" of product "%s" does not exist', $variantName, $product->getName()),
);
return $productVariants[0];
@@ -89,7 +89,7 @@ public function getProductVariantByName($name)
Assert::eq(
count($productVariants),
1,
- sprintf('%d product variants has been found with name "%s".', count($productVariants), $name)
+ sprintf('%d product variants has been found with name "%s".', count($productVariants), $name),
);
return $productVariants[0];
@@ -115,14 +115,14 @@ public function getVariantByOptionValuesAndProduct(
string $option1,
string $value2,
string $option2,
- string $productName
+ string $productName,
) {
$products = $this->productRepository->findByName($productName, 'en_US');
Assert::eq(
count($products),
1,
- sprintf('%d products has been found with name "%s".', count($products), $productName)
+ sprintf('%d products has been found with name "%s".', count($products), $productName),
);
$product = $products[0];
@@ -146,8 +146,8 @@ public function getVariantByOptionValuesAndProduct(
$option1,
$value2,
$option2,
- $product->getCode()
- )
+ $product->getCode(),
+ ),
);
}
}
diff --git a/src/Sylius/Behat/Context/Transform/PromotionContext.php b/src/Sylius/Behat/Context/Transform/PromotionContext.php
index 6f29c7aa7dc..6cf2b294109 100644
--- a/src/Sylius/Behat/Context/Transform/PromotionContext.php
+++ b/src/Sylius/Behat/Context/Transform/PromotionContext.php
@@ -26,7 +26,7 @@ final class PromotionContext implements Context
public function __construct(
PromotionRepositoryInterface $promotionRepository,
- PromotionCouponRepositoryInterface $promotionCouponRepository
+ PromotionCouponRepositoryInterface $promotionCouponRepository,
) {
$this->promotionRepository = $promotionRepository;
$this->promotionCouponRepository = $promotionCouponRepository;
@@ -43,7 +43,7 @@ public function getPromotionByName($promotionName)
Assert::notNull(
$promotion,
- sprintf('Promotion with name "%s" does not exist', $promotionName)
+ sprintf('Promotion with name "%s" does not exist', $promotionName),
);
return $promotion;
@@ -60,7 +60,7 @@ public function getPromotionCouponByCode($promotionCouponCode)
Assert::notNull(
$promotionCoupon,
- sprintf('Promotion coupon with code "%s" does not exist', $promotionCouponCode)
+ sprintf('Promotion coupon with code "%s" does not exist', $promotionCouponCode),
);
return $promotionCoupon;
diff --git a/src/Sylius/Behat/Context/Transform/ProvinceContext.php b/src/Sylius/Behat/Context/Transform/ProvinceContext.php
index 01d3060bfed..a015c41b1e1 100644
--- a/src/Sylius/Behat/Context/Transform/ProvinceContext.php
+++ b/src/Sylius/Behat/Context/Transform/ProvinceContext.php
@@ -39,7 +39,7 @@ public function getProvinceByName(string $provinceName): ProvinceInterface
$province = $this->provinceRepository->findOneBy(['name' => $provinceName]);
Assert::notNull(
$province,
- sprintf('Province with name "%s" does not exist', $provinceName)
+ sprintf('Province with name "%s" does not exist', $provinceName),
);
return $province;
diff --git a/src/Sylius/Behat/Context/Transform/ShippingCalculatorContext.php b/src/Sylius/Behat/Context/Transform/ShippingCalculatorContext.php
index a5580891a82..6c422bd2fb7 100644
--- a/src/Sylius/Behat/Context/Transform/ShippingCalculatorContext.php
+++ b/src/Sylius/Behat/Context/Transform/ShippingCalculatorContext.php
@@ -35,7 +35,7 @@ public function getShippingCalculatorByName(string $shippingCalculator): string
{
$flippedCalculators = array_flip(array_map(
function (string $translationKey): string { return $this->translator->trans($translationKey); },
- $this->shippingCalculators
+ $this->shippingCalculators,
));
return $flippedCalculators[$shippingCalculator];
diff --git a/src/Sylius/Behat/Context/Transform/ShippingCategoryContext.php b/src/Sylius/Behat/Context/Transform/ShippingCategoryContext.php
index f9ade174327..a7f368bb01a 100644
--- a/src/Sylius/Behat/Context/Transform/ShippingCategoryContext.php
+++ b/src/Sylius/Behat/Context/Transform/ShippingCategoryContext.php
@@ -39,7 +39,7 @@ public function getShippingCategoryByName($shippingCategoryName)
Assert::eq(
count($shippingCategories),
1,
- sprintf('%d shipping category has been found with name "%s".', count($shippingCategories), $shippingCategoryName)
+ sprintf('%d shipping category has been found with name "%s".', count($shippingCategories), $shippingCategoryName),
);
return $shippingCategories[0];
diff --git a/src/Sylius/Behat/Context/Transform/ShippingMethodContext.php b/src/Sylius/Behat/Context/Transform/ShippingMethodContext.php
index 8407df3d68a..acb1c0c1f7f 100644
--- a/src/Sylius/Behat/Context/Transform/ShippingMethodContext.php
+++ b/src/Sylius/Behat/Context/Transform/ShippingMethodContext.php
@@ -38,7 +38,7 @@ public function getShippingMethodByName($shippingMethodName)
Assert::eq(
count($shippingMethods),
1,
- sprintf('%d shipping methods have been found with name "%s".', count($shippingMethods), $shippingMethodName)
+ sprintf('%d shipping methods have been found with name "%s".', count($shippingMethods), $shippingMethodName),
);
return $shippingMethods[0];
diff --git a/src/Sylius/Behat/Context/Transform/TaxCategoryContext.php b/src/Sylius/Behat/Context/Transform/TaxCategoryContext.php
index 6ad4ddfd49d..dbf391384e0 100644
--- a/src/Sylius/Behat/Context/Transform/TaxCategoryContext.php
+++ b/src/Sylius/Behat/Context/Transform/TaxCategoryContext.php
@@ -38,7 +38,7 @@ public function getTaxCategoryByName($taxCategoryName)
Assert::eq(
count($taxCategories),
1,
- sprintf('%d tax categories has been found with name "%s".', count($taxCategories), $taxCategoryName)
+ sprintf('%d tax categories has been found with name "%s".', count($taxCategories), $taxCategoryName),
);
return $taxCategories[0];
diff --git a/src/Sylius/Behat/Context/Transform/TaxRateContext.php b/src/Sylius/Behat/Context/Transform/TaxRateContext.php
index 060da3ca418..2a6d2ad963e 100644
--- a/src/Sylius/Behat/Context/Transform/TaxRateContext.php
+++ b/src/Sylius/Behat/Context/Transform/TaxRateContext.php
@@ -36,7 +36,7 @@ public function getTaxRateByName($taxRateName)
Assert::notNull(
$taxRate,
- sprintf('Tax rate with name "%s" does not exist', $taxRateName)
+ sprintf('Tax rate with name "%s" does not exist', $taxRateName),
);
return $taxRate;
diff --git a/src/Sylius/Behat/Context/Transform/TaxonContext.php b/src/Sylius/Behat/Context/Transform/TaxonContext.php
index 7f312adf78b..944426cb65f 100644
--- a/src/Sylius/Behat/Context/Transform/TaxonContext.php
+++ b/src/Sylius/Behat/Context/Transform/TaxonContext.php
@@ -48,7 +48,7 @@ public function getTaxonByName($name)
Assert::eq(
count($taxons),
1,
- sprintf('%d taxons has been found with name "%s".', count($taxons), $name)
+ sprintf('%d taxons has been found with name "%s".', count($taxons), $name),
);
return $taxons[0];
diff --git a/src/Sylius/Behat/Context/Transform/ZoneContext.php b/src/Sylius/Behat/Context/Transform/ZoneContext.php
index 8fc7968fc57..ecfa701148f 100644
--- a/src/Sylius/Behat/Context/Transform/ZoneContext.php
+++ b/src/Sylius/Behat/Context/Transform/ZoneContext.php
@@ -44,7 +44,7 @@ public function getZone(string $codeOrName): ZoneInterface
$zone = $this->zoneRepository->findOneBy(['name' => $codeOrName]);
Assert::notNull(
$zone,
- 'Zone does not exist.'
+ 'Zone does not exist.',
);
return $zone;
@@ -58,7 +58,7 @@ public function getRestOfTheWorldZone(): ZoneInterface
$zone = $this->zoneRepository->findOneBy(['code' => 'RoW']);
Assert::notNull(
$zone,
- 'Rest of the world zone does not exist.'
+ 'Rest of the world zone does not exist.',
);
return $zone;
diff --git a/src/Sylius/Behat/Context/Transform/ZoneMemberContext.php b/src/Sylius/Behat/Context/Transform/ZoneMemberContext.php
index f45601dc6c2..e58b0a9abd5 100644
--- a/src/Sylius/Behat/Context/Transform/ZoneMemberContext.php
+++ b/src/Sylius/Behat/Context/Transform/ZoneMemberContext.php
@@ -35,7 +35,7 @@ public function __construct(
CountryNameConverterInterface $countryNameConverter,
RepositoryInterface $provinceRepository,
RepositoryInterface $zoneRepository,
- RepositoryInterface $zoneMemberRepository
+ RepositoryInterface $zoneMemberRepository,
) {
$this->countryNameConverter = $countryNameConverter;
$this->provinceRepository = $provinceRepository;
@@ -85,7 +85,7 @@ private function getZoneMemberByCode($code)
$zoneMember = $this->zoneMemberRepository->findOneBy(['code' => $code]);
Assert::notNull(
$zoneMember,
- sprintf('Zone member with code %s does not exist.', $code)
+ sprintf('Zone member with code %s does not exist.', $code),
);
return $zoneMember;
@@ -103,7 +103,7 @@ private function getProvinceByName($name)
$province = $this->provinceRepository->findOneBy(['name' => $name]);
Assert::notNull(
$province,
- sprintf('Province with name %s does not exist.', $name)
+ sprintf('Province with name %s does not exist.', $name),
);
return $province;
@@ -121,7 +121,7 @@ private function getZoneByName($name)
$zone = $this->zoneRepository->findOneBy(['name' => $name]);
Assert::notNull(
$zone,
- sprintf('Zone with name %s does not exist.', $name)
+ sprintf('Zone with name %s does not exist.', $name),
);
return $zone;
diff --git a/src/Sylius/Behat/Context/Ui/Admin/AccessingEditPageFromProductShowPageContext.php b/src/Sylius/Behat/Context/Ui/Admin/AccessingEditPageFromProductShowPageContext.php
index a70d0da3918..8e57460b2a1 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/AccessingEditPageFromProductShowPageContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/AccessingEditPageFromProductShowPageContext.php
@@ -28,7 +28,7 @@ final class AccessingEditPageFromProductShowPageContext implements Context
public function __construct(
UpdateSimpleProductPageInterface $updateSimpleProductPage,
- UpdatePageInterface $updateVariantProductPage
+ UpdatePageInterface $updateVariantProductPage,
) {
$this->updateSimpleProductPage = $updateSimpleProductPage;
$this->updateVariantProductPage = $updateVariantProductPage;
diff --git a/src/Sylius/Behat/Context/Ui/Admin/BrowsingProductVariantsContext.php b/src/Sylius/Behat/Context/Ui/Admin/BrowsingProductVariantsContext.php
index 86977552c3d..dc55935a3a2 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/BrowsingProductVariantsContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/BrowsingProductVariantsContext.php
@@ -28,7 +28,7 @@ final class BrowsingProductVariantsContext implements Context
public function __construct(
IndexPageInterface $indexPage,
- ProductVariantResolverInterface $defaultProductVariantResolver
+ ProductVariantResolverInterface $defaultProductVariantResolver,
) {
$this->indexPage = $indexPage;
$this->defaultProductVariantResolver = $defaultProductVariantResolver;
@@ -143,7 +143,7 @@ public function thisVariantShouldHaveItemsOnHand($productVariantName, $quantity)
{
Assert::true($this->indexPage->isSingleResourceWithSpecificElementOnPage(
['name' => $productVariantName],
- sprintf('td > div.ui.label:contains("%s")', $quantity)
+ sprintf('td > div.ui.label:contains("%s")', $quantity),
));
}
@@ -156,7 +156,7 @@ public function theVariantOfProductShouldHaveItemsOnHand($productVariantName, Pr
Assert::true($this->indexPage->isSingleResourceWithSpecificElementOnPage(
['name' => $productVariantName],
- sprintf('td > div.ui.label:contains("%s")', $quantity)
+ sprintf('td > div.ui.label:contains("%s")', $quantity),
));
}
@@ -297,8 +297,8 @@ private function assertOnHoldQuantityOfVariant($expectedAmount, $variant)
'Unexpected on hold quantity for "%s" variant. It should be "%s" but is "%s"',
$variant->getName(),
$expectedAmount,
- $actualAmount
- )
+ $actualAmount,
+ ),
);
}
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ImpersonatingCustomersContext.php b/src/Sylius/Behat/Context/Ui/Admin/ImpersonatingCustomersContext.php
index fd520f991eb..a292b263d3c 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ImpersonatingCustomersContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ImpersonatingCustomersContext.php
@@ -35,7 +35,7 @@ public function __construct(
ShowPageInterface $customerShowPage,
DashboardPageInterface $dashboardPage,
HomePageInterface $homePage,
- ImpersonateUserPageInterface $impersonateUserPage
+ ImpersonateUserPageInterface $impersonateUserPage,
) {
$this->customerShowPage = $customerShowPage;
$this->dashboardPage = $dashboardPage;
diff --git a/src/Sylius/Behat/Context/Ui/Admin/LocaleContext.php b/src/Sylius/Behat/Context/Ui/Admin/LocaleContext.php
index 3262ce758d2..cc79a1f69d7 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/LocaleContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/LocaleContext.php
@@ -30,7 +30,7 @@ final class LocaleContext implements Context
public function __construct(
DashboardPageInterface $dashboardPage,
TranslatorInterface $translator,
- CreatePageInterface $createPage
+ CreatePageInterface $createPage,
) {
$this->dashboardPage = $dashboardPage;
$this->translator = $translator;
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingAdministratorsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingAdministratorsContext.php
index 3a0744d2246..5c95d012427 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingAdministratorsContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingAdministratorsContext.php
@@ -48,7 +48,7 @@ public function __construct(
TopBarElementInterface $topBarElement,
NotificationCheckerInterface $notificationChecker,
RepositoryInterface $adminUserRepository,
- SharedStorageInterface $sharedStorage
+ SharedStorageInterface $sharedStorage,
) {
$this->createPage = $createPage;
$this->indexPage = $indexPage;
@@ -299,7 +299,7 @@ public function iShouldBeNotifiedThatItCannotBeDeleted()
{
$this->notificationChecker->checkNotification(
'Cannot remove currently logged in user.',
- NotificationType::failure()
+ NotificationType::failure(),
);
}
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsBillingDataContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsBillingDataContext.php
index 3dd0138923d..386a1a2bf42 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsBillingDataContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsBillingDataContext.php
@@ -50,7 +50,7 @@ public function specifyShopBillingAddressAs(
string $street,
string $postcode,
string $city,
- CountryInterface $country
+ CountryInterface $country,
): void {
$this->shopBillingDataElement->specifyBillingAddress($street, $postcode, $city, $country->getCode());
}
@@ -78,7 +78,7 @@ public function thisChannelShopBillingAddressShouldBe(
string $street,
string $postcode,
string $city,
- CountryInterface $country
+ CountryInterface $country,
): void {
Assert::true($this->shopBillingDataElement->hasBillingAddress($street, $postcode, $city, $country->getCode()));
}
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php
index b9c5b974e21..0c73e159ef4 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php
@@ -42,7 +42,7 @@ public function __construct(
CreatePageInterface $createPage,
UpdatePageInterface $updatePage,
CurrentPageResolverInterface $currentPageResolver,
- NotificationCheckerInterface $notificationChecker
+ NotificationCheckerInterface $notificationChecker,
) {
$this->indexPage = $indexPage;
$this->createPage = $createPage;
@@ -256,7 +256,7 @@ public function iShouldBeNotifiedThatIsRequired(string $element): void
Assert::same(
$currentPage->getValidationMessage(StringInflector::nameToCode($element)),
- sprintf('Please enter channel %s.', $element)
+ sprintf('Please enter channel %s.', $element),
);
}
@@ -394,7 +394,7 @@ public function iShouldBeNotifiedThatItCannotBeDeleted(): void
{
$this->notificationChecker->checkNotification(
'The channel cannot be deleted. At least one enabled channel is required.',
- NotificationType::failure()
+ NotificationType::failure(),
);
}
@@ -495,7 +495,7 @@ public function channelShouldNotHaveDefaultTaxZone(ChannelInterface $channel): v
*/
public function theTaxCalculationStrategyForTheChannelShouldBe(
ChannelInterface $channel,
- string $taxCalculationStrategy
+ string $taxCalculationStrategy,
): void {
$this->updatePage->open(['id' => $channel->getId()]);
@@ -517,7 +517,7 @@ public function iShouldBeNotifiedThatTheDefaultLocaleHasToBeEnabled(): void
{
Assert::same(
$this->updatePage->getValidationMessage('default_locale'),
- 'Default locale has to be enabled.'
+ 'Default locale has to be enabled.',
);
}
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingCountriesContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingCountriesContext.php
index 3af5d5d0883..165fe4d804b 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingCountriesContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingCountriesContext.php
@@ -36,7 +36,7 @@ public function __construct(
IndexPageInterface $indexPage,
CreatePageInterface $createPage,
UpdatePageInterface $updatePage,
- CurrentPageResolverInterface $currentPageResolver
+ CurrentPageResolverInterface $currentPageResolver,
) {
$this->indexPage = $indexPage;
$this->createPage = $createPage;
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingCurrenciesContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingCurrenciesContext.php
index e1703966681..c824c71e20c 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingCurrenciesContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingCurrenciesContext.php
@@ -31,7 +31,7 @@ final class ManagingCurrenciesContext implements Context
public function __construct(
IndexPageInterface $indexPage,
CreatePageInterface $createPage,
- UpdatePageInterface $updatePage
+ UpdatePageInterface $updatePage,
) {
$this->createPage = $createPage;
$this->indexPage = $indexPage;
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingCustomerGroupsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingCustomerGroupsContext.php
index 5a2d13488a3..cd8aaba9415 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingCustomerGroupsContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingCustomerGroupsContext.php
@@ -35,7 +35,7 @@ public function __construct(
CreatePageInterface $createPage,
IndexPageInterface $indexPage,
CurrentPageResolverInterface $currentPageResolver,
- UpdatePageInterface $updatePage
+ UpdatePageInterface $updatePage,
) {
$this->createPage = $createPage;
$this->indexPage = $indexPage;
@@ -169,7 +169,7 @@ public function iShouldBeNotifiedThatNameIsRequired()
{
Assert::same(
$this->updatePage->getValidationMessage('name'),
- 'Please enter a customer group name.'
+ 'Please enter a customer group name.',
);
}
@@ -219,8 +219,8 @@ public function thisCustomerGroupShouldNoLongerExistInTheRegistry(CustomerGroupI
$this->indexPage->isSingleResourceOnPage(['name' => $customerGroup->getName()]),
sprintf(
'Customer group %s should no longer exist in the registry',
- $customerGroup->getName()
- )
+ $customerGroup->getName(),
+ ),
);
}
}
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingCustomersContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingCustomersContext.php
index 9cad6570e92..694489cefb7 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingCustomersContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingCustomersContext.php
@@ -47,7 +47,7 @@ public function __construct(
UpdatePageInterface $updatePage,
ShowPageInterface $showPage,
IndexPageInterface $ordersIndexPage,
- CurrentPageResolverInterface $currentPageResolver
+ CurrentPageResolverInterface $currentPageResolver,
) {
$this->createPage = $createPage;
$this->indexPage = $indexPage;
@@ -220,7 +220,7 @@ public function iShouldBeNotifiedThatFirstNameIsRequired($elementName)
{
Assert::same(
$this->createPage->getValidationMessage($elementName),
- sprintf('Please enter your %s.', $elementName)
+ sprintf('Please enter your %s.', $elementName),
);
}
@@ -231,7 +231,7 @@ public function iShouldBeNotifiedThatTheElementShouldBe($elementName, $validatio
{
Assert::same(
$this->updatePage->getValidationMessage($elementName),
- sprintf('%s must be %s.', ucfirst($elementName), $validationMessage)
+ sprintf('%s must be %s.', ucfirst($elementName), $validationMessage),
);
}
@@ -395,7 +395,7 @@ public function theyShouldHaveAnAccountCreated(CustomerInterface $customer): voi
{
Assert::notNull(
$customer->getUser()->getPassword(),
- 'Customer should have an account, but they do not.'
+ 'Customer should have an account, but they do not.',
);
}
@@ -620,7 +620,7 @@ public function iShouldBeNotifiedThatThePasswordMustBeAtLeastCharactersLong($amo
{
Assert::same(
$this->createPage->getValidationMessage('password'),
- sprintf('Password must be at least %d characters long.', $amountOfCharacters)
+ sprintf('Password must be at least %d characters long.', $amountOfCharacters),
);
}
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingExchangeRatesContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingExchangeRatesContext.php
index e7b442a8b2f..526f8e364df 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingExchangeRatesContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingExchangeRatesContext.php
@@ -32,7 +32,7 @@ final class ManagingExchangeRatesContext implements Context
public function __construct(
CreatePageInterface $createPage,
IndexPageInterface $indexPage,
- UpdatePageInterface $updatePage
+ UpdatePageInterface $updatePage,
) {
$this->createPage = $createPage;
$this->indexPage = $indexPage;
@@ -198,7 +198,7 @@ public function theExchangeRateBetweenAndShouldAppearInTheStore($ratio, Currency
*/
public function iShouldSeeAnExchangeRateBetweenAndOnTheList(
string $sourceCurrencyName,
- string $targetCurrencyName
+ string $targetCurrencyName,
): void {
Assert::true($this->indexPage->isSingleResourceOnPage([
'sourceCurrency' => $sourceCurrencyName,
@@ -221,7 +221,7 @@ public function thisExchangeRateShouldNoLongerBeOnTheList(ExchangeRateInterface
{
$this->assertExchangeRateIsNotOnTheList(
$exchangeRate->getSourceCurrency()->getName(),
- $exchangeRate->getTargetCurrency()->getName()
+ $exchangeRate->getTargetCurrency()->getName(),
);
}
@@ -269,7 +269,7 @@ public function iShouldBeNotifiedThatIsRequired($element)
{
Assert::same(
$this->createPage->getValidationMessage($element),
- sprintf('Please enter exchange rate %s.', $element)
+ sprintf('Please enter exchange rate %s.', $element),
);
}
@@ -316,8 +316,8 @@ private function assertExchangeRateWithRatioIsOnTheList($ratio, $sourceCurrencyN
'An exchange rate between %s and %s with a ratio of %s has not been found on the list.',
$sourceCurrencyName,
$targetCurrencyName,
- $ratio
- )
+ $ratio,
+ ),
);
}
@@ -337,8 +337,8 @@ private function assertExchangeRateIsNotOnTheList($sourceCurrencyName, $targetCu
sprintf(
'An exchange rate with source currency %s and target currency %s has been found on the list.',
$sourceCurrencyName,
- $targetCurrencyName
- )
+ $targetCurrencyName,
+ ),
);
}
@@ -352,7 +352,7 @@ private function assertCountOfExchangeRatesOnTheList($count)
Assert::same(
$this->indexPage->countItems(),
(int) $count,
- 'Expected %2$d exchange rates to be on the list, but found %d instead.'
+ 'Expected %2$d exchange rates to be on the list, but found %d instead.',
);
}
@@ -367,8 +367,8 @@ private function assertFormHasValidationMessage($expectedMessage)
$this->createPage->hasFormValidationError($expectedMessage),
sprintf(
'The validation message "%s" was not found on the page.',
- $expectedMessage
- )
+ $expectedMessage,
+ ),
);
}
}
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingOrdersContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingOrdersContext.php
index cfaeb8b0246..e6ea15efeae 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingOrdersContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingOrdersContext.php
@@ -51,7 +51,7 @@ public function __construct(
UpdatePageInterface $updatePage,
HistoryPageInterface $historyPage,
NotificationCheckerInterface $notificationChecker,
- SharedSecurityServiceInterface $sharedSecurityService
+ SharedSecurityServiceInterface $sharedSecurityService,
) {
$this->sharedStorage = $sharedStorage;
$this->indexPage = $indexPage;
@@ -241,7 +241,7 @@ public function itShouldBeShippedToCustomerAtAddress(
string $street,
string $postcode,
string $city,
- string $countryName
+ string $countryName,
) {
$this->itShouldBeShippedTo(null, $customerName, $street, $postcode, $city, $countryName);
}
@@ -255,7 +255,7 @@ public function itShouldBeShippedTo(
string $street,
string $postcode,
string $city,
- string $countryName
+ string $countryName,
) {
if (null !== $order) {
$this->iSeeTheOrder($order);
@@ -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);
}
@@ -287,7 +287,7 @@ public function itShouldBeBilledTo(
string $street,
string $postcode,
string $city,
- string $countryName
+ string $countryName,
) {
if (null !== $order) {
$this->iSeeTheOrder($order);
@@ -512,7 +512,7 @@ public function iShouldBeNotifiedThatTheOrderSPaymentHasBeenSuccessfullyComplete
{
$this->notificationChecker->checkNotification(
'Payment has been successfully updated.',
- NotificationType::success()
+ NotificationType::success(),
);
}
@@ -523,7 +523,7 @@ public function iShouldBeNotifiedThatTheOrderSPaymentHasBeenSuccessfullyRefunded
{
$this->notificationChecker->checkNotification(
'Payment has been successfully refunded.',
- NotificationType::success()
+ NotificationType::success(),
);
}
@@ -575,7 +575,7 @@ public function iShouldBeNotifiedThatTheOrderHasBeenSuccessfullyShipped()
{
$this->notificationChecker->checkNotification(
'Shipment has been successfully updated.',
- NotificationType::success()
+ NotificationType::success(),
);
}
@@ -602,7 +602,7 @@ public function iShouldBeNotifiedAboutItHasBeenSuccessfullyCanceled()
{
$this->notificationChecker->checkNotification(
'Order has been successfully updated.',
- NotificationType::success()
+ NotificationType::success(),
);
}
@@ -637,7 +637,7 @@ public function itShouldHaveState($state)
public function theCustomerServiceShouldKnowAboutThisAdditionalNotes(
AdminUserInterface $user,
$note,
- OrderInterface $order
+ OrderInterface $order,
) {
$this->sharedSecurityService->performActionAsAdminUser(
$user,
@@ -645,7 +645,7 @@ function () use ($note, $order) {
$this->showPage->open(['id' => $order->getId()]);
Assert::true($this->showPage->hasNote($note));
- }
+ },
);
}
@@ -796,7 +796,7 @@ public function iShouldSeeAdProvinceInTheBillingAddress($provinceName)
*/
public function theAdministratorShouldKnowAboutIPAddressOfThisOrderMadeBy(
AdminUserInterface $user,
- OrderInterface $order
+ OrderInterface $order,
) {
$this->sharedSecurityService->performActionAsAdminUser(
$user,
@@ -804,7 +804,7 @@ function () use ($order) {
$this->showPage->open(['id' => $order->getId()]);
Assert::notSame($this->showPage->getIpAddressAssigned(), '');
- }
+ },
);
}
@@ -944,7 +944,7 @@ public function iShouldBeNotifiedThatTheOrderConfirmationEmailHasBeenSuccessfull
{
$this->notificationChecker->checkNotification(
sprintf('%s confirmation has been successfully resent to the customer.', ucfirst($type)),
- NotificationType::success()
+ NotificationType::success(),
);
}
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php
index 57d92927c11..2a242cc2fc4 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php
@@ -43,7 +43,7 @@ public function __construct(
UpdatePageInterface $updatePage,
CurrentPageResolverInterface $currentPageResolver,
NotificationCheckerInterface $notificationChecker,
- array $gatewayFactories
+ array $gatewayFactories,
) {
$this->createPage = $createPage;
$this->indexPage = $indexPage;
@@ -281,7 +281,7 @@ public function iShouldBeNotifiedThatIHaveToSpecifyPaypal($element)
{
Assert::same(
$this->createPage->getValidationMessage('paypal_' . $element),
- sprintf('Please enter paypal %s.', $element)
+ sprintf('Please enter paypal %s.', $element),
);
}
@@ -292,7 +292,7 @@ public function iShouldBeNotifiedThatGatewayNameShouldContainOnlyLettersAndUnder
{
Assert::same(
$this->createPage->getValidationMessage('gateway_name'),
- 'Gateway name should contain only letters and underscores.'
+ 'Gateway name should contain only letters and underscores.',
);
}
@@ -369,7 +369,7 @@ public function thisPaymentMethodShouldBeDisabled()
public function thePaymentMethodShouldHaveInstructionsIn(
PaymentMethodInterface $paymentMethod,
$instructions,
- $language
+ $language,
) {
$this->iWantToModifyAPaymentMethod($paymentMethod);
@@ -381,7 +381,7 @@ public function thePaymentMethodShouldHaveInstructionsIn(
*/
public function thePaymentMethodShouldBeAvailableInChannel(
PaymentMethodInterface $paymentMethod,
- $channelName
+ $channelName,
) {
$this->iWantToModifyAPaymentMethod($paymentMethod);
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentsContext.php
index f7a6fe5bfac..d2274db5336 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentsContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentsContext.php
@@ -33,7 +33,7 @@ final class ManagingPaymentsContext implements Context
public function __construct(
IndexPageInterface $indexPage,
ShowPageInterface $orderShowPage,
- NotificationCheckerInterface $notificationChecker
+ NotificationCheckerInterface $notificationChecker,
) {
$this->indexPage = $indexPage;
$this->orderShowPage = $orderShowPage;
@@ -104,7 +104,7 @@ public function iShouldSeePaymentsInTheList(int $count = 1): void
public function thePaymentOfTheOrderShouldBeFor(
string $orderNumber,
string $paymentState,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$parameters = [
'number' => $orderNumber,
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingProductAssociationTypesContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingProductAssociationTypesContext.php
index 2a5d1d374c1..ac815fceb13 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingProductAssociationTypesContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingProductAssociationTypesContext.php
@@ -35,7 +35,7 @@ public function __construct(
CreatePageInterface $createPage,
IndexPageInterface $indexPage,
UpdatePageInterface $updatePage,
- CurrentPageResolverInterface $currentPageResolver
+ CurrentPageResolverInterface $currentPageResolver,
) {
$this->createPage = $createPage;
$this->indexPage = $indexPage;
@@ -196,7 +196,7 @@ public function theProductAssociationTypeShouldAppearInTheStore(ProductAssociati
*/
public function thisProductAssociationTypeNameShouldBe(
ProductAssociationTypeInterface $productAssociationType,
- $productAssociationTypeName
+ $productAssociationTypeName,
) {
$this->iWantToBrowseProductAssociationTypes();
@@ -218,7 +218,7 @@ public function iShouldNotBeAbleToEditItsCode(): void
* @Then /^(this product association type) should no longer exist in the registry$/
*/
public function thisProductAssociationTypeShouldNoLongerExistInTheRegistry(
- ProductAssociationTypeInterface $productAssociationType
+ ProductAssociationTypeInterface $productAssociationType,
) {
Assert::false($this->indexPage->isSingleResourceOnPage([
'code' => $productAssociationType->getCode(),
@@ -233,7 +233,7 @@ public function iShouldBeNotifiedThatProductAssociationTypeWithThisCodeAlreadyEx
{
Assert::same(
$this->createPage->getValidationMessage('code'),
- 'The association type with given code already exists.'
+ 'The association type with given code already exists.',
);
}
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingProductAttributesContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingProductAttributesContext.php
index 9554af4b7a8..48a49242b83 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingProductAttributesContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingProductAttributesContext.php
@@ -40,7 +40,7 @@ public function __construct(
IndexPageInterface $indexPage,
UpdatePageInterface $updatePage,
CurrentPageResolverInterface $currentPageResolver,
- SharedSecurityServiceInterface $sharedSecurityService
+ SharedSecurityServiceInterface $sharedSecurityService,
) {
$this->createPage = $createPage;
$this->indexPage = $indexPage;
@@ -137,7 +137,7 @@ public function theAttributeShouldAppearInTheStore($type, $name)
Assert::true($this->indexPage->isSingleResourceWithSpecificElementOnPage(
['name' => $name],
- sprintf('td span.ui.label:contains("%s")', ucfirst($type))
+ sprintf('td span.ui.label:contains("%s")', ucfirst($type)),
));
}
@@ -253,7 +253,7 @@ public function theAdministratorChangesThisProductAttributesValueTo(
AdminUserInterface $user,
ProductAttributeInterface $productAttribute,
string $oldValue,
- string $newValue
+ string $newValue,
): void {
$this->sharedSecurityService->performActionAsAdminUser(
$user,
@@ -261,7 +261,7 @@ function () use ($productAttribute, $oldValue, $newValue) {
$this->iWantToEditThisAttribute($productAttribute);
$this->iChangeItsValueTo($oldValue, $newValue);
$this->iSaveMyChanges();
- }
+ },
);
}
@@ -305,7 +305,7 @@ public function iDoNotCheckMultipleOption(): void
public function theAdministratorDeletesTheValueFromThisProductAttribute(
AdminUserInterface $user,
string $value,
- ProductAttributeInterface $productAttribute
+ ProductAttributeInterface $productAttribute,
): void {
$this->sharedSecurityService->performActionAsAdminUser(
$user,
@@ -313,7 +313,7 @@ function () use ($productAttribute, $value) {
$this->iWantToEditThisAttribute($productAttribute);
$this->iDeleteValue($value);
$this->iSaveMyChanges();
- }
+ },
);
}
@@ -395,7 +395,7 @@ public function theSelectAttributeShouldHaveValue(ProductAttributeInterface $pro
public function iShouldBeNotifiedThatMaxLengthMustBeGreaterOrEqualToTheMinLength(): void
{
$this->assertValidationMessage(
- 'Configuration max length must be greater or equal to the min length.'
+ 'Configuration max length must be greater or equal to the min length.',
);
}
@@ -405,7 +405,7 @@ public function iShouldBeNotifiedThatMaxLengthMustBeGreaterOrEqualToTheMinLength
public function iShouldBeNotifiedThatMaxEntriesValueMustBeGreaterOrEqualToTheMinEntriesValue(): void
{
$this->assertValidationMessage(
- 'Configuration max entries value must be greater or equal to the min entries value.'
+ 'Configuration max entries value must be greater or equal to the min entries value.',
);
}
@@ -415,7 +415,7 @@ public function iShouldBeNotifiedThatMaxEntriesValueMustBeGreaterOrEqualToTheMin
public function iShouldBeNotifiedThatMinEntriesValueMustBeLowerOrEqualToTheNumberOfAddedChoices(): void
{
$this->assertValidationMessage(
- 'Configuration min entries value must be lower or equal to the number of added choices.'
+ 'Configuration min entries value must be lower or equal to the number of added choices.',
);
}
@@ -425,7 +425,7 @@ public function iShouldBeNotifiedThatMinEntriesValueMustBeLowerOrEqualToTheNumbe
public function iShouldBeNotifiedThatMultipleMustBeTrueIfMinOrMaxEntriesValuesAreSpecified(): void
{
$this->assertValidationMessage(
- 'Configuration multiple must be true if min or max entries values are specified.'
+ 'Configuration multiple must be true if min or max entries values are specified.',
);
}
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingProductOptionsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingProductOptionsContext.php
index 9e2db8525fb..82fd62405b9 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingProductOptionsContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingProductOptionsContext.php
@@ -35,7 +35,7 @@ public function __construct(
IndexPageInterface $indexPage,
CreatePageInterface $createPage,
UpdatePageInterface $updatePage,
- CurrentPageResolverInterface $currentPageResolver
+ CurrentPageResolverInterface $currentPageResolver,
) {
$this->indexPage = $indexPage;
$this->createPage = $createPage;
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingProductReviewsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingProductReviewsContext.php
index 3b94bcce450..2291d33c0b4 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingProductReviewsContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingProductReviewsContext.php
@@ -32,7 +32,7 @@ final class ManagingProductReviewsContext implements Context
public function __construct(
IndexPageInterface $indexPage,
UpdatePageInterface $updatePage,
- NotificationCheckerInterface $notificationChecker
+ NotificationCheckerInterface $notificationChecker,
) {
$this->indexPage = $indexPage;
$this->updatePage = $updatePage;
@@ -190,7 +190,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyUpdated($action)
{
$this->notificationChecker->checkNotification(
sprintf('Review has been successfully %s.', $action),
- NotificationType::success()
+ NotificationType::success(),
);
}
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php
index ccced0f4655..9c8cfbf5abd 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php
@@ -50,7 +50,7 @@ public function __construct(
UpdatePageInterface $updatePage,
GeneratePageInterface $generatePage,
CurrentPageResolverInterface $currentPageResolver,
- NotificationCheckerInterface $notificationChecker
+ NotificationCheckerInterface $notificationChecker,
) {
$this->sharedStorage = $sharedStorage;
$this->createPage = $createPage;
@@ -232,7 +232,7 @@ public function theVariantWithCodeShouldBePricedAtForChannel(ProductVariantInter
public function theVariantWithCodeShouldBeOriginalPricedAtForChannel(
ProductVariantInterface $productVariant,
string $price,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$this->updatePage->open(['id' => $productVariant->getId(), 'productId' => $productVariant->getProduct()->getId()]);
@@ -258,7 +258,7 @@ public function theVariantWithCodeShouldHaveAnOriginalPriceOfForChannel(ProductV
Assert::same(
$this->updatePage->getOriginalPriceForChannel($channel),
- $originalPrice
+ $originalPrice,
);
}
@@ -280,7 +280,7 @@ public function iShouldBeNotifiedOfFailure()
{
$this->notificationChecker->checkNotification(
'Cannot delete, the product variant is in use.',
- NotificationType::failure()
+ NotificationType::failure(),
);
}
@@ -364,7 +364,7 @@ public function iShouldBeNotifiedThatCodeIsRequiredForVariant($position)
{
Assert::same(
$this->generatePage->getValidationMessage('code', $position - 1),
- 'Please enter the code.'
+ 'Please enter the code.',
);
}
@@ -375,7 +375,7 @@ public function iShouldBeNotifiedThatPricesInAllChannelsMustBeDefinedForTheVaria
{
Assert::same(
$this->generatePage->getPricesValidationMessage($position - 1),
- 'You must define price for every channel.'
+ 'You must define price for every channel.',
);
}
@@ -386,7 +386,7 @@ public function iShouldBeNotifiedThatVariantCodeMustBeUniqueWithinThisProductFor
{
Assert::same(
$this->generatePage->getValidationMessage('code', $position - 1),
- 'This code must be unique within this product.'
+ 'This code must be unique within this product.',
);
}
@@ -397,7 +397,7 @@ public function iShouldBeNotifiedThatPricesInAllChannelsMustBeDefined()
{
Assert::contains(
$this->createPage->getPricesValidationMessage(),
- 'You must define price for every channel.'
+ 'You must define price for every channel.',
);
}
@@ -545,7 +545,7 @@ public function iShouldBeNotifiedThatOnHandQuantityMustBeGreaterThanTheNumberOfO
{
Assert::same(
$this->updatePage->getValidationMessage('on_hand'),
- 'On hand must be greater than the number of on hold units'
+ 'On hand must be greater than the number of on hold units',
);
}
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingProductsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingProductsContext.php
index f78a6b422cb..a6bd35a6223 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingProductsContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingProductsContext.php
@@ -81,7 +81,7 @@ public function __construct(
CurrentPageResolverInterface $currentPageResolver,
NotificationCheckerInterface $notificationChecker,
VariantUpdatePageInterface $variantUpdatePage,
- JavaScriptTestHelperInterface $testHelper
+ JavaScriptTestHelperInterface $testHelper,
) {
$this->sharedStorage = $sharedStorage;
$this->createSimpleProductPage = $createSimpleProductPage;
@@ -401,7 +401,7 @@ public function iShouldBeNotifiedOfFailure()
{
$this->notificationChecker->checkNotification(
'Cannot delete, the product is in use.',
- NotificationType::failure()
+ NotificationType::failure(),
);
}
@@ -698,7 +698,7 @@ public function iAttachImageWithType($path, $type = null)
*/
public function iAssociateProductsAsProductAssociation(
ProductAssociationTypeInterface $productAssociationType,
- ...$productsNames
+ ...$productsNames,
) {
$currentPage = $this->resolveCurrentPage();
@@ -710,7 +710,7 @@ public function iAssociateProductsAsProductAssociation(
*/
public function iRemoveAnAssociatedProductFromProductAssociation(
$productName,
- ProductAssociationTypeInterface $productAssociationType
+ ProductAssociationTypeInterface $productAssociationType,
) {
$currentPage = $this->resolveCurrentPage();
@@ -849,7 +849,7 @@ public function thereAreNoProductReviews(ProductInterface $product)
*/
public function theProductShouldHaveAnAssociationWithProducts(
ProductAssociationTypeInterface $productAssociationType,
- ...$productsNames
+ ...$productsNames,
) {
foreach ($productsNames as $productName) {
Assert::true(
@@ -857,8 +857,8 @@ public function theProductShouldHaveAnAssociationWithProducts(
sprintf(
'This product should have an association %s with product %s.',
$productAssociationType->getName(),
- $productName
- )
+ $productName,
+ ),
);
}
}
@@ -868,7 +868,7 @@ public function theProductShouldHaveAnAssociationWithProducts(
*/
public function theProductShouldNotHaveAnAssociationWithProduct(
ProductAssociationTypeInterface $productAssociationType,
- $productName
+ $productName,
) {
Assert::false($this->updateSimpleProductPage->hasAssociatedProduct($productName, $productAssociationType));
}
@@ -880,7 +880,7 @@ public function iShouldBeNotifiedThatOriginalPriceCanNotBeDefinedWithoutPrice():
{
Assert::same(
$this->createSimpleProductPage->getChannelPricingValidationMessage(),
- 'Original price can not be defined without price'
+ 'Original price can not be defined without price',
);
}
@@ -915,7 +915,7 @@ public function iShouldBeNotifiedThatPriceMustBeDefinedForEveryChannel()
{
Assert::same(
$this->createSimpleProductPage->getChannelPricingValidationMessage(),
- 'You must define price for every channel.'
+ 'You must define price for every channel.',
);
}
@@ -989,7 +989,7 @@ public function itsOriginalPriceForChannel(ProductInterface $product, string $or
Assert::same(
$this->updateSimpleProductPage->getOriginalPriceForChannel($channel),
- $originalPrice
+ $originalPrice,
);
}
@@ -1002,7 +1002,7 @@ public function thisProductShouldNoLongerHavePriceForChannel(ProductInterface $p
Assert::true(
$this->updateSimpleProductPage->hasNoPriceForChannel($channelName),
- sprintf('Product "%s" should not have price defined for channel "%s".', $product->getName(), $channelName)
+ sprintf('Product "%s" should not have price defined for channel "%s".', $product->getName(), $channelName),
);
}
@@ -1013,7 +1013,7 @@ public function iShouldBeNotifiedThatIHaveToDefineProductVariantsPricesForNewlyA
{
Assert::same(
$this->updateConfigurableProductPage->getValidationMessage('channels'),
- 'You have to define product variants\' prices for newly assigned channels first.'
+ 'You have to define product variants\' prices for newly assigned channels first.',
);
}
@@ -1034,7 +1034,7 @@ public function iShouldBeNotifiedThatIHaveToDefineTheAttributeIn($attribute, $la
{
Assert::same(
$this->resolveCurrentPage()->getAttributeValidationErrors($attribute, $language),
- 'This value should not be blank.'
+ 'This value should not be blank.',
);
}
@@ -1045,7 +1045,7 @@ public function iShouldBeNotifiedThatTheAttributeInShouldBeLongerThan($attribute
{
Assert::same(
$this->resolveCurrentPage()->getAttributeValidationErrors($attribute, $language),
- sprintf('This value is too short. It should have %s characters or more.', $number)
+ sprintf('This value is too short. It should have %s characters or more.', $number),
);
}
@@ -1088,7 +1088,7 @@ public function iShouldBeNotifiedThatThePositionIsInvalid(string $invalidPositio
{
$this->notificationChecker->checkNotification(
sprintf('The position "%s" is invalid.', $invalidPosition),
- NotificationType::failure()
+ NotificationType::failure(),
);
}
@@ -1119,7 +1119,7 @@ public function thisProductShouldBeDisabledAlongWithItsVariant(ProductInterface
Assert::false($this->updateSimpleProductPage->isEnabled());
$this->variantUpdatePage->open(
- ['productId' => $product->getId(), 'id' => $product->getVariants()->first()->getId()]
+ ['productId' => $product->getId(), 'id' => $product->getVariants()->first()->getId()],
);
Assert::false($this->variantUpdatePage->isEnabled());
}
@@ -1143,7 +1143,7 @@ public function thisProductShouldBeEnabledAlongWithItsVariant(ProductInterface $
Assert::true($this->updateSimpleProductPage->isEnabled());
$this->variantUpdatePage->open(
- ['productId' => $product->getId(), 'id' => $product->getVariants()->first()->getId()]
+ ['productId' => $product->getId(), 'id' => $product->getVariants()->first()->getId()],
);
Assert::true($this->variantUpdatePage->isEnabled());
}
@@ -1193,7 +1193,7 @@ private function assertElementValue($element, $value)
Assert::true(
$currentPage->hasResourceValues([$element => $value]),
- sprintf('Product should have %s with %s value.', $element, $value)
+ sprintf('Product should have %s with %s value.', $element, $value),
);
}
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionCouponsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionCouponsContext.php
index bebfb633583..dfb3c7d60d7 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionCouponsContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionCouponsContext.php
@@ -45,7 +45,7 @@ public function __construct(
IndexPageInterface $indexPage,
UpdatePageInterface $updatePage,
CurrentPageResolverInterface $currentPageResolver,
- NotificationCheckerInterface $notificationChecker
+ NotificationCheckerInterface $notificationChecker,
) {
$this->createPage = $createPage;
$this->generatePage = $generatePage;
@@ -432,7 +432,7 @@ public function iShouldBeNotifiedOfFailure()
{
$this->notificationChecker->checkNotification(
'Error Cannot delete, the promotion coupon is in use.',
- NotificationType::failure()
+ NotificationType::failure(),
);
}
@@ -452,7 +452,7 @@ public function iShouldBeNotifiedThatGeneratingCouponsWithCodeLengthIsNotPossibl
Assert::true($this->generatePage->checkGenerationValidation(sprintf(
'Invalid coupons code length or coupons amount. It is not possible to generate %d unique coupons with code length %d.',
$amount,
- $codeLength
+ $codeLength,
)));
}
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php
index 68a1b7f0cd4..9f0b099b1d2 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php
@@ -48,7 +48,7 @@ public function __construct(
CreatePageInterface $createPage,
UpdatePageInterface $updatePage,
CurrentPageResolverInterface $currentPageResolver,
- NotificationCheckerInterface $notificationChecker
+ NotificationCheckerInterface $notificationChecker,
) {
$this->sharedStorage = $sharedStorage;
$this->indexPage = $indexPage;
@@ -155,7 +155,7 @@ public function iAddTheItemTotalRuleConfiguredWithTwoChannel(
$firstAmount,
$firstChannelName,
$secondAmount,
- $secondChannelName
+ $secondChannelName,
) {
$this->createPage->addRule('Item total');
$this->createPage->fillRuleOptionForChannel($firstChannelName, 'Amount', $firstAmount);
@@ -218,7 +218,7 @@ public function iSpecifyThatThisActionShouldBeAppliedToItemsFromCategory($taxonN
public function iAddTheActionConfiguredWithAPercentageValueForChannel(
string $actionType,
string $percentage = null,
- string $channelName
+ string $channelName,
): void {
$this->createPage->addAction($actionType);
$this->createPage->fillActionOptionForChannel($channelName, 'Percentage', $percentage);
@@ -464,7 +464,7 @@ public function iShouldBeNotifiedOfFailure()
{
$this->notificationChecker->checkNotification(
'Cannot delete, the promotion is in use.',
- NotificationType::failure()
+ NotificationType::failure(),
);
}
@@ -510,7 +510,7 @@ public function iShouldBeNotifiedThatThisValueShouldNotBeBlank()
{
Assert::same(
$this->createPage->getValidationMessageForAction(),
- 'This value should not be blank.'
+ 'This value should not be blank.',
);
}
@@ -522,7 +522,7 @@ public function iShouldBeNotifiedThatPercentageDiscountShouldBeBetween(): void
{
Assert::same(
$this->createPage->getValidationMessageForAction(),
- 'The percentage discount must be between 0% and 100%.'
+ 'The percentage discount must be between 0% and 100%.',
);
}
@@ -535,7 +535,7 @@ public function thePromotionShouldBeUsedTime(PromotionInterface $promotion, $usa
Assert::same(
(int) $usage,
$this->indexPage->getUsageNumber($promotion),
- 'Promotion should be used %s times, but is %2$s.'
+ 'Promotion should be used %s times, but is %2$s.',
);
}
@@ -566,7 +566,7 @@ public function iShouldSeePromotionsOnTheList($count)
Assert::same(
(int) $count,
$actualCount,
- 'There should be %s promotion, but there\'s %2$s.'
+ 'There should be %s promotion, but there\'s %2$s.',
);
}
@@ -581,7 +581,7 @@ public function theFirstPromotionOnTheListShouldHave($field, $value)
Assert::same(
$actualValue,
$value,
- sprintf('Expected first promotion\'s %s to be "%s", but it is "%s".', $field, $value, $actualValue)
+ sprintf('Expected first promotion\'s %s to be "%s", but it is "%s".', $field, $value, $actualValue),
);
}
@@ -596,7 +596,7 @@ public function theLastPromotionOnTheListShouldHave($field, $value)
Assert::same(
$actualValue,
$value,
- sprintf('Expected last promotion\'s %s to be "%s", but it is "%s".', $field, $value, $actualValue)
+ sprintf('Expected last promotion\'s %s to be "%s", but it is "%s".', $field, $value, $actualValue),
);
}
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingShipmentsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingShipmentsContext.php
index 18bc30f3b1a..d370e6e895d 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingShipmentsContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingShipmentsContext.php
@@ -38,7 +38,7 @@ public function __construct(
IndexPageInterface $indexPage,
OrderShowPageInterface $orderShowPage,
NotificationCheckerInterface $notificationChecker,
- ShowPageInterface $showPage
+ ShowPageInterface $showPage,
) {
$this->indexPage = $indexPage;
$this->orderShowPage = $orderShowPage;
@@ -62,7 +62,7 @@ public function shipmentOfOrderShouldBe(
string $orderNumber,
string $shippingState,
CustomerInterface $customer,
- Channel $channel = null
+ Channel $channel = null,
): void {
$parameters = [
'number' => $orderNumber,
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php
index bbe0fc64454..cedb8f72e95 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php
@@ -31,7 +31,7 @@ class ManagingShippingCategoriesContext implements Context
public function __construct(
IndexPageInterface $indexPage,
CreatePageInterface $createPage,
- UpdatePageInterface $updatePage
+ UpdatePageInterface $updatePage,
) {
$this->indexPage = $indexPage;
$this->createPage = $createPage;
@@ -87,7 +87,7 @@ public function iShouldBeNotifiedThatCodeIsRequired($element)
{
Assert::same(
$this->updatePage->getValidationMessage($element),
- sprintf('Please enter shipping category %s.', $element)
+ sprintf('Please enter shipping category %s.', $element),
);
}
@@ -217,7 +217,7 @@ public function iShouldBeNotifiedThatShippingCategoryWithThisCodeAlreadyExists()
{
Assert::same(
$this->createPage->getValidationMessage('code'),
- 'The shipping category with given code already exists.'
+ 'The shipping category with given code already exists.',
);
}
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingShippingMethodsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingShippingMethodsContext.php
index 09a0d5fbaff..79d6a911d55 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingShippingMethodsContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingShippingMethodsContext.php
@@ -41,7 +41,7 @@ public function __construct(
CreatePageInterface $createPage,
UpdatePageInterface $updatePage,
CurrentPageResolverInterface $currentPageResolver,
- NotificationCheckerInterface $notificationChecker
+ NotificationCheckerInterface $notificationChecker,
) {
$this->indexPage = $indexPage;
$this->createPage = $createPage;
@@ -175,7 +175,7 @@ public function thisShippingMethodShouldStillBeInTheRegistry(ShippingMethodInter
*/
public function theShippingMethodShouldBeAvailableInChannel(
ShippingMethodInterface $shippingMethod,
- $channelName
+ $channelName,
) {
$this->iWantToModifyAShippingMethod($shippingMethod);
@@ -255,7 +255,7 @@ public function iShouldBeNotifiedThatCodeShouldContain()
{
$this->assertFieldValidationMessage(
'code',
- 'Shipping method code can only be comprised of letters, numbers, dashes and underscores.'
+ 'Shipping method code can only be comprised of letters, numbers, dashes and underscores.',
);
}
@@ -481,7 +481,7 @@ public function iShouldBeNotifiedThatAmountForChannelShouldNotBeBlank(ChannelInt
Assert::same(
$currentPage->getValidationMessageForAmount($channel->getCode()),
- 'This value should not be blank.'
+ 'This value should not be blank.',
);
}
@@ -495,7 +495,7 @@ public function iShouldBeNotifiedThatShippingChargeForChannelCannotBeLowerThan0(
Assert::same(
$currentPage->getValidationMessageForAmount($channel->getCode()),
- 'Shipping charge cannot be lower than 0.'
+ 'Shipping charge cannot be lower than 0.',
);
}
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxCategoriesContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxCategoriesContext.php
index 26b72a50bad..1bb4997fbfe 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxCategoriesContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxCategoriesContext.php
@@ -35,7 +35,7 @@ public function __construct(
IndexPageInterface $indexPage,
CreatePageInterface $createPage,
UpdatePageInterface $updatePage,
- CurrentPageResolverInterface $currentPageResolver
+ CurrentPageResolverInterface $currentPageResolver,
) {
$this->indexPage = $indexPage;
$this->createPage = $createPage;
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php
index a435a76af62..10d9def2db6 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php
@@ -35,7 +35,7 @@ public function __construct(
IndexPageInterface $indexPage,
CreatePageInterface $createPage,
UpdatePageInterface $updatePage,
- CurrentPageResolverInterface $currentPageResolver
+ CurrentPageResolverInterface $currentPageResolver,
) {
$this->indexPage = $indexPage;
$this->createPage = $createPage;
@@ -325,7 +325,7 @@ private function assertFieldValue(TaxRateInterface $taxRate, $element, $taxRateE
'code' => $taxRate->getCode(),
$element => $taxRateElement,
]),
- sprintf('Tax rate %s %s has not been assigned properly.', $element, $taxRateElement)
+ sprintf('Tax rate %s %s has not been assigned properly.', $element, $taxRateElement),
);
}
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxonsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxonsContext.php
index 7812c59c474..f8aef788291 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxonsContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxonsContext.php
@@ -48,7 +48,7 @@ public function __construct(
UpdatePageInterface $updatePage,
CurrentPageResolverInterface $currentPageResolver,
NotificationCheckerInterface $notificationChecker,
- JavaScriptTestHelper $testHelper
+ JavaScriptTestHelper $testHelper,
) {
$this->sharedStorage = $sharedStorage;
$this->createPage = $createPage;
@@ -394,7 +394,7 @@ public function iShouldBeNotifiedThatICannotDeleteAMenuTaxonOfAnyChannel(): void
{
$this->notificationChecker->checkNotification(
'You cannot delete a menu taxon of any channel.',
- NotificationType::failure()
+ NotificationType::failure(),
);
}
@@ -405,7 +405,7 @@ public function iShouldBeNotifiedThatICannotDeleteATaxonInUse(): void
{
$this->notificationChecker->checkNotification(
'Cannot delete, the taxon is in use.',
- NotificationType::failure()
+ NotificationType::failure(),
);
}
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingZonesContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingZonesContext.php
index 570e3297357..929b1b09140 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ManagingZonesContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingZonesContext.php
@@ -42,7 +42,7 @@ public function __construct(
IndexPageInterface $indexPage,
UpdatePageInterface $updatePage,
CurrentPageResolverInterface $currentPageResolver,
- NotificationCheckerInterface $notificationChecker
+ NotificationCheckerInterface $notificationChecker,
) {
$this->createPage = $createPage;
$this->indexPage = $indexPage;
@@ -342,7 +342,7 @@ private function assertZoneAndItsMember(ZoneInterface $zone, ZoneMemberInterface
'code' => $zone->getCode(),
'name' => $zone->getName(),
]),
- sprintf('Zone %s is not valid', $zone->getName())
+ sprintf('Zone %s is not valid', $zone->getName()),
);
Assert::true($this->updatePage->hasMember($zoneMember));
diff --git a/src/Sylius/Behat/Context/Ui/Admin/NotificationContext.php b/src/Sylius/Behat/Context/Ui/Admin/NotificationContext.php
index 80bbb410cb1..efca896bf35 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/NotificationContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/NotificationContext.php
@@ -38,7 +38,7 @@ public function iShouldBeNotifiedItHasBeenSuccessfullyCreated(): void
$this->testHelper->waitUntilNotificationPopups(
$this->notificationChecker,
NotificationType::success(),
- 'has been successfully created.'
+ 'has been successfully created.',
);
}
@@ -50,7 +50,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyEdited(): void
$this->testHelper->waitUntilNotificationPopups(
$this->notificationChecker,
NotificationType::success(),
- 'has been successfully updated.'
+ 'has been successfully updated.',
);
}
@@ -63,7 +63,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyDeleted(): void
$this->testHelper->waitUntilNotificationPopups(
$this->notificationChecker,
NotificationType::success(),
- 'has been successfully deleted.'
+ 'has been successfully deleted.',
);
}
}
diff --git a/src/Sylius/Behat/Context/Ui/Admin/ProductShowPageContext.php b/src/Sylius/Behat/Context/Ui/Admin/ProductShowPageContext.php
index 4631d9a231b..fe2bd6801d3 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/ProductShowPageContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/ProductShowPageContext.php
@@ -68,7 +68,7 @@ public function __construct(
ShippingElementInterface $shippingElement,
TaxonomyElementInterface $taxonomyElement,
OptionsElementInterface $optionsElement,
- VariantsElementInterface $variantsElement
+ VariantsElementInterface $variantsElement,
) {
$this->indexPage = $indexPage;
$this->productShowPage = $productShowPage;
diff --git a/src/Sylius/Behat/Context/Ui/Admin/RemovingTaxonContext.php b/src/Sylius/Behat/Context/Ui/Admin/RemovingTaxonContext.php
index e406cbddbcd..81f8227296f 100644
--- a/src/Sylius/Behat/Context/Ui/Admin/RemovingTaxonContext.php
+++ b/src/Sylius/Behat/Context/Ui/Admin/RemovingTaxonContext.php
@@ -49,7 +49,7 @@ public function iShouldBeNotifiedThatPromotionHasBeenUpdated(PromotionInterface
{
$this->notificationChecker->checkNotification(
sprintf('Some rules of the promotions with codes %s have been updated.', $promotion->getCode()),
- NotificationType::info()
+ NotificationType::info(),
);
}
}
diff --git a/src/Sylius/Behat/Context/Ui/ChannelContext.php b/src/Sylius/Behat/Context/Ui/ChannelContext.php
index b3e7df42540..e97f4fd206a 100644
--- a/src/Sylius/Behat/Context/Ui/ChannelContext.php
+++ b/src/Sylius/Behat/Context/Ui/ChannelContext.php
@@ -43,7 +43,7 @@ public function __construct(
ChannelRepositoryInterface $channelRepository,
CreatePageInterface $channelCreatePage,
HomePageInterface $homePage,
- MainPageInterface $pluginMainPage
+ MainPageInterface $pluginMainPage,
) {
$this->sharedStorage = $sharedStorage;
$this->channelContextSetter = $channelContextSetter;
diff --git a/src/Sylius/Behat/Context/Ui/CustomerContext.php b/src/Sylius/Behat/Context/Ui/CustomerContext.php
index 7659d637789..7bbaf6dbc32 100644
--- a/src/Sylius/Behat/Context/Ui/CustomerContext.php
+++ b/src/Sylius/Behat/Context/Ui/CustomerContext.php
@@ -27,7 +27,7 @@ final class CustomerContext implements Context
public function __construct(
SharedStorageInterface $sharedStorage,
- ShowPageInterface $customerShowPage
+ ShowPageInterface $customerShowPage,
) {
$this->sharedStorage = $sharedStorage;
$this->customerShowPage = $customerShowPage;
diff --git a/src/Sylius/Behat/Context/Ui/EmailContext.php b/src/Sylius/Behat/Context/Ui/EmailContext.php
index 4de7c67c43c..14139d0b447 100644
--- a/src/Sylius/Behat/Context/Ui/EmailContext.php
+++ b/src/Sylius/Behat/Context/Ui/EmailContext.php
@@ -32,7 +32,7 @@ final class EmailContext implements Context
public function __construct(
SharedStorageInterface $sharedStorage,
EmailCheckerInterface $emailChecker,
- TranslatorInterface $translator
+ TranslatorInterface $translator,
) {
$this->sharedStorage = $sharedStorage;
$this->emailChecker = $emailChecker;
@@ -56,7 +56,7 @@ public function anEmailWithResetTokenShouldBeSentTo(string $recipient, string $l
{
$this->assertEmailContainsMessageTo(
$this->translator->trans('sylius.email.password_reset.reset_your_password', [], null, $localeCode),
- $recipient
+ $recipient,
);
}
@@ -69,9 +69,9 @@ public function anEmailWithShipmentsConfirmationForTheOrderShouldBeSentTo(string
sprintf(
'Your order with number %s has been sent using %s.',
$orderNumber,
- $method
+ $method,
),
- $recipient
+ $recipient,
));
}
@@ -91,7 +91,7 @@ public function aWelcomingEmailShouldHaveBeenSentTo(string $recipient, string $l
{
$this->assertEmailContainsMessageTo(
$this->translator->trans('sylius.email.user_registration.welcome_to_our_store', [], null, $localeCode),
- $recipient
+ $recipient,
);
}
@@ -102,16 +102,16 @@ public function aWelcomingEmailShouldHaveBeenSentTo(string $recipient, string $l
public function anEmailWithTheConfirmationOfTheOrderShouldBeSentTo(
OrderInterface $order,
string $recipient,
- string $localeCode = 'en_US'
+ string $localeCode = 'en_US',
): void {
$this->assertEmailContainsMessageTo(
sprintf(
'%s %s %s',
$this->translator->trans('sylius.email.order_confirmation.your_order_number', [], null, $localeCode),
$order->getNumber(),
- $this->translator->trans('sylius.email.order_confirmation.has_been_successfully_placed', [], null, $localeCode)
+ $this->translator->trans('sylius.email.order_confirmation.has_been_successfully_placed', [], null, $localeCode),
),
- $recipient
+ $recipient,
);
}
@@ -133,7 +133,7 @@ public function anEmailWithSummaryOfOrderPlacedByShouldBeSentTo(OrderInterface $
public function anEmailWithShipmentDetailsOfOrderShouldBeSentTo(
OrderInterface $order,
string $recipient,
- string $localeCode = 'en_US'
+ string $localeCode = 'en_US',
): void {
$this->assertEmailContainsMessageTo(
sprintf(
@@ -141,9 +141,9 @@ public function anEmailWithShipmentDetailsOfOrderShouldBeSentTo(
$this->translator->trans('sylius.email.shipment_confirmation.your_order_with_number', [], null, $localeCode),
$order->getNumber(),
$this->translator->trans('sylius.email.shipment_confirmation.has_been_sent_using', [], null, $localeCode),
- $this->getShippingMethodName($order)
+ $this->getShippingMethodName($order),
),
- $recipient
+ $recipient,
);
if ($this->sharedStorage->has('tracking_code')) {
@@ -151,7 +151,7 @@ public function anEmailWithShipmentDetailsOfOrderShouldBeSentTo(
$this->translator->trans('sylius.email.shipment_confirmation.you_can_check_its_location_with_the_tracking_code', [
'%tracking_code%' => $this->sharedStorage->get('tracking_code'),
], null, $localeCode),
- $recipient
+ $recipient,
);
}
}
diff --git a/src/Sylius/Behat/Context/Ui/PaypalContext.php b/src/Sylius/Behat/Context/Ui/PaypalContext.php
index 94946b193fa..25352327533 100644
--- a/src/Sylius/Behat/Context/Ui/PaypalContext.php
+++ b/src/Sylius/Behat/Context/Ui/PaypalContext.php
@@ -33,7 +33,7 @@ public function __construct(
PaypalExpressCheckoutPageInterface $paypalExpressCheckoutPage,
ShowPageInterface $orderDetails,
CompletePageInterface $summaryPage,
- PaypalApiMocker $paypalApiMocker
+ PaypalApiMocker $paypalApiMocker,
) {
$this->paypalExpressCheckoutPage = $paypalExpressCheckoutPage;
$this->orderDetails = $orderDetails;
diff --git a/src/Sylius/Behat/Context/Ui/Shop/AccountContext.php b/src/Sylius/Behat/Context/Ui/Shop/AccountContext.php
index a2cdcfdae72..8e4cac90fd2 100644
--- a/src/Sylius/Behat/Context/Ui/Shop/AccountContext.php
+++ b/src/Sylius/Behat/Context/Ui/Shop/AccountContext.php
@@ -55,7 +55,7 @@ public function __construct(
ShowPageInterface $orderShowPage,
LoginPageInterface $loginPage,
NotificationCheckerInterface $notificationChecker,
- SharedStorageInterface $sharedStorage
+ SharedStorageInterface $sharedStorage,
) {
$this->dashboardPage = $dashboardPage;
$this->profileUpdatePage = $profileUpdatePage;
@@ -148,7 +148,7 @@ public function iShouldBeNotifiedThatElementIsRequired($element)
{
Assert::true($this->profileUpdatePage->checkValidationMessageFor(
StringInflector::nameToCode($element),
- sprintf('Please enter your %s.', $element)
+ sprintf('Please enter your %s.', $element),
));
}
@@ -159,7 +159,7 @@ public function iShouldBeNotifiedThatElementIsInvalid($element)
{
Assert::true($this->profileUpdatePage->checkValidationMessageFor(
StringInflector::nameToCode($element),
- sprintf('This %s is invalid.', $element)
+ sprintf('This %s is invalid.', $element),
));
}
@@ -228,7 +228,7 @@ public function iShouldBeNotifiedThatProvidedPasswordIsDifferentThanTheCurrentOn
{
Assert::true($this->changePasswordPage->checkValidationMessageFor(
'current_password',
- 'Provided password is different than the current one.'
+ 'Provided password is different than the current one.',
));
}
@@ -239,7 +239,7 @@ public function iShouldBeNotifiedThatTheEnteredPasswordsDoNotMatch()
{
Assert::true($this->changePasswordPage->checkValidationMessageFor(
'new_password',
- 'The entered passwords don\'t match'
+ 'The entered passwords don\'t match',
));
}
@@ -250,7 +250,7 @@ public function iShouldBeNotifiedThatThePasswordShouldBeAtLeastCharactersLong()
{
Assert::true($this->changePasswordPage->checkValidationMessageFor(
'new_password',
- 'Password must be at least 4 characters long.'
+ 'Password must be at least 4 characters long.',
));
}
@@ -497,7 +497,7 @@ public function iShouldBeNotifiedThatTheVerificationEmailHasBeenSent(): void
{
$this->notificationChecker->checkNotification(
'An email with the verification link has been sent to your email address.',
- NotificationType::success()
+ NotificationType::success(),
);
}
diff --git a/src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php b/src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php
index 29d38f7a90c..24b296275b2 100644
--- a/src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php
+++ b/src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php
@@ -49,7 +49,7 @@ public function __construct(
CreatePageInterface $addressBookCreatePage,
UpdatePageInterface $addressBookUpdatePage,
CurrentPageResolverInterface $currentPageResolver,
- NotificationCheckerInterface $notificationChecker
+ NotificationCheckerInterface $notificationChecker,
) {
$this->sharedStorage = $sharedStorage;
$this->addressRepository = $addressRepository;
@@ -397,6 +397,7 @@ private function getCurrentPage()
->getCurrentPageWithForm([
$this->addressBookCreatePage,
$this->addressBookUpdatePage,
- ]);
+ ])
+ ;
}
}
diff --git a/src/Sylius/Behat/Context/Ui/Shop/AuthorizationContext.php b/src/Sylius/Behat/Context/Ui/Shop/AuthorizationContext.php
index e6015ea6554..5cbb31900c6 100644
--- a/src/Sylius/Behat/Context/Ui/Shop/AuthorizationContext.php
+++ b/src/Sylius/Behat/Context/Ui/Shop/AuthorizationContext.php
@@ -29,7 +29,7 @@ final class AuthorizationContext implements Context
public function __construct(
LoginPageInterface $loginPage,
RegisterPageInterface $registerPage,
- RegisterElementInterface $registerElement
+ RegisterElementInterface $registerElement,
) {
$this->loginPage = $loginPage;
$this->registerPage = $registerPage;
diff --git a/src/Sylius/Behat/Context/Ui/Shop/CartContext.php b/src/Sylius/Behat/Context/Ui/Shop/CartContext.php
index 80ad2f1d4f6..cc19816c253 100644
--- a/src/Sylius/Behat/Context/Ui/Shop/CartContext.php
+++ b/src/Sylius/Behat/Context/Ui/Shop/CartContext.php
@@ -42,7 +42,7 @@ public function __construct(
SummaryPageInterface $summaryPage,
ShowPageInterface $productShowPage,
NotificationCheckerInterface $notificationChecker,
- SessionManagerInterface $sessionManager
+ SessionManagerInterface $sessionManager,
) {
$this->sharedStorage = $sharedStorage;
$this->summaryPage = $summaryPage;
@@ -403,7 +403,7 @@ public function iViewMyCartInPreviousSession(): void
public function iAddThisProductWithToTheCart(
ProductInterface $product,
ProductOptionInterface $productOption,
- string $productOptionValue
+ string $productOptionValue,
): void {
$this->productShowPage->open(['slug' => $product->getSlug()]);
diff --git a/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutAddressingContext.php b/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutAddressingContext.php
index ed07d2ced6c..7a844e5bf5f 100644
--- a/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutAddressingContext.php
+++ b/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutAddressingContext.php
@@ -44,7 +44,7 @@ public function __construct(
FactoryInterface $addressFactory,
AddressComparatorInterface $addressComparator,
SelectShippingPageInterface $selectShippingPage,
- JavaScriptTestHelperInterface $testHelper
+ JavaScriptTestHelperInterface $testHelper,
) {
$this->sharedStorage = $sharedStorage;
$this->addressPage = $addressPage;
@@ -150,7 +150,7 @@ public function iSpecifyTheShippingAddressAs(AddressInterface $address)
$key = sprintf(
'shipping_address_%s_%s',
strtolower((string) $address->getFirstName()),
- strtolower((string) $address->getLastName())
+ strtolower((string) $address->getLastName()),
);
$this->sharedStorage->set($key, $address);
@@ -183,7 +183,7 @@ public function iSpecifyTheBillingAddressAs(AddressInterface $address)
$key = sprintf(
'billing_address_%s_%s',
strtolower((string) $address->getFirstName()),
- strtolower((string) $address->getLastName())
+ strtolower((string) $address->getLastName()),
);
$this->sharedStorage->set($key, $address);
@@ -250,7 +250,7 @@ public function iGoBackToStore()
public function iProceedSelectingBillingCountry(
CountryInterface $shippingCountry = null,
string $localeCode = 'en_US',
- ?string $email = null
+ ?string $email = null,
) {
$this->addressPage->open(['_locale' => $localeCode]);
$shippingAddress = $this->createDefaultAddress();
@@ -269,7 +269,7 @@ public function iProceedSelectingBillingCountry(
*/
public function iProceedLoggingAsGuestWithAsBillingCountry(
string $email,
- CountryInterface $shippingCountry = null
+ CountryInterface $shippingCountry = null,
): void {
$this->addressPage->open();
$this->addressPage->specifyEmail($email);
diff --git a/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutCompleteContext.php b/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutCompleteContext.php
index 1bda13b1b20..7fa44d864ac 100644
--- a/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutCompleteContext.php
+++ b/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutCompleteContext.php
@@ -40,7 +40,7 @@ final class CheckoutCompleteContext implements Context
public function __construct(
SharedStorageInterface $sharedStorage,
CompletePageInterface $completePage,
- NotificationCheckerInterface $notificationChecker
+ NotificationCheckerInterface $notificationChecker,
) {
$this->sharedStorage = $sharedStorage;
$this->completePage = $completePage;
@@ -285,8 +285,8 @@ public function iShouldNotBeAbleToConfirmOrderBecauseDoNotBelongsToShippingCateg
$this->completePage->getValidationErrors(),
sprintf(
'Product does not fit requirements for %s shipping method. Please reselect your shipping method.',
- $shippingMethod->getName()
- )
+ $shippingMethod->getName(),
+ ),
);
}
@@ -297,7 +297,7 @@ public function iShouldBeInformedThatMyPromotionIsNoLongerApplied(PromotionInter
{
$this->notificationChecker->checkNotification(
sprintf('You are no longer eligible for this promotion %s.', $promotion->getName()),
- NotificationType::failure()
+ NotificationType::failure(),
);
}
@@ -310,8 +310,8 @@ public function iShouldBeInformedThatThisPaymentMethodHasBeenDisabled(PaymentMet
$this->completePage->getValidationErrors(),
sprintf(
'This payment method %s has been disabled. Please reselect your payment method.',
- $paymentMethod->getName()
- )
+ $paymentMethod->getName(),
+ ),
);
}
@@ -324,8 +324,8 @@ public function iShouldBeInformedThatThisProductHasBeenDisabled(ProductInterface
$this->completePage->getValidationErrors(),
sprintf(
'This product %s has been disabled.',
- $product->getName()
- )
+ $product->getName(),
+ ),
);
}
@@ -336,7 +336,7 @@ public function iShouldBeInformedThatOrderTotalHasBeenChanged()
{
$this->notificationChecker->checkNotification(
'Your order total has been changed, check your order information and confirm it again.',
- NotificationType::failure()
+ NotificationType::failure(),
);
}
@@ -357,8 +357,8 @@ public function iShouldBeInformedThatThisVariantHasBeenDisabled(ProductVariantIn
$this->completePage->getValidationErrors(),
sprintf(
'This product %s has been disabled.',
- $productVariant->getName()
- )
+ $productVariant->getName(),
+ ),
);
}
diff --git a/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutShippingContext.php b/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutShippingContext.php
index 6816ae28a88..dc5af64ea47 100644
--- a/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutShippingContext.php
+++ b/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutShippingContext.php
@@ -32,7 +32,7 @@ final class CheckoutShippingContext implements Context
public function __construct(
SelectShippingPageInterface $selectShippingPage,
SelectPaymentPageInterface $selectPaymentPage,
- CompletePageInterface $completePage
+ CompletePageInterface $completePage,
) {
$this->selectShippingPage = $selectShippingPage;
$this->selectPaymentPage = $selectPaymentPage;
diff --git a/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutThankYouContext.php b/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutThankYouContext.php
index 256cfe5118d..89f8b232af0 100644
--- a/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutThankYouContext.php
+++ b/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutThankYouContext.php
@@ -35,7 +35,7 @@ public function __construct(
ThankYouPageInterface $thankYouPage,
ShowPageInterface $orderShowPage,
OrderRepositoryInterface $orderRepository,
- OrderDetailsPage $orderDetails
+ OrderDetailsPage $orderDetails,
) {
$this->thankYouPage = $thankYouPage;
$this->orderShowPage = $orderShowPage;
diff --git a/src/Sylius/Behat/Context/Ui/Shop/Checkout/RegistrationAfterCheckoutContext.php b/src/Sylius/Behat/Context/Ui/Shop/Checkout/RegistrationAfterCheckoutContext.php
index e13e1c7c020..6f08961b9b9 100644
--- a/src/Sylius/Behat/Context/Ui/Shop/Checkout/RegistrationAfterCheckoutContext.php
+++ b/src/Sylius/Behat/Context/Ui/Shop/Checkout/RegistrationAfterCheckoutContext.php
@@ -43,7 +43,7 @@ public function __construct(
ThankYouPageInterface $thankYouPage,
HomePageInterface $homePage,
VerificationPageInterface $verificationPage,
- RegisterElementInterface $registerElement
+ RegisterElementInterface $registerElement,
) {
$this->sharedStorage = $sharedStorage;
$this->loginPage = $loginPage;
diff --git a/src/Sylius/Behat/Context/Ui/Shop/CheckoutContext.php b/src/Sylius/Behat/Context/Ui/Shop/CheckoutContext.php
index 3d14f1c88c3..7a8795c9653 100644
--- a/src/Sylius/Behat/Context/Ui/Shop/CheckoutContext.php
+++ b/src/Sylius/Behat/Context/Ui/Shop/CheckoutContext.php
@@ -60,7 +60,7 @@ public function __construct(
CurrentPageResolverInterface $currentPageResolver,
CheckoutAddressingContext $addressingContext,
CheckoutShippingContext $shippingContext,
- CheckoutPaymentContext $paymentContext
+ CheckoutPaymentContext $paymentContext,
) {
$this->addressPage = $addressPage;
$this->selectPaymentPage = $selectPaymentPage;
@@ -132,7 +132,7 @@ public function iProceedThroughCheckoutProcess(string $localeCode = 'en_US', ?st
*/
public function iProceedSelectingBillingCountryAndShippingMethod(
CountryInterface $shippingCountry = null,
- ?string $shippingMethodName = null
+ ?string $shippingMethodName = null,
): void {
$this->addressingContext->iProceedSelectingBillingCountry($shippingCountry);
$this->shippingContext->iHaveProceededSelectingShippingMethod($shippingMethodName ?: 'Free');
diff --git a/src/Sylius/Behat/Context/Ui/Shop/ContactContext.php b/src/Sylius/Behat/Context/Ui/Shop/ContactContext.php
index 21afccd2a8d..2ee15a1e98c 100644
--- a/src/Sylius/Behat/Context/Ui/Shop/ContactContext.php
+++ b/src/Sylius/Behat/Context/Ui/Shop/ContactContext.php
@@ -27,7 +27,7 @@ final class ContactContext implements Context
public function __construct(
ContactPageInterface $contactPage,
- NotificationCheckerInterface $notificationChecker
+ NotificationCheckerInterface $notificationChecker,
) {
$this->contactPage = $contactPage;
$this->notificationChecker = $notificationChecker;
@@ -75,7 +75,7 @@ public function iShouldBeNotifiedThatTheContactRequestHasBeenSubmittedSuccessful
{
$this->notificationChecker->checkNotification(
'Your contact request has been submitted successfully.',
- NotificationType::success()
+ NotificationType::success(),
);
}
@@ -102,7 +102,7 @@ public function iShouldBeNotifiedThatAProblemOccurredWhileSendingTheContactReque
{
$this->notificationChecker->checkNotification(
'A problem occurred while sending the contact request. Please try again later.',
- NotificationType::failure()
+ NotificationType::failure(),
);
}
}
diff --git a/src/Sylius/Behat/Context/Ui/Shop/CurrencyContext.php b/src/Sylius/Behat/Context/Ui/Shop/CurrencyContext.php
index 109f5c6ee98..119b8ed797a 100644
--- a/src/Sylius/Behat/Context/Ui/Shop/CurrencyContext.php
+++ b/src/Sylius/Behat/Context/Ui/Shop/CurrencyContext.php
@@ -67,7 +67,7 @@ public function iShouldNotBeAbleToShopUsingTheCurrency($currencyCode)
throw new \InvalidArgumentException(sprintf(
'Expected "%s" not to be in "%s"',
$currencyCode,
- implode('", "', $this->homePage->getAvailableCurrencies())
+ implode('", "', $this->homePage->getAvailableCurrencies()),
));
}
}
diff --git a/src/Sylius/Behat/Context/Ui/Shop/LocaleContext.php b/src/Sylius/Behat/Context/Ui/Shop/LocaleContext.php
index 852ed22c35c..a3ef63c9059 100644
--- a/src/Sylius/Behat/Context/Ui/Shop/LocaleContext.php
+++ b/src/Sylius/Behat/Context/Ui/Shop/LocaleContext.php
@@ -75,7 +75,7 @@ public function iShouldNotBeAbleToShopUsingTheLocale($locale)
throw new \InvalidArgumentException(sprintf(
'Expected "%s" not to be in "%s"',
$locale,
- implode('", "', $this->homePage->getAvailableLocales())
+ implode('", "', $this->homePage->getAvailableLocales()),
));
}
}
diff --git a/src/Sylius/Behat/Context/Ui/Shop/LoginContext.php b/src/Sylius/Behat/Context/Ui/Shop/LoginContext.php
index 73c897ee395..e9314dfae16 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;
@@ -57,7 +56,7 @@ public function __construct(
WellKnownPasswordChangePageInterface $wellKnownPasswordChangePage,
RegisterElementInterface $registerElement,
NotificationCheckerInterface $notificationChecker,
- CurrentPageResolverInterface $currentPageResolver
+ CurrentPageResolverInterface $currentPageResolver,
) {
$this->homePage = $homePage;
$this->loginPage = $loginPage;
@@ -242,7 +241,7 @@ public function iShouldBeNotifiedThatEmailWithResetInstructionWasSent(): void
{
$this->notificationChecker->checkNotification(
'If the email you have specified exists in our system, we have sent there an instruction on how to reset your password.',
- NotificationType::success()
+ NotificationType::success(),
);
}
@@ -283,7 +282,7 @@ public function iShouldBeNotifiedThatTheEnteredPasswordsDoNotMatch()
{
Assert::true($this->resetPasswordPage->checkValidationMessageFor(
'password',
- 'The entered passwords don\'t match'
+ 'The entered passwords don\'t match',
));
}
@@ -294,7 +293,7 @@ public function iShouldBeNotifiedThatThePasswordShouldBeAtLeastCharactersLong()
{
Assert::true($this->resetPasswordPage->checkValidationMessageFor(
'password',
- 'Password must be at least 4 characters long.'
+ 'Password must be at least 4 characters long.',
));
}
diff --git a/src/Sylius/Behat/Context/Ui/Shop/ProductContext.php b/src/Sylius/Behat/Context/Ui/Shop/ProductContext.php
index f32023d57a1..f2f9dd59489 100644
--- a/src/Sylius/Behat/Context/Ui/Shop/ProductContext.php
+++ b/src/Sylius/Behat/Context/Ui/Shop/ProductContext.php
@@ -42,7 +42,7 @@ public function __construct(
IndexPageInterface $indexPage,
ProductReviewIndexPageInterface $productReviewsIndexPage,
ErrorPageInterface $errorPage,
- VerticalMenuElementInterface $verticalMenuElement
+ VerticalMenuElementInterface $verticalMenuElement,
) {
$this->showPage = $showPage;
$this->indexPage = $indexPage;
@@ -113,7 +113,7 @@ public function iShouldNotBeAbleToViewThisProductInLocale(ProductInterface $prod
$this->showPage->isOpen([
'slug' => $product->getTranslation($localeCode)->getSlug(),
'_locale' => $localeCode,
- ])
+ ]),
);
}
@@ -173,7 +173,7 @@ public function iShouldSeeTheProductAttributeWithDate($attributeName, $expectedA
{
Assert::eq(
new \DateTime($this->showPage->getAttributeByName($attributeName)),
- new \DateTime($expectedAttribute)
+ new \DateTime($expectedAttribute),
);
}
@@ -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() . '/']);
}
/**
@@ -493,7 +493,7 @@ public function iShouldSeeReviewsTitled(...$reviews): void
foreach ($reviews as $review) {
Assert::true(
$this->showPage->hasReviewTitled($review),
- sprintf('Product should have review titled "%s" but it does not.', $review)
+ sprintf('Product should have review titled "%s" but it does not.', $review),
);
}
}
@@ -553,7 +553,7 @@ public function iShouldSeeTheProductAssociationWithProducts(string $productAssoc
{
Assert::true(
$this->showPage->hasAssociation($productAssociationName),
- sprintf('There should be an association named "%s" but it does not.', $productAssociationName)
+ sprintf('There should be an association named "%s" but it does not.', $productAssociationName),
);
foreach ($products as $product) {
@@ -624,7 +624,7 @@ public function iShouldNotBeAbleToSelectTheOptionValue(string $optionValue, stri
public function iShouldBeAbleToSelectTheAndColorOptionValues(
string $optionValue1,
string $optionValue2,
- string $optionName
+ string $optionName,
) {
Assert::true(in_array($optionValue1, $this->showPage->getOptionValues($optionName), true));
Assert::true(in_array($optionValue2, $this->showPage->getOptionValues($optionName), true));
@@ -688,8 +688,8 @@ private function assertProductIsInAssociation($productName, $productAssociationN
sprintf(
'There should be an associated product "%s" under association "%s" but it does not.',
$productName,
- $productAssociationName
- )
+ $productAssociationName,
+ ),
);
}
diff --git a/src/Sylius/Behat/Context/Ui/Shop/ProductReviewContext.php b/src/Sylius/Behat/Context/Ui/Shop/ProductReviewContext.php
index de2af246cd5..410d0d4eaab 100644
--- a/src/Sylius/Behat/Context/Ui/Shop/ProductReviewContext.php
+++ b/src/Sylius/Behat/Context/Ui/Shop/ProductReviewContext.php
@@ -28,7 +28,7 @@ final class ProductReviewContext implements Context
public function __construct(
CreatePageInterface $createPage,
- NotificationCheckerInterface $notificationChecker
+ NotificationCheckerInterface $notificationChecker,
) {
$this->createPage = $createPage;
$this->notificationChecker = $notificationChecker;
@@ -98,7 +98,7 @@ public function iShouldBeNotifiedThatMyReviewIsWaitingForTheAcceptation(): void
{
$this->notificationChecker->checkNotification(
'Your review is waiting for the acceptation.',
- NotificationType::success()
+ NotificationType::success(),
);
}
@@ -157,7 +157,7 @@ public function iShouldBeNotifiedThatThisEmailIsAlreadyRegistered(): void
{
Assert::same(
$this->createPage->getAuthorValidationMessage(),
- 'This email is already registered, please login or use forgotten password.'
+ 'This email is already registered, please login or use forgotten password.',
);
}
diff --git a/src/Sylius/Behat/Context/Ui/Shop/RegistrationContext.php b/src/Sylius/Behat/Context/Ui/Shop/RegistrationContext.php
index d732ad5c56a..d7ca95f43bf 100644
--- a/src/Sylius/Behat/Context/Ui/Shop/RegistrationContext.php
+++ b/src/Sylius/Behat/Context/Ui/Shop/RegistrationContext.php
@@ -57,7 +57,7 @@ public function __construct(
VerificationPageInterface $verificationPage,
ProfileUpdatePageInterface $profileUpdatePage,
RegisterElementInterface $registerElement,
- NotificationCheckerInterface $notificationChecker
+ NotificationCheckerInterface $notificationChecker,
) {
$this->sharedStorage = $sharedStorage;
$this->dashboardPage = $dashboardPage;
@@ -191,7 +191,7 @@ public function iShouldBeNotifiedThatNewAccountHasBeenSuccessfullyCreated(): voi
{
$this->notificationChecker->checkNotification(
'Thank you for registering, check your email to verify your account.',
- NotificationType::success()
+ NotificationType::success(),
);
}
@@ -353,7 +353,7 @@ public function iShouldBeNotifiedThatTheVerificationEmailHasBeenSent(): void
{
$this->notificationChecker->checkNotification(
'An email with the verification link has been sent to your email address.',
- NotificationType::success()
+ NotificationType::success(),
);
}
diff --git a/src/Sylius/Behat/Context/Ui/ThemeContext.php b/src/Sylius/Behat/Context/Ui/ThemeContext.php
index dbc122b7ac3..0cd3f2432aa 100644
--- a/src/Sylius/Behat/Context/Ui/ThemeContext.php
+++ b/src/Sylius/Behat/Context/Ui/ThemeContext.php
@@ -36,7 +36,7 @@ public function __construct(
SharedStorageInterface $sharedStorage,
IndexPageInterface $channelIndexPage,
UpdatePageInterface $channelUpdatePage,
- HomePageInterface $homePage
+ HomePageInterface $homePage,
) {
$this->sharedStorage = $sharedStorage;
$this->channelIndexPage = $channelIndexPage;
diff --git a/src/Sylius/Behat/Context/Ui/UserContext.php b/src/Sylius/Behat/Context/Ui/UserContext.php
index 5a542789eea..e4a611f9c40 100644
--- a/src/Sylius/Behat/Context/Ui/UserContext.php
+++ b/src/Sylius/Behat/Context/Ui/UserContext.php
@@ -35,7 +35,7 @@ public function __construct(
SharedStorageInterface $sharedStorage,
UserRepositoryInterface $userRepository,
ShowPageInterface $customerShowPage,
- HomePageInterface $homePage
+ HomePageInterface $homePage,
) {
$this->sharedStorage = $sharedStorage;
$this->userRepository = $userRepository;
diff --git a/src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php b/src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php
index 941482f4332..efd513fb18a 100644
--- a/src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php
+++ b/src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php
@@ -44,7 +44,7 @@ private function getAssociatedProducts(NodeElement $associations, string $name):
{
return $associations->findAll(
'css',
- sprintf("div:contains('%s') ul li", $name)
+ sprintf("div:contains('%s') ul li", $name),
);
}
}
diff --git a/src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php b/src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php
index 95193b4bf23..1bd07496720 100644
--- a/src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php
+++ b/src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php
@@ -30,7 +30,7 @@ public function hasProductVariantWithCodePriceAndCurrentStock(
string $name,
string $code,
string $price,
- string $currentStock
+ string $currentStock,
): bool {
/** @var NodeElement $variantRow */
$variantRows = $this->getDocument()->findAll('css', '#variants .variants-accordion__title');
@@ -52,14 +52,14 @@ private function hasProductWithGivenNameCodePriceAndCurrentStock(
string $name,
string $code,
string $price,
- string $currentStock
+ string $currentStock,
): bool {
$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/Exception/NotificationExpectationMismatchException.php b/src/Sylius/Behat/Exception/NotificationExpectationMismatchException.php
index a325632718b..eb24ec67f4f 100644
--- a/src/Sylius/Behat/Exception/NotificationExpectationMismatchException.php
+++ b/src/Sylius/Behat/Exception/NotificationExpectationMismatchException.php
@@ -21,12 +21,12 @@ public function __construct(
NotificationType $expectedType,
$expectedMessage,
$code = 0,
- \Exception $previous = null
+ \Exception $previous = null,
) {
$message = sprintf(
'Expected *%s* notification with a "%s" message was not found',
$expectedType,
- $expectedMessage
+ $expectedMessage,
);
parent::__construct($message, $code, $previous);
diff --git a/src/Sylius/Behat/Page/Admin/Crud/IndexPage.php b/src/Sylius/Behat/Page/Admin/Crud/IndexPage.php
index 2da7c8aad94..849486f4369 100644
--- a/src/Sylius/Behat/Page/Admin/Crud/IndexPage.php
+++ b/src/Sylius/Behat/Page/Admin/Crud/IndexPage.php
@@ -32,7 +32,7 @@ public function __construct(
$minkParameters,
RouterInterface $router,
TableAccessorInterface $tableAccessor,
- string $routeName
+ string $routeName,
) {
parent::__construct($session, $minkParameters, $router);
diff --git a/src/Sylius/Behat/Page/Admin/Customer/ShowPage.php b/src/Sylius/Behat/Page/Admin/Customer/ShowPage.php
index 19e1cdafd3c..cdcf329d690 100644
--- a/src/Sylius/Behat/Page/Admin/Customer/ShowPage.php
+++ b/src/Sylius/Behat/Page/Admin/Customer/ShowPage.php
@@ -197,8 +197,8 @@ private function getStatisticsForChannel(string $channelName): NodeElement
sprintf(
'Expected a single statistic for channel "%s", but %d were found.',
$channelName,
- $actualStatisticsCount
- )
+ $actualStatisticsCount,
+ ),
);
$statisticsContents = $this->getElement('statistics')->findAll('css', '.row');
diff --git a/src/Sylius/Behat/Page/Admin/DashboardPage.php b/src/Sylius/Behat/Page/Admin/DashboardPage.php
index e6b961e776f..d91ab30df45 100644
--- a/src/Sylius/Behat/Page/Admin/DashboardPage.php
+++ b/src/Sylius/Behat/Page/Admin/DashboardPage.php
@@ -26,7 +26,7 @@ public function __construct(
Session $session,
$minkParameters,
RouterInterface $router,
- TableAccessorInterface $tableAccessor
+ TableAccessorInterface $tableAccessor,
) {
parent::__construct($session, $minkParameters, $router);
diff --git a/src/Sylius/Behat/Page/Admin/Order/ShowPage.php b/src/Sylius/Behat/Page/Admin/Order/ShowPage.php
index c50907e95ec..d7102f484cd 100644
--- a/src/Sylius/Behat/Page/Admin/Order/ShowPage.php
+++ b/src/Sylius/Behat/Page/Admin/Order/ShowPage.php
@@ -33,7 +33,7 @@ public function __construct(
$minkParameters,
RouterInterface $router,
TableAccessorInterface $tableAccessor,
- MoneyFormatterInterface $moneyFormatter
+ MoneyFormatterInterface $moneyFormatter,
) {
parent::__construct($session, $minkParameters, $router);
@@ -128,7 +128,7 @@ public function isProductInTheList(string $productName): bool
$table = $this->getElement('table');
$rows = $this->tableAccessor->getRowsWithFields(
$table,
- ['item' => $productName]
+ ['item' => $productName],
);
foreach ($rows as $row) {
@@ -450,7 +450,7 @@ protected function getItemProperty(string $itemName, string $property): string
{
$rows = $this->tableAccessor->getRowsWithFields(
$this->getElement('table'),
- ['item' => $itemName]
+ ['item' => $itemName],
);
return $rows[0]->find('css', '.' . $property)->getText();
diff --git a/src/Sylius/Behat/Page/Admin/PaymentMethod/CreatePage.php b/src/Sylius/Behat/Page/Admin/PaymentMethod/CreatePage.php
index 4beca8901e4..f8af397a894 100644
--- a/src/Sylius/Behat/Page/Admin/PaymentMethod/CreatePage.php
+++ b/src/Sylius/Behat/Page/Admin/PaymentMethod/CreatePage.php
@@ -29,7 +29,7 @@ public function nameIt(string $name, string $languageCode): void
{
$this->getDocument()->fillField(
sprintf('sylius_payment_method_translations_%s_name', $languageCode),
- $name
+ $name,
);
}
@@ -42,7 +42,7 @@ public function describeIt(string $description, string $languageCode): void
{
$this->getDocument()->fillField(
sprintf('sylius_payment_method_translations_%s_description', $languageCode),
- $description
+ $description,
);
}
@@ -50,7 +50,7 @@ public function setInstructions(string $instructions, string $languageCode): voi
{
$this->getDocument()->fillField(
sprintf('sylius_payment_method_translations_%s_instructions', $languageCode),
- $instructions
+ $instructions,
);
}
diff --git a/src/Sylius/Behat/Page/Admin/Product/CreateConfigurableProductPage.php b/src/Sylius/Behat/Page/Admin/Product/CreateConfigurableProductPage.php
index 59d83c9a5c4..f207030afb8 100644
--- a/src/Sylius/Behat/Page/Admin/Product/CreateConfigurableProductPage.php
+++ b/src/Sylius/Behat/Page/Admin/Product/CreateConfigurableProductPage.php
@@ -33,7 +33,7 @@ public function nameItIn(string $name, string $localeCode): void
$this->getDocument()->fillField(
sprintf('sylius_product_translations_%s_name', $localeCode),
- $name
+ $name,
);
if ($this->getDriver() instanceof Selenium2Driver || $this->getDriver() instanceof ChromeDriver) {
diff --git a/src/Sylius/Behat/Page/Admin/Product/CreateSimpleProductPage.php b/src/Sylius/Behat/Page/Admin/Product/CreateSimpleProductPage.php
index 48035823196..5ee4a5e9970 100644
--- a/src/Sylius/Behat/Page/Admin/Product/CreateSimpleProductPage.php
+++ b/src/Sylius/Behat/Page/Admin/Product/CreateSimpleProductPage.php
@@ -43,7 +43,7 @@ public function nameItIn(string $name, string $localeCode): void
if ($this->getDriver() instanceof Selenium2Driver || $this->getDriver() instanceof ChromeDriver) {
SlugGenerationHelper::waitForSlugGeneration(
$this->getSession(),
- $this->getElement('slug', ['%locale%' => $localeCode])
+ $this->getElement('slug', ['%locale%' => $localeCode]),
);
}
}
diff --git a/src/Sylius/Behat/Page/Admin/Product/IndexPage.php b/src/Sylius/Behat/Page/Admin/Product/IndexPage.php
index 5db071f0bba..e83a92c8602 100644
--- a/src/Sylius/Behat/Page/Admin/Product/IndexPage.php
+++ b/src/Sylius/Behat/Page/Admin/Product/IndexPage.php
@@ -29,7 +29,7 @@ public function __construct(
RouterInterface $router,
TableAccessorInterface $tableAccessor,
string $routeName,
- ImageExistenceCheckerInterface $imageExistenceChecker
+ ImageExistenceCheckerInterface $imageExistenceChecker,
) {
parent::__construct($session, $minkParameters, $router, $tableAccessor, $routeName);
diff --git a/src/Sylius/Behat/Page/Admin/Product/UpdateConfigurableProductPage.php b/src/Sylius/Behat/Page/Admin/Product/UpdateConfigurableProductPage.php
index 67109b426ab..8e51df94f41 100644
--- a/src/Sylius/Behat/Page/Admin/Product/UpdateConfigurableProductPage.php
+++ b/src/Sylius/Behat/Page/Admin/Product/UpdateConfigurableProductPage.php
@@ -29,7 +29,7 @@ public function nameItIn(string $name, string $localeCode): void
{
$this->getDocument()->fillField(
sprintf('sylius_product_translations_%s_name', $localeCode),
- $name
+ $name,
);
}
@@ -132,7 +132,7 @@ public function removeFirstImage(): void
if (null !== $imageTypeElement && null !== $imageSourceElement) {
$this->saveImageUrlForType(
$imageTypeElement->getValue(),
- $imageSourceElement->getAttribute('src')
+ $imageSourceElement->getAttribute('src'),
);
}
diff --git a/src/Sylius/Behat/Page/Admin/Product/UpdateSimpleProductPage.php b/src/Sylius/Behat/Page/Admin/Product/UpdateSimpleProductPage.php
index 93f1ed0b8cb..d1a18c40efe 100644
--- a/src/Sylius/Behat/Page/Admin/Product/UpdateSimpleProductPage.php
+++ b/src/Sylius/Behat/Page/Admin/Product/UpdateSimpleProductPage.php
@@ -40,7 +40,7 @@ public function nameItIn(string $name, string $localeCode): void
if ($this->getDriver() instanceof Selenium2Driver || $this->getDriver() instanceof ChromeDriver) {
SlugGenerationHelper::waitForSlugGeneration(
$this->getSession(),
- $this->getElement('slug', ['%locale%' => $localeCode])
+ $this->getElement('slug', ['%locale%' => $localeCode]),
);
}
}
@@ -152,7 +152,7 @@ public function enableSlugModification(string $locale): void
{
SlugGenerationHelper::enableSlugModification(
$this->getSession(),
- $this->getElement('toggle_slug_modification_button', ['%locale%' => $locale])
+ $this->getElement('toggle_slug_modification_button', ['%locale%' => $locale]),
);
}
@@ -219,7 +219,7 @@ public function removeFirstImage(): void
if (null !== $imageTypeElement && null !== $imageSourceElement) {
$this->saveImageUrlForType(
$imageTypeElement->getValue(),
- $imageSourceElement->getAttribute('src')
+ $imageSourceElement->getAttribute('src'),
);
}
$imageElement->clickLink('Delete');
@@ -244,7 +244,7 @@ public function isSlugReadonlyIn(string $locale): bool
{
return SlugGenerationHelper::isSlugReadonly(
$this->getSession(),
- $this->getElement('slug', ['%locale%' => $locale])
+ $this->getElement('slug', ['%locale%' => $locale]),
);
}
diff --git a/src/Sylius/Behat/Page/Admin/ProductAssociationType/CreatePage.php b/src/Sylius/Behat/Page/Admin/ProductAssociationType/CreatePage.php
index d4358d8e1df..578b2989079 100644
--- a/src/Sylius/Behat/Page/Admin/ProductAssociationType/CreatePage.php
+++ b/src/Sylius/Behat/Page/Admin/ProductAssociationType/CreatePage.php
@@ -25,7 +25,7 @@ public function nameItIn(string $name, string $language): void
{
$this->getDocument()->fillField(
sprintf('sylius_product_association_type_translations_%s_name', $language),
- $name
+ $name,
);
}
diff --git a/src/Sylius/Behat/Page/Admin/ProductAssociationType/UpdatePage.php b/src/Sylius/Behat/Page/Admin/ProductAssociationType/UpdatePage.php
index 74fefd15c41..86e5d7157ee 100644
--- a/src/Sylius/Behat/Page/Admin/ProductAssociationType/UpdatePage.php
+++ b/src/Sylius/Behat/Page/Admin/ProductAssociationType/UpdatePage.php
@@ -25,7 +25,7 @@ public function nameItIn(string $name, string $language): void
{
$this->getDocument()->fillField(
sprintf('sylius_product_association_type_translations_%s_name', $language),
- $name
+ $name,
);
}
diff --git a/src/Sylius/Behat/Page/Admin/ProductOption/CreatePage.php b/src/Sylius/Behat/Page/Admin/ProductOption/CreatePage.php
index eeda9541b89..31bcbcc2c43 100644
--- a/src/Sylius/Behat/Page/Admin/ProductOption/CreatePage.php
+++ b/src/Sylius/Behat/Page/Admin/ProductOption/CreatePage.php
@@ -27,7 +27,7 @@ public function nameItIn(string $name, string $language): void
{
$this->getDocument()->fillField(
sprintf('sylius_product_option_translations_%s_name', $language),
- $name
+ $name,
);
}
diff --git a/src/Sylius/Behat/Page/Admin/ProductOption/UpdatePage.php b/src/Sylius/Behat/Page/Admin/ProductOption/UpdatePage.php
index 3bb7cefab9c..f56e6df52f4 100644
--- a/src/Sylius/Behat/Page/Admin/ProductOption/UpdatePage.php
+++ b/src/Sylius/Behat/Page/Admin/ProductOption/UpdatePage.php
@@ -26,7 +26,7 @@ public function nameItIn(string $name, string $language): void
{
$this->getDocument()->fillField(
sprintf('sylius_product_option_translations_%s_name', $language),
- $name
+ $name,
);
}
diff --git a/src/Sylius/Behat/Page/Admin/ProductVariant/CreatePage.php b/src/Sylius/Behat/Page/Admin/ProductVariant/CreatePage.php
index 9bbb2ca479a..6181037e37d 100644
--- a/src/Sylius/Behat/Page/Admin/ProductVariant/CreatePage.php
+++ b/src/Sylius/Behat/Page/Admin/ProductVariant/CreatePage.php
@@ -49,7 +49,7 @@ public function nameItIn(string $name, string $language): void
{
$this->getDocument()->fillField(
sprintf('sylius_product_variant_translations_%s_name', $language),
- $name
+ $name,
);
}
diff --git a/src/Sylius/Behat/Page/Admin/Promotion/UpdatePage.php b/src/Sylius/Behat/Page/Admin/Promotion/UpdatePage.php
index 473f046ac22..775c4d474b3 100644
--- a/src/Sylius/Behat/Page/Admin/Promotion/UpdatePage.php
+++ b/src/Sylius/Behat/Page/Admin/Promotion/UpdatePage.php
@@ -80,16 +80,16 @@ public function hasStartsAt(\DateTimeInterface $dateTime): bool
{
$timestamp = $dateTime->getTimestamp();
- return $this->getElement('starts_at_date')->getValue() === date('Y-m-d', $timestamp)
- && $this->getElement('starts_at_time')->getValue() === date('H:i', $timestamp);
+ return $this->getElement('starts_at_date')->getValue() === date('Y-m-d', $timestamp) &&
+ $this->getElement('starts_at_time')->getValue() === date('H:i', $timestamp);
}
public function hasEndsAt(\DateTimeInterface $dateTime): bool
{
$timestamp = $dateTime->getTimestamp();
- return $this->getElement('ends_at_date')->getValue() === date('Y-m-d', $timestamp)
- && $this->getElement('ends_at_time')->getValue() === date('H:i', $timestamp);
+ return $this->getElement('ends_at_date')->getValue() === date('Y-m-d', $timestamp) &&
+ $this->getElement('ends_at_time')->getValue() === date('H:i', $timestamp);
}
public function isCouponManagementAvailable(): bool
diff --git a/src/Sylius/Behat/Page/Admin/ShippingMethod/CreatePage.php b/src/Sylius/Behat/Page/Admin/ShippingMethod/CreatePage.php
index 0be2d0c6549..10cb38999fe 100644
--- a/src/Sylius/Behat/Page/Admin/ShippingMethod/CreatePage.php
+++ b/src/Sylius/Behat/Page/Admin/ShippingMethod/CreatePage.php
@@ -40,7 +40,7 @@ public function describeIt(string $description, string $languageCode): void
{
$this->getDocument()->fillField(
sprintf('sylius_shipping_method_translations_%s_description', $languageCode),
- $description
+ $description,
);
}
@@ -83,7 +83,7 @@ public function getValidationMessageForAmount(string $channelCode): string
$this->getSession(),
'Validation message',
'css',
- '.sylius-validation-error'
+ '.sylius-validation-error',
);
}
diff --git a/src/Sylius/Behat/Page/Admin/Taxon/CreatePage.php b/src/Sylius/Behat/Page/Admin/Taxon/CreatePage.php
index 2b8c0fed0cf..9340206fe30 100644
--- a/src/Sylius/Behat/Page/Admin/Taxon/CreatePage.php
+++ b/src/Sylius/Behat/Page/Admin/Taxon/CreatePage.php
@@ -82,7 +82,7 @@ public function nameIt(string $name, string $languageCode): void
if ($this->getDriver() instanceof Selenium2Driver || $this->getDriver() instanceof ChromeDriver) {
SlugGenerationHelper::waitForSlugGeneration(
$this->getSession(),
- $this->getElement('slug', ['%language%' => $languageCode])
+ $this->getElement('slug', ['%language%' => $languageCode]),
);
}
}
diff --git a/src/Sylius/Behat/Page/Admin/Taxon/UpdatePage.php b/src/Sylius/Behat/Page/Admin/Taxon/UpdatePage.php
index c694818bba3..05752b7e7de 100644
--- a/src/Sylius/Behat/Page/Admin/Taxon/UpdatePage.php
+++ b/src/Sylius/Behat/Page/Admin/Taxon/UpdatePage.php
@@ -48,7 +48,7 @@ public function nameIt(string $name, string $languageCode): void
if ($this->getDriver() instanceof Selenium2Driver || $this->getDriver() instanceof ChromeDriver) {
SlugGenerationHelper::waitForSlugGeneration(
$this->getSession(),
- $this->getElement('slug', ['%language%' => $languageCode])
+ $this->getElement('slug', ['%language%' => $languageCode]),
);
}
}
@@ -92,7 +92,7 @@ public function isSlugReadonly(string $languageCode = 'en_US'): bool
{
return SlugGenerationHelper::isSlugReadonly(
$this->getSession(),
- $this->getElement('slug', ['%language%' => $languageCode])
+ $this->getElement('slug', ['%language%' => $languageCode]),
);
}
@@ -116,7 +116,7 @@ public function removeFirstImage(): void
if (null !== $imageTypeElement && null !== $imageSourceElement) {
$this->saveImageUrlForType(
$imageTypeElement->getValue(),
- $imageSourceElement->getAttribute('src')
+ $imageSourceElement->getAttribute('src'),
);
}
@@ -127,7 +127,7 @@ public function enableSlugModification(string $languageCode = 'en_US'): void
{
SlugGenerationHelper::enableSlugModification(
$this->getSession(),
- $this->getElement('toggle_taxon_slug_modification_button', ['%locale%' => $languageCode])
+ $this->getElement('toggle_taxon_slug_modification_button', ['%locale%' => $languageCode]),
);
}
diff --git a/src/Sylius/Behat/Page/ErrorPageInterface.php b/src/Sylius/Behat/Page/ErrorPageInterface.php
index e36123e2885..0d650ab483d 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/Account/Order/IndexPage.php b/src/Sylius/Behat/Page/Shop/Account/Order/IndexPage.php
index f1ffe524c2e..ceeb5b610a6 100644
--- a/src/Sylius/Behat/Page/Shop/Account/Order/IndexPage.php
+++ b/src/Sylius/Behat/Page/Shop/Account/Order/IndexPage.php
@@ -27,7 +27,7 @@ public function __construct(
Session $session,
$minkParameters,
RouterInterface $router,
- TableAccessorInterface $tableAccessor
+ TableAccessorInterface $tableAccessor,
) {
parent::__construct($session, $minkParameters, $router);
@@ -48,7 +48,7 @@ public function changePaymentMethod(OrderInterface $order): void
{
$row = $this->tableAccessor->getRowWithFields(
$this->getElement('customer_orders'),
- ['number' => $order->getNumber()]
+ ['number' => $order->getNumber()],
);
$link = $row->find('css', '[data-test-button="sylius.ui.pay"]');
@@ -60,7 +60,7 @@ public function isOrderWithNumberInTheList($number): bool
try {
$rows = $this->tableAccessor->getRowsWithFields(
$this->getElement('customer_orders'),
- ['number' => $number]
+ ['number' => $number],
);
return 1 === count($rows);
diff --git a/src/Sylius/Behat/Page/Shop/Account/Order/ShowPage.php b/src/Sylius/Behat/Page/Shop/Account/Order/ShowPage.php
index 6ec917f9db3..1b32ebf3de5 100644
--- a/src/Sylius/Behat/Page/Shop/Account/Order/ShowPage.php
+++ b/src/Sylius/Behat/Page/Shop/Account/Order/ShowPage.php
@@ -27,7 +27,7 @@ public function __construct(
Session $session,
$minkParameters,
RouterInterface $router,
- TableAccessorInterface $tableAccessor
+ TableAccessorInterface $tableAccessor,
) {
parent::__construct($session, $minkParameters, $router);
@@ -52,7 +52,7 @@ public function hasShippingAddress(
string $street,
string $postcode,
string $city,
- string $countryName
+ string $countryName,
): bool {
$shippingAddressText = $this->getElement('shipping_address')->getText();
@@ -64,7 +64,7 @@ public function hasBillingAddress(
string $street,
string $postcode,
string $city,
- string $countryName
+ string $countryName,
): bool {
$billingAddressText = $this->getElement('billing_address')->getText();
@@ -190,7 +190,7 @@ private function hasAddress(
string $street,
string $postcode,
string $city,
- string $countryName
+ string $countryName,
): bool {
return
(stripos($elementText, $customerName) !== false) &&
diff --git a/src/Sylius/Behat/Page/Shop/Account/Order/ShowPageInterface.php b/src/Sylius/Behat/Page/Shop/Account/Order/ShowPageInterface.php
index ed8746c9e69..32fdcd88bbc 100644
--- a/src/Sylius/Behat/Page/Shop/Account/Order/ShowPageInterface.php
+++ b/src/Sylius/Behat/Page/Shop/Account/Order/ShowPageInterface.php
@@ -25,7 +25,7 @@ public function hasShippingAddress(
string $street,
string $postcode,
string $city,
- string $countryName
+ string $countryName,
): bool;
public function hasBillingAddress(
@@ -33,7 +33,7 @@ public function hasBillingAddress(
string $street,
string $postcode,
string $city,
- string $countryName
+ string $countryName,
): bool;
public function choosePaymentMethod(PaymentMethodInterface $paymentMethod): void;
diff --git a/src/Sylius/Behat/Page/Shop/Cart/SummaryPageInterface.php b/src/Sylius/Behat/Page/Shop/Cart/SummaryPageInterface.php
index 0d69569691c..aed7509d1f9 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/Page/Shop/Checkout/AddressPage.php b/src/Sylius/Behat/Page/Shop/Checkout/AddressPage.php
index fc40bf6c3cb..b6d3a5542bb 100644
--- a/src/Sylius/Behat/Page/Shop/Checkout/AddressPage.php
+++ b/src/Sylius/Behat/Page/Shop/Checkout/AddressPage.php
@@ -38,7 +38,7 @@ public function __construct(
Session $session,
$minkParameters,
RouterInterface $router,
- AddressFactoryInterface $addressFactory
+ AddressFactoryInterface $addressFactory,
) {
parent::__construct($session, $minkParameters, $router);
@@ -62,7 +62,7 @@ public function chooseDifferentShippingAddress(): void
$billingAddressSwitch = $this->getElement('different_shipping_address');
Assert::false(
$billingAddressSwitch->isChecked(),
- 'Previous state of different billing address switch was true expected to be false'
+ 'Previous state of different billing address switch was true expected to be false',
);
$billingAddressSwitch->check();
@@ -326,7 +326,7 @@ private function getOptionsFromSelect(NodeElement $element): array
return array_map(
/** @return string[] */
static function (NodeElement $element): string { return $element->getText(); },
- $element->findAll('css', 'option[value!=""]')
+ $element->findAll('css', 'option[value!=""]'),
);
}
diff --git a/src/Sylius/Behat/Page/Shop/Checkout/CompletePage.php b/src/Sylius/Behat/Page/Shop/Checkout/CompletePage.php
index c179b669625..2eb54d5d278 100644
--- a/src/Sylius/Behat/Page/Shop/Checkout/CompletePage.php
+++ b/src/Sylius/Behat/Page/Shop/Checkout/CompletePage.php
@@ -33,7 +33,7 @@ public function __construct(
Session $session,
$minkParameters,
RouterInterface $router,
- TableAccessorInterface $tableAccessor
+ TableAccessorInterface $tableAccessor,
) {
parent::__construct($session, $minkParameters, $router);
diff --git a/src/Sylius/Behat/Page/Shop/Contact/ContactPage.php b/src/Sylius/Behat/Page/Shop/Contact/ContactPage.php
index 6b8e9ea413c..0f9a2050489 100644
--- a/src/Sylius/Behat/Page/Shop/Contact/ContactPage.php
+++ b/src/Sylius/Behat/Page/Shop/Contact/ContactPage.php
@@ -50,7 +50,7 @@ public function getValidationMessageFor(string $element): string
$this->getSession(),
'Validation message',
'css',
- '[data-test-validation-error]'
+ '[data-test-validation-error]',
)
;
}
diff --git a/src/Sylius/Behat/Page/Shop/HomePage.php b/src/Sylius/Behat/Page/Shop/HomePage.php
index 8d5ecbca5eb..15aa99d1916 100644
--- a/src/Sylius/Behat/Page/Shop/HomePage.php
+++ b/src/Sylius/Behat/Page/Shop/HomePage.php
@@ -59,7 +59,7 @@ public function getAvailableCurrencies(): array
function (NodeElement $element) {
return $element->getText();
},
- $this->getElement('currency_selector')->findAll('css', '[data-test-available-currency]')
+ $this->getElement('currency_selector')->findAll('css', '[data-test-available-currency]'),
);
}
@@ -84,7 +84,7 @@ public function getAvailableLocales(): array
function (NodeElement $element) {
return $element->getText();
},
- $this->getElement('locale_selector')->findAll('css', '[data-test-available-locale]')
+ $this->getElement('locale_selector')->findAll('css', '[data-test-available-locale]'),
);
}
@@ -99,7 +99,7 @@ public function getLatestProductsNames(): array
function (NodeElement $element) {
return $element->getText();
},
- $this->getElement('latest_products')->findAll('css', '[data-test-product-name]')
+ $this->getElement('latest_products')->findAll('css', '[data-test-product-name]'),
);
}
diff --git a/src/Sylius/Behat/Page/Shop/Product/ShowPage.php b/src/Sylius/Behat/Page/Shop/Product/ShowPage.php
index d18693a3bd0..e48a370d672 100644
--- a/src/Sylius/Behat/Page/Shop/Product/ShowPage.php
+++ b/src/Sylius/Behat/Page/Shop/Product/ShowPage.php
@@ -291,7 +291,7 @@ public function getOptionValues(string $optionCode): array
function (NodeElement $element) {
return $element->getText();
},
- $optionElement->findAll('css', 'option')
+ $optionElement->findAll('css', 'option'),
);
}
diff --git a/src/Sylius/Behat/Service/ApiSecurityService.php b/src/Sylius/Behat/Service/ApiSecurityService.php
index 6dab002c8bc..626754a8bcb 100644
--- a/src/Sylius/Behat/Service/ApiSecurityService.php
+++ b/src/Sylius/Behat/Service/ApiSecurityService.php
@@ -42,7 +42,7 @@ public function logIn(UserInterface $user): void
[],
[],
['CONTENT_TYPE' => 'application/json', 'HTTP_ACCEPT' => 'application/json'],
- json_encode(['email' => $user->getEmail(), 'password' => 'sylius'])
+ json_encode(['email' => $user->getEmail(), 'password' => 'sylius']),
);
$response = $this->client->getResponse();
@@ -51,7 +51,7 @@ public function logIn(UserInterface $user): void
Assert::keyExists(
$content,
'token',
- SprintfResponseEscaper::provideMessageWithEscapedResponseContent('Token not found.', $response)
+ SprintfResponseEscaper::provideMessageWithEscapedResponseContent('Token not found.', $response),
);
$token = $content['token'];
diff --git a/src/Sylius/Behat/Service/AutocompleteHelper.php b/src/Sylius/Behat/Service/AutocompleteHelper.php
index bdc3b93dab2..3760e869def 100644
--- a/src/Sylius/Behat/Service/AutocompleteHelper.php
+++ b/src/Sylius/Behat/Service/AutocompleteHelper.php
@@ -60,7 +60,7 @@ private static function waitForElementToBeVisible(Session $session, NodeElement
{
$session->wait(5000, sprintf(
'$(document.evaluate("%s", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue).dropdown("is visible")',
- str_replace('"', '\"', $element->getXpath())
+ str_replace('"', '\"', $element->getXpath()),
));
}
}
diff --git a/src/Sylius/Behat/Service/Helper/JavaScriptTestHelper.php b/src/Sylius/Behat/Service/Helper/JavaScriptTestHelper.php
index cdf7c142181..e1353de258d 100644
--- a/src/Sylius/Behat/Service/Helper/JavaScriptTestHelper.php
+++ b/src/Sylius/Behat/Service/Helper/JavaScriptTestHelper.php
@@ -40,7 +40,7 @@ public function waitUntilNotificationPopups(
NotificationCheckerInterface $notificationChecker,
NotificationType $type,
string $message,
- ?int $timeout = null
+ ?int $timeout = null,
): void {
$callable = function () use ($notificationChecker, $message, $type): void {
$notificationChecker->checkNotification($message, $type);
diff --git a/src/Sylius/Behat/Service/SessionManager.php b/src/Sylius/Behat/Service/SessionManager.php
index 7bd1f57fc84..ab88f13744a 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/Behat/Service/Setter/CookieSetter.php b/src/Sylius/Behat/Service/Setter/CookieSetter.php
index ef221b11273..40fd2678c69 100644
--- a/src/Sylius/Behat/Service/Setter/CookieSetter.php
+++ b/src/Sylius/Behat/Service/Setter/CookieSetter.php
@@ -32,7 +32,7 @@ public function __construct(Session $minkSession, $minkParameters)
throw new \InvalidArgumentException(sprintf(
'"$minkParameters" passed to "%s" has to be an array or implement "%s".',
self::class,
- \ArrayAccess::class
+ \ArrayAccess::class,
));
}
@@ -54,7 +54,7 @@ public function setCookie($name, $value)
if ($driver instanceof SymfonyDriver) {
$driver->getClient()->getCookieJar()->set(
- new Cookie($name, $value, null, null, parse_url($this->minkParameters['base_url'], \PHP_URL_HOST))
+ new Cookie($name, $value, null, null, parse_url($this->minkParameters['base_url'], \PHP_URL_HOST)),
);
return;
diff --git a/src/Sylius/Behat/Service/SlugGenerationHelper.php b/src/Sylius/Behat/Service/SlugGenerationHelper.php
index 92829979fa0..65118416a23 100644
--- a/src/Sylius/Behat/Service/SlugGenerationHelper.php
+++ b/src/Sylius/Behat/Service/SlugGenerationHelper.php
@@ -57,7 +57,7 @@ private static function isElementReadonly(Session $session, NodeElement $element
{
return $session->wait(1000, sprintf(
'undefined != $(document.evaluate("%s", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue).attr("readonly")',
- str_replace('"', '\"', $element->getXpath())
+ str_replace('"', '\"', $element->getXpath()),
));
}
@@ -65,7 +65,7 @@ private static function isElementNotReadonly(Session $session, NodeElement $elem
{
return $session->wait(1000, sprintf(
'undefined == $(document.evaluate("%s", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue).attr("readonly")',
- str_replace('"', '\"', $element->getXpath())
+ str_replace('"', '\"', $element->getXpath()),
));
}
}
diff --git a/src/Sylius/Behat/Service/SprintfResponseEscaper.php b/src/Sylius/Behat/Service/SprintfResponseEscaper.php
index 3ab1e78bd9c..a78465f329b 100644
--- a/src/Sylius/Behat/Service/SprintfResponseEscaper.php
+++ b/src/Sylius/Behat/Service/SprintfResponseEscaper.php
@@ -25,8 +25,8 @@ public static function provideMessageWithEscapedResponseContent(string $message,
str_replace(
'%',
'%%',
- $response->getContent()
- )
+ $response->getContent(),
+ ),
);
}
}
diff --git a/src/Sylius/Behat/spec/Service/NotificationCheckerSpec.php b/src/Sylius/Behat/spec/Service/NotificationCheckerSpec.php
index b2e29bd654b..7c26138313d 100644
--- a/src/Sylius/Behat/spec/Service/NotificationCheckerSpec.php
+++ b/src/Sylius/Behat/spec/Service/NotificationCheckerSpec.php
@@ -41,7 +41,7 @@ function it_implements_notification_checker_interface()
function it_checks_if_successful_notification_with_specific_message_has_appeared(
NotificationAccessorInterface $notificationAccessor,
NodeElement $firstMessage,
- NodeElement $secondMessage
+ NodeElement $secondMessage,
) {
$notificationAccessor->getMessageElements()->willReturn([$firstMessage, $secondMessage]);
@@ -57,7 +57,7 @@ function it_checks_if_successful_notification_with_specific_message_has_appeared
function it_checks_if_failure_notification_with_specific_message_has_appeared(
NotificationAccessorInterface $notificationAccessor,
NodeElement $firstMessage,
- NodeElement $secondMessage
+ NodeElement $secondMessage,
) {
$notificationAccessor->getMessageElements()->willReturn([$firstMessage, $secondMessage]);
@@ -73,7 +73,7 @@ function it_checks_if_failure_notification_with_specific_message_has_appeared(
function it_throws_exception_if_no_message_with_given_content_and_type_has_been_found(
NotificationAccessorInterface $notificationAccessor,
NodeElement $firstMessage,
- NodeElement $secondMessage
+ NodeElement $secondMessage,
) {
$notificationAccessor->getMessageElements()->willReturn([$firstMessage, $secondMessage]);
diff --git a/src/Sylius/Behat/spec/Service/Resolver/CurrentPageResolverSpec.php b/src/Sylius/Behat/spec/Service/Resolver/CurrentPageResolverSpec.php
index 436233e0fe0..ea12e141c45 100644
--- a/src/Sylius/Behat/spec/Service/Resolver/CurrentPageResolverSpec.php
+++ b/src/Sylius/Behat/spec/Service/Resolver/CurrentPageResolverSpec.php
@@ -41,7 +41,7 @@ function it_returns_current_page_based_on_matched_route(
Session $session,
SymfonyPageInterface $createPage,
SymfonyPageInterface $updatePage,
- UrlMatcherInterface $urlMatcher
+ UrlMatcherInterface $urlMatcher,
) {
$session->getCurrentUrl()->willReturn('https://sylius.com/resource/new');
$urlMatcher->match('/resource/new')->willReturn(['_route' => 'sylius_resource_create']);
@@ -56,7 +56,7 @@ function it_throws_an_exception_if_neither_create_nor_update_key_word_has_been_f
Session $session,
SymfonyPageInterface $createPage,
SymfonyPageInterface $updatePage,
- UrlMatcherInterface $urlMatcher
+ UrlMatcherInterface $urlMatcher,
) {
$session->getCurrentUrl()->willReturn('https://sylius.com/resource/show');
$urlMatcher->match('/resource/show')->willReturn(['_route' => 'sylius_resource_show']);
diff --git a/src/Sylius/Behat/spec/Service/SecurityServiceSpec.php b/src/Sylius/Behat/spec/Service/SecurityServiceSpec.php
index e6ef72869c1..c691ef2ca08 100644
--- a/src/Sylius/Behat/spec/Service/SecurityServiceSpec.php
+++ b/src/Sylius/Behat/spec/Service/SecurityServiceSpec.php
@@ -26,7 +26,7 @@ final class SecurityServiceSpec extends ObjectBehavior
{
function let(
SessionInterface $session,
- CookieSetterInterface $cookieSetter
+ CookieSetterInterface $cookieSetter,
) {
$this->beConstructedWith($session, $cookieSetter, 'shop');
}
@@ -44,7 +44,7 @@ function it_implements_security_service_interface()
function it_logs_user_in(
SessionInterface $session,
CookieSetterInterface $cookieSetter,
- ShopUserInterface $shopUser
+ ShopUserInterface $shopUser,
) {
$shopUser->getRoles()->willReturn(['ROLE_USER']);
$shopUser->getPassword()->willReturn('xyz');
@@ -62,7 +62,7 @@ function it_logs_user_in(
function it_logs_user_out(
SessionInterface $session,
- CookieSetterInterface $cookieSetter
+ CookieSetterInterface $cookieSetter,
) {
$session->set('_security_shop', null)->shouldBeCalled();
$session->save()->shouldBeCalled();
@@ -74,7 +74,7 @@ function it_logs_user_out(
}
function it_throws_token_not_found_exception(
- SessionInterface $session
+ SessionInterface $session,
) {
$session->get('_security_shop')->willReturn(null);
diff --git a/src/Sylius/Behat/spec/Service/SessionManagerSpec.php b/src/Sylius/Behat/spec/Service/SessionManagerSpec.php
index 1b039847d32..1ee43cf5d2a 100644
--- a/src/Sylius/Behat/spec/Service/SessionManagerSpec.php
+++ b/src/Sylius/Behat/spec/Service/SessionManagerSpec.php
@@ -37,7 +37,7 @@ function it_changes_session_and_does_not_restore_session_token_if_session_was_no
Mink $mink,
SharedStorageInterface $sharedStorage,
SecurityServiceInterface $securityService,
- TokenInterface $token
+ TokenInterface $token,
): void {
$mink->getDefaultSessionName()->willReturn('default_session');
$securityService->getCurrentToken()->willReturn($token);
@@ -62,7 +62,7 @@ function it_changes_session_and_restores_session_token_if_session_was_called_bef
SharedStorageInterface $sharedStorage,
SecurityServiceInterface $securityService,
TokenInterface $token,
- TokenInterface $previousToken
+ TokenInterface $previousToken,
): void {
$mink->getDefaultSessionName()->willReturn('default_session');
$securityService->getCurrentToken()->willReturn($token);
@@ -88,7 +88,7 @@ function it_restores_session_and_token(
SharedStorageInterface $sharedStorage,
SecurityServiceInterface $securityService,
TokenInterface $token,
- TokenInterface $defaultToken
+ TokenInterface $defaultToken,
): void {
$sharedStorage->has('behat_previous_session_name')->willReturn(true);
$sharedStorage->get('behat_previous_session_name')->willReturn('previous_session');
@@ -114,7 +114,7 @@ function it_does_not_restore_session_and_token_if_previous_session_was_never_cal
Mink $mink,
SharedStorageInterface $sharedStorage,
SecurityServiceInterface $securityService,
- TokenInterface $token
+ TokenInterface $token,
): void {
$sharedStorage->has('behat_previous_session_name')->willReturn(false);
diff --git a/src/Sylius/Behat/spec/Service/Setter/ChannelContextSetterSpec.php b/src/Sylius/Behat/spec/Service/Setter/ChannelContextSetterSpec.php
index 501daac1597..159a79809c4 100644
--- a/src/Sylius/Behat/spec/Service/Setter/ChannelContextSetterSpec.php
+++ b/src/Sylius/Behat/spec/Service/Setter/ChannelContextSetterSpec.php
@@ -38,7 +38,7 @@ function it_implements_channel_context_setter_interface()
function it_sets_channel_as_current(
CookieSetterInterface $cookieSetter,
- ChannelInterface $channel
+ ChannelInterface $channel,
) {
$channel->getCode()->willReturn('CHANNEL_CODE');
diff --git a/src/Sylius/Behat/spec/Service/SharedSecurityServiceSpec.php b/src/Sylius/Behat/spec/Service/SharedSecurityServiceSpec.php
index 6d5a25f658f..83b81b2b6d4 100644
--- a/src/Sylius/Behat/spec/Service/SharedSecurityServiceSpec.php
+++ b/src/Sylius/Behat/spec/Service/SharedSecurityServiceSpec.php
@@ -44,7 +44,7 @@ function it_performs_action_as_given_admin_user_and_restore_previous_token(
SecurityServiceInterface $adminSecurityService,
TokenInterface $token,
OrderInterface $order,
- AdminUserInterface $adminUser
+ AdminUserInterface $adminUser,
) {
$adminSecurityService->getCurrentToken()->willReturn($token);
$adminSecurityService->logIn($adminUser)->shouldBeCalled();
@@ -57,14 +57,14 @@ function it_performs_action_as_given_admin_user_and_restore_previous_token(
$adminUser,
function () use ($wrappedOrder) {
$wrappedOrder->completeCheckout();
- }
+ },
);
}
function it_performs_action_as_given_admin_user_and_logout(
SecurityServiceInterface $adminSecurityService,
OrderInterface $order,
- AdminUserInterface $adminUser
+ AdminUserInterface $adminUser,
) {
$adminSecurityService->getCurrentToken()->willThrow(TokenNotFoundException::class);
$adminSecurityService->logIn($adminUser)->shouldBeCalled();
@@ -77,7 +77,7 @@ function it_performs_action_as_given_admin_user_and_logout(
$adminUser,
function () use ($wrappedOrder) {
$wrappedOrder->completeCheckout();
- }
+ },
);
}
}
diff --git a/src/Sylius/Bundle/AddressingBundle/Controller/ProvinceController.php b/src/Sylius/Bundle/AddressingBundle/Controller/ProvinceController.php
index 00fb6dd1b50..389dd82b4d3 100644
--- a/src/Sylius/Bundle/AddressingBundle/Controller/ProvinceController.php
+++ b/src/Sylius/Bundle/AddressingBundle/Controller/ProvinceController.php
@@ -51,7 +51,7 @@ public function choiceOrTextFieldFormAction(Request $request): Response
[
'metadata' => $this->metadata,
'form' => $form->createView(),
- ]
+ ],
);
return new JsonResponse([
@@ -66,7 +66,7 @@ public function choiceOrTextFieldFormAction(Request $request): Response
[
'metadata' => $this->metadata,
'form' => $form->createView(),
- ]
+ ],
);
return new JsonResponse([
diff --git a/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryChoiceType.php b/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryChoiceType.php
index 2be7cffd29f..d0156f99214 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 25c325289d7..f74aa0d6dcb 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 59d40131b49..4be4d5385f3 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 e16f1b3b106..f3d64dfc3d5 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/Validator/Constraints/ProvinceAddressConstraintValidator.php b/src/Sylius/Bundle/AddressingBundle/Validator/Constraints/ProvinceAddressConstraintValidator.php
index 7b5ad8288a2..dc0d261be05 100644
--- a/src/Sylius/Bundle/AddressingBundle/Validator/Constraints/ProvinceAddressConstraintValidator.php
+++ b/src/Sylius/Bundle/AddressingBundle/Validator/Constraints/ProvinceAddressConstraintValidator.php
@@ -37,7 +37,7 @@ public function validate($value, Constraint $constraint): void
{
if (!$value instanceof AddressInterface) {
throw new \InvalidArgumentException(
- 'ProvinceAddressConstraintValidator can only validate instances of "Sylius\Component\Addressing\Model\AddressInterface"'
+ 'ProvinceAddressConstraintValidator can only validate instances of "Sylius\Component\Addressing\Model\AddressInterface"',
);
}
diff --git a/src/Sylius/Bundle/AddressingBundle/spec/Form/EventListener/BuildAddressFormSubscriberSpec.php b/src/Sylius/Bundle/AddressingBundle/spec/Form/EventListener/BuildAddressFormSubscriberSpec.php
index 4de4ba6cbdf..a23f645f69f 100644
--- a/src/Sylius/Bundle/AddressingBundle/spec/Form/EventListener/BuildAddressFormSubscriberSpec.php
+++ b/src/Sylius/Bundle/AddressingBundle/spec/Form/EventListener/BuildAddressFormSubscriberSpec.php
@@ -59,7 +59,7 @@ function it_adds_provinces_on_pre_set_data(
FormInterface $provinceForm,
AddressInterface $address,
CountryInterface $country,
- RepositoryInterface $countryRepository
+ RepositoryInterface $countryRepository,
): void {
$event->getData()->willReturn($address);
$event->getForm()->willReturn($form);
@@ -72,7 +72,8 @@ function it_adds_provinces_on_pre_set_data(
$formFactory
->createNamed('provinceCode', ProvinceCodeChoiceType::class, 'province', Argument::withKey('country'))
- ->willReturn($provinceForm);
+ ->willReturn($provinceForm)
+ ;
$form->add($provinceForm)->shouldBeCalled();
@@ -86,7 +87,7 @@ function it_adds_province_name_field_on_pre_set_data_if_country_does_not_have_pr
FormInterface $provinceForm,
AddressInterface $address,
CountryInterface $country,
- RepositoryInterface $countryRepository
+ RepositoryInterface $countryRepository,
): void {
$event->getData()->willReturn($address);
$event->getForm()->willReturn($form);
@@ -99,7 +100,8 @@ function it_adds_province_name_field_on_pre_set_data_if_country_does_not_have_pr
$formFactory
->createNamed('provinceName', TextType::class, 'Utah', Argument::any())
- ->willReturn($provinceForm);
+ ->willReturn($provinceForm)
+ ;
$form->add($provinceForm)->shouldBeCalled();
@@ -112,7 +114,7 @@ function it_adds_provinces_on_pre_submit(
FormEvent $event,
FormInterface $form,
FormInterface $provinceForm,
- CountryInterface $country
+ CountryInterface $country,
): void {
$event->getForm()->willReturn($form);
$event->getData()->willReturn([
@@ -124,7 +126,8 @@ function it_adds_provinces_on_pre_submit(
$formFactory
->createNamed('provinceCode', ProvinceCodeChoiceType::class, null, Argument::withKey('country'))
- ->willReturn($provinceForm);
+ ->willReturn($provinceForm)
+ ;
$form->add($provinceForm)->shouldBeCalled();
@@ -137,7 +140,7 @@ function it_adds_province_name_field_on_pre_submit_if_country_does_not_have_prov
FormInterface $form,
FormInterface $provinceForm,
CountryInterface $country,
- RepositoryInterface $countryRepository
+ RepositoryInterface $countryRepository,
): void {
$event->getData()->willReturn([
'countryCode' => 'US',
@@ -149,7 +152,8 @@ function it_adds_province_name_field_on_pre_submit_if_country_does_not_have_prov
$formFactory
->createNamed('provinceName', TextType::class, null, Argument::any())
- ->willReturn($provinceForm);
+ ->willReturn($provinceForm)
+ ;
$form->add($provinceForm)->shouldBeCalled();
diff --git a/src/Sylius/Bundle/AddressingBundle/spec/Validator/Constraints/ProvinceAddressConstraintValidatorSpec.php b/src/Sylius/Bundle/AddressingBundle/spec/Validator/Constraints/ProvinceAddressConstraintValidatorSpec.php
index 01c4e1727e2..fc80c9f75de 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;
@@ -51,7 +50,7 @@ function it_does_not_add_violation_because_a_violation_exists(
AddressInterface $address,
Country $country,
ProvinceAddressConstraint $constraint,
- ExecutionContextInterface $context
+ ExecutionContextInterface $context,
): void {
// DO NOT REMOVE THIS CODE: it ensures that there is a violation that can be added
// if the logic that is being tested (NOT adding a validation) does not work.
@@ -79,7 +78,7 @@ function it_does_not_add_violation_because_a_violation_exists_when_address_is_th
AddressInterface $address,
Country $country,
ProvinceAddressConstraint $constraint,
- ExecutionContextInterface $context
+ ExecutionContextInterface $context,
): void {
// DO NOT REMOVE THIS CODE: it ensures that there is a violation that can be added
// if the logic that is being tested (NOT adding a validation) does not work.
@@ -107,7 +106,7 @@ function it_adds_violation_because_address_has_no_province(
AddressInterface $address,
Country $country,
ProvinceAddressConstraint $constraint,
- ExecutionContextInterface $context
+ ExecutionContextInterface $context,
): void {
$country->getCode()->willReturn('IE');
$address->getCountryCode()->willReturn('IE');
@@ -134,7 +133,7 @@ function it_adds_violation_because_address_province_does_not_belong_to_country(
Country $country,
Province $province,
ProvinceAddressConstraint $constraint,
- ExecutionContextInterface $context
+ ExecutionContextInterface $context,
): void {
$country->getCode()->willReturn('US');
$address->getCountryCode()->willReturn('US');
@@ -165,7 +164,7 @@ function it_adds_violation_because_address_province_does_not_belong_to_country_w
AddressInterface $address,
Country $country,
ProvinceAddressConstraint $constraint,
- ExecutionContextInterface $context
+ ExecutionContextInterface $context,
): void {
$country->getCode()->willReturn('US');
$address->getCountryCode()->willReturn('US');
@@ -195,7 +194,7 @@ function it_does_not_add_a_violation_if_province_is_valid(
Country $country,
Province $province,
ProvinceAddressConstraint $constraint,
- ExecutionContextInterface $context
+ ExecutionContextInterface $context,
): void {
$country->getCode()->willReturn('US');
$address->getCountryCode()->willReturn('US');
diff --git a/src/Sylius/Bundle/AddressingBundle/spec/Validator/Constraints/ZoneCannotContainItselfValidatorSpec.php b/src/Sylius/Bundle/AddressingBundle/spec/Validator/Constraints/ZoneCannotContainItselfValidatorSpec.php
index 6ba06a26df6..57ae2096650 100644
--- a/src/Sylius/Bundle/AddressingBundle/spec/Validator/Constraints/ZoneCannotContainItselfValidatorSpec.php
+++ b/src/Sylius/Bundle/AddressingBundle/spec/Validator/Constraints/ZoneCannotContainItselfValidatorSpec.php
@@ -54,7 +54,7 @@ function it_throws_an_exception_if_constraint_is_not_of_expected_type(): void
function it_does_not_add_violation_if_zone_does_not_contain_itself_in_members(
ExecutionContextInterface $executionContext,
ZoneInterface $zone,
- ZoneMemberInterface $zoneMember
+ ZoneMemberInterface $zoneMember,
): void {
$zone->getCode()->willReturn('WORLD');
$zoneMember->getCode()->willReturn('EU');
@@ -68,7 +68,7 @@ function it_does_not_add_violation_if_zone_does_not_contain_itself_in_members(
function it_adds_violation_if_zone_contains_itself_in_members(
ExecutionContextInterface $executionContext,
ZoneInterface $zone,
- ZoneMemberInterface $zoneMember
+ ZoneMemberInterface $zoneMember,
): void {
$zone->getCode()->willReturn('EU');
$zoneMember->getCode()->willReturn('EU');
diff --git a/src/Sylius/Bundle/AddressingBundle/test/src/Tests/SyliusAddressingBundleTest.php b/src/Sylius/Bundle/AddressingBundle/test/src/Tests/SyliusAddressingBundleTest.php
index d014f639f13..6201814a9fb 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/Action/RemoveAvatarAction.php b/src/Sylius/Bundle/AdminBundle/Action/RemoveAvatarAction.php
index c608cb71eda..f35a9236d9f 100644
--- a/src/Sylius/Bundle/AdminBundle/Action/RemoveAvatarAction.php
+++ b/src/Sylius/Bundle/AdminBundle/Action/RemoveAvatarAction.php
@@ -34,7 +34,7 @@ final class RemoveAvatarAction
public function __construct(
AvatarImageRepositoryInterface $avatarRepository,
RouterInterface $router,
- CsrfTokenManagerInterface $csrfTokenManager
+ CsrfTokenManagerInterface $csrfTokenManager,
) {
$this->avatarRepository = $avatarRepository;
$this->router = $router;
diff --git a/src/Sylius/Bundle/AdminBundle/Action/ResendOrderConfirmationEmailAction.php b/src/Sylius/Bundle/AdminBundle/Action/ResendOrderConfirmationEmailAction.php
index d2ddb2ead52..25af9e1042b 100644
--- a/src/Sylius/Bundle/AdminBundle/Action/ResendOrderConfirmationEmailAction.php
+++ b/src/Sylius/Bundle/AdminBundle/Action/ResendOrderConfirmationEmailAction.php
@@ -39,7 +39,7 @@ public function __construct(
OrderRepositoryInterface $orderRepository,
OrderEmailManagerInterface $orderEmailManager,
CsrfTokenManagerInterface $csrfTokenManager,
- Session $session
+ Session $session,
) {
$this->orderRepository = $orderRepository;
$this->orderEmailManager = $orderEmailManager;
@@ -65,7 +65,7 @@ public function __invoke(Request $request): Response
$this->session->getFlashBag()->add(
'success',
- 'sylius.email.order_confirmation_resent'
+ 'sylius.email.order_confirmation_resent',
);
return new RedirectResponse($request->headers->get('referer'));
diff --git a/src/Sylius/Bundle/AdminBundle/Action/ResendShipmentConfirmationEmailAction.php b/src/Sylius/Bundle/AdminBundle/Action/ResendShipmentConfirmationEmailAction.php
index 70b39c4e9e6..39df0c6ba91 100644
--- a/src/Sylius/Bundle/AdminBundle/Action/ResendShipmentConfirmationEmailAction.php
+++ b/src/Sylius/Bundle/AdminBundle/Action/ResendShipmentConfirmationEmailAction.php
@@ -39,7 +39,7 @@ public function __construct(
ShipmentRepositoryInterface $shipmentRepository,
ShipmentEmailManagerInterface $shipmentEmailManager,
CsrfTokenManagerInterface $csrfTokenManager,
- Session $session
+ Session $session,
) {
$this->shipmentRepository = $shipmentRepository;
$this->shipmentEmailManager = $shipmentEmailManager;
@@ -65,7 +65,7 @@ public function __invoke(Request $request): Response
$this->session->getFlashBag()->add(
'success',
- 'sylius.email.shipment_confirmation_resent'
+ 'sylius.email.shipment_confirmation_resent',
);
return new RedirectResponse($request->headers->get('referer'));
diff --git a/src/Sylius/Bundle/AdminBundle/Controller/CustomerStatisticsController.php b/src/Sylius/Bundle/AdminBundle/Controller/CustomerStatisticsController.php
index 1b1d4f7b0ea..3db77589515 100644
--- a/src/Sylius/Bundle/AdminBundle/Controller/CustomerStatisticsController.php
+++ b/src/Sylius/Bundle/AdminBundle/Controller/CustomerStatisticsController.php
@@ -37,7 +37,7 @@ final class CustomerStatisticsController
public function __construct(
CustomerStatisticsProviderInterface $statisticsProvider,
RepositoryInterface $customerRepository,
- object $templatingEngine
+ object $templatingEngine,
) {
$this->statisticsProvider = $statisticsProvider;
$this->customerRepository = $customerRepository;
@@ -56,7 +56,7 @@ public function renderAction(Request $request): Response
if (null === $customer) {
throw new HttpException(
Response::HTTP_BAD_REQUEST,
- sprintf('Customer with id %s doesn\'t exist.', (string) $customerId)
+ sprintf('Customer with id %s doesn\'t exist.', (string) $customerId),
);
}
@@ -64,7 +64,7 @@ public function renderAction(Request $request): Response
return new Response($this->templatingEngine->render(
'@SyliusAdmin/Customer/Show/Statistics/index.html.twig',
- ['statistics' => $customerStatistics]
+ ['statistics' => $customerStatistics],
));
}
}
diff --git a/src/Sylius/Bundle/AdminBundle/Controller/Dashboard/StatisticsController.php b/src/Sylius/Bundle/AdminBundle/Controller/Dashboard/StatisticsController.php
index 0ed0fb0580a..0ad9be3bdc7 100644
--- a/src/Sylius/Bundle/AdminBundle/Controller/Dashboard/StatisticsController.php
+++ b/src/Sylius/Bundle/AdminBundle/Controller/Dashboard/StatisticsController.php
@@ -31,7 +31,7 @@ final class StatisticsController
*/
public function __construct(
object $templatingEngine,
- StatisticsDataProviderInterface $statisticsDataProvider
+ StatisticsDataProviderInterface $statisticsDataProvider,
) {
$this->templatingEngine = $templatingEngine;
$this->statisticsDataProvider = $statisticsDataProvider;
@@ -45,8 +45,8 @@ public function renderStatistics(ChannelInterface $channel): Response
$channel,
(new \DateTime('first day of january this year')),
(new \DateTime('first day of january next year')),
- 'month'
- )
+ 'month',
+ ),
));
}
}
diff --git a/src/Sylius/Bundle/AdminBundle/Controller/DashboardController.php b/src/Sylius/Bundle/AdminBundle/Controller/DashboardController.php
index 235e53152f7..f451c1886d3 100644
--- a/src/Sylius/Bundle/AdminBundle/Controller/DashboardController.php
+++ b/src/Sylius/Bundle/AdminBundle/Controller/DashboardController.php
@@ -46,7 +46,7 @@ public function __construct(
object $templatingEngine,
RouterInterface $router,
?SalesDataProviderInterface $salesDataProvider = null,
- ?StatisticsDataProviderInterface $statisticsDataProvider = null
+ ?StatisticsDataProviderInterface $statisticsDataProvider = null,
) {
$this->channelRepository = $channelRepository;
$this->templatingEngine = $templatingEngine;
@@ -83,8 +83,8 @@ public function getRawData(Request $request): Response
$channel,
(new \DateTime((string) $request->query->get('startDate'))),
(new \DateTime((string) $request->query->get('endDate'))),
- (string) $request->query->get('interval')
- )
+ (string) $request->query->get('interval'),
+ ),
);
}
diff --git a/src/Sylius/Bundle/AdminBundle/Controller/ImpersonateUserController.php b/src/Sylius/Bundle/AdminBundle/Controller/ImpersonateUserController.php
index e505be50e7f..141e8ff5ef6 100644
--- a/src/Sylius/Bundle/AdminBundle/Controller/ImpersonateUserController.php
+++ b/src/Sylius/Bundle/AdminBundle/Controller/ImpersonateUserController.php
@@ -41,7 +41,7 @@ public function __construct(
AuthorizationCheckerInterface $authorizationChecker,
UserProviderInterface $userProvider,
?RouterInterface $router,
- string $authorizationRole
+ string $authorizationRole,
) {
if (null !== $router) {
@trigger_error('Passing RouterInterface as the fourth argument is deprecated since 1.4 and will be prohibited in 2.0', \E_USER_DEPRECATED);
@@ -69,7 +69,7 @@ public function impersonateAction(Request $request, string $username): Response
$redirectUrl = $request->headers->get(
'referer',
- $this->router->generate('sylius_admin_customer_show', ['id' => $user->getId()])
+ $this->router->generate('sylius_admin_customer_show', ['id' => $user->getId()]),
);
return new RedirectResponse($redirectUrl);
diff --git a/src/Sylius/Bundle/AdminBundle/Controller/NotificationController.php b/src/Sylius/Bundle/AdminBundle/Controller/NotificationController.php
index 5dcba218634..0ec44dfded9 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;
@@ -36,7 +35,7 @@ public function __construct(
ClientInterface $client,
MessageFactory $messageFactory,
string $hubUri,
- string $environment
+ string $environment,
) {
$this->client = $client;
$this->messageFactory = $messageFactory;
@@ -60,7 +59,7 @@ public function getVersionAction(Request $request): JsonResponse
Request::METHOD_GET,
$this->hubUri,
$headers,
- json_encode($content)
+ json_encode($content),
);
try {
diff --git a/src/Sylius/Bundle/AdminBundle/EmailManager/OrderEmailManager.php b/src/Sylius/Bundle/AdminBundle/EmailManager/OrderEmailManager.php
index 59a8d717a34..4f5f795baf8 100644
--- a/src/Sylius/Bundle/AdminBundle/EmailManager/OrderEmailManager.php
+++ b/src/Sylius/Bundle/AdminBundle/EmailManager/OrderEmailManager.php
@@ -35,7 +35,7 @@ public function sendConfirmationEmail(OrderInterface $order): void
'order' => $order,
'channel' => $order->getChannel(),
'localeCode' => $order->getLocaleCode(),
- ]
+ ],
);
}
}
diff --git a/src/Sylius/Bundle/AdminBundle/Event/OrderShowMenuBuilderEvent.php b/src/Sylius/Bundle/AdminBundle/Event/OrderShowMenuBuilderEvent.php
index a216ec85044..33db9055d91 100644
--- a/src/Sylius/Bundle/AdminBundle/Event/OrderShowMenuBuilderEvent.php
+++ b/src/Sylius/Bundle/AdminBundle/Event/OrderShowMenuBuilderEvent.php
@@ -29,7 +29,7 @@ public function __construct(
FactoryInterface $factory,
ItemInterface $menu,
OrderInterface $order,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
) {
parent::__construct($factory, $menu);
diff --git a/src/Sylius/Bundle/AdminBundle/Event/PromotionMenuBuilderEvent.php b/src/Sylius/Bundle/AdminBundle/Event/PromotionMenuBuilderEvent.php
index 505a5f41d72..e5ed2ef75cc 100644
--- a/src/Sylius/Bundle/AdminBundle/Event/PromotionMenuBuilderEvent.php
+++ b/src/Sylius/Bundle/AdminBundle/Event/PromotionMenuBuilderEvent.php
@@ -25,7 +25,7 @@ final class PromotionMenuBuilderEvent extends MenuBuilderEvent
public function __construct(
FactoryInterface $factory,
ItemInterface $menu,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
) {
parent::__construct($factory, $menu);
diff --git a/src/Sylius/Bundle/AdminBundle/Menu/CustomerShowMenuBuilder.php b/src/Sylius/Bundle/AdminBundle/Menu/CustomerShowMenuBuilder.php
index 7379239db8e..609af846fdc 100644
--- a/src/Sylius/Bundle/AdminBundle/Menu/CustomerShowMenuBuilder.php
+++ b/src/Sylius/Bundle/AdminBundle/Menu/CustomerShowMenuBuilder.php
@@ -29,7 +29,7 @@ final class CustomerShowMenuBuilder
public function __construct(
FactoryInterface $factory,
- EventDispatcherInterface $eventDispatcher
+ EventDispatcherInterface $eventDispatcher,
) {
$this->factory = $factory;
$this->eventDispatcher = $eventDispatcher;
@@ -48,7 +48,7 @@ public function createMenu(array $options): ItemInterface
$this->eventDispatcher->dispatch(
new CustomerShowMenuBuilderEvent($this->factory, $menu, $customer),
- self::EVENT_NAME
+ self::EVENT_NAME,
);
return $menu;
diff --git a/src/Sylius/Bundle/AdminBundle/Menu/OrderShowMenuBuilder.php b/src/Sylius/Bundle/AdminBundle/Menu/OrderShowMenuBuilder.php
index 98213d73608..7913f4d6dd5 100644
--- a/src/Sylius/Bundle/AdminBundle/Menu/OrderShowMenuBuilder.php
+++ b/src/Sylius/Bundle/AdminBundle/Menu/OrderShowMenuBuilder.php
@@ -37,7 +37,7 @@ public function __construct(
FactoryInterface $factory,
EventDispatcherInterface $eventDispatcher,
StateMachineFactoryInterface $stateMachineFactory,
- CsrfTokenManagerInterface $csrfTokenManager
+ CsrfTokenManagerInterface $csrfTokenManager,
) {
$this->factory = $factory;
$this->eventDispatcher = $eventDispatcher;
@@ -85,7 +85,7 @@ public function createMenu(array $options): ItemInterface
$this->eventDispatcher->dispatch(
new OrderShowMenuBuilderEvent($this->factory, $menu, $order, $stateMachine),
- self::EVENT_NAME
+ self::EVENT_NAME,
);
return $menu;
diff --git a/src/Sylius/Bundle/AdminBundle/Menu/ProductFormMenuBuilder.php b/src/Sylius/Bundle/AdminBundle/Menu/ProductFormMenuBuilder.php
index 55b7d4f6aec..01270f9c503 100644
--- a/src/Sylius/Bundle/AdminBundle/Menu/ProductFormMenuBuilder.php
+++ b/src/Sylius/Bundle/AdminBundle/Menu/ProductFormMenuBuilder.php
@@ -82,7 +82,7 @@ public function createMenu(array $options = []): ItemInterface
$this->eventDispatcher->dispatch(
new ProductMenuBuilderEvent($this->factory, $menu, $options['product']),
- self::EVENT_NAME
+ self::EVENT_NAME,
);
return $menu;
diff --git a/src/Sylius/Bundle/AdminBundle/Menu/ProductUpdateMenuBuilder.php b/src/Sylius/Bundle/AdminBundle/Menu/ProductUpdateMenuBuilder.php
index d77f1434dab..9c90074d503 100644
--- a/src/Sylius/Bundle/AdminBundle/Menu/ProductUpdateMenuBuilder.php
+++ b/src/Sylius/Bundle/AdminBundle/Menu/ProductUpdateMenuBuilder.php
@@ -88,7 +88,7 @@ public function createMenu(array $options): ItemInterface
$this->eventDispatcher->dispatch(
new ProductMenuBuilderEvent($this->factory, $menu, $product),
- self::EVENT_NAME
+ self::EVENT_NAME,
);
return $menu;
diff --git a/src/Sylius/Bundle/AdminBundle/Menu/ProductVariantFormMenuBuilder.php b/src/Sylius/Bundle/AdminBundle/Menu/ProductVariantFormMenuBuilder.php
index 7fd2a0cee4a..5d1675068b6 100644
--- a/src/Sylius/Bundle/AdminBundle/Menu/ProductVariantFormMenuBuilder.php
+++ b/src/Sylius/Bundle/AdminBundle/Menu/ProductVariantFormMenuBuilder.php
@@ -62,7 +62,7 @@ public function createMenu(array $options = []): ItemInterface
$this->eventDispatcher->dispatch(
new ProductVariantMenuBuilderEvent($this->factory, $menu, $options['product_variant']),
- self::EVENT_NAME
+ self::EVENT_NAME,
);
return $menu;
diff --git a/src/Sylius/Bundle/AdminBundle/Menu/PromotionUpdateMenuBuilder.php b/src/Sylius/Bundle/AdminBundle/Menu/PromotionUpdateMenuBuilder.php
index b908580be07..0b0cc1b17d1 100644
--- a/src/Sylius/Bundle/AdminBundle/Menu/PromotionUpdateMenuBuilder.php
+++ b/src/Sylius/Bundle/AdminBundle/Menu/PromotionUpdateMenuBuilder.php
@@ -45,7 +45,7 @@ public function createMenu(array $options): ItemInterface
$this->addChildren($menu, $promotion);
$this->eventDispatcher->dispatch(
new PromotionMenuBuilderEvent($this->factory, $menu, $promotion),
- self::EVENT_NAME
+ self::EVENT_NAME,
);
return $menu;
diff --git a/src/Sylius/Bundle/AdminBundle/Provider/StatisticsDataProvider.php b/src/Sylius/Bundle/AdminBundle/Provider/StatisticsDataProvider.php
index 22d5d3dbef6..837b77f88dc 100644
--- a/src/Sylius/Bundle/AdminBundle/Provider/StatisticsDataProvider.php
+++ b/src/Sylius/Bundle/AdminBundle/Provider/StatisticsDataProvider.php
@@ -31,7 +31,7 @@ class StatisticsDataProvider implements StatisticsDataProviderInterface
public function __construct(
DashboardStatisticsProviderInterface $statisticsProvider,
SalesDataProviderInterface $salesDataProvider,
- MoneyFormatterInterface $moneyFormatter
+ MoneyFormatterInterface $moneyFormatter,
) {
$this->statisticsProvider = $statisticsProvider;
$this->salesDataProvider = $salesDataProvider;
@@ -47,7 +47,7 @@ public function getRawData(ChannelInterface $channel, \DateTimeInterface $startD
$channel,
$startDate,
$endDate,
- Interval::{$interval}()
+ Interval::{$interval}(),
);
/** @var string $currencyCode */
diff --git a/src/Sylius/Bundle/AdminBundle/Tests/Controller/NotificationControllerTest.php b/src/Sylius/Bundle/AdminBundle/Tests/Controller/NotificationControllerTest.php
index 267bd38e2e4..6065e3fe65c 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;
@@ -90,7 +90,7 @@ protected function setUp(): void
$this->client->reveal(),
$this->messageFactory->reveal(),
self::$hubUri,
- 'environment'
+ 'environment',
);
parent::setUp();
diff --git a/src/Sylius/Bundle/AdminBundle/Twig/NotificationWidgetExtension.php b/src/Sylius/Bundle/AdminBundle/Twig/NotificationWidgetExtension.php
index 19c14adcbe5..43626188f91 100644
--- a/src/Sylius/Bundle/AdminBundle/Twig/NotificationWidgetExtension.php
+++ b/src/Sylius/Bundle/AdminBundle/Twig/NotificationWidgetExtension.php
@@ -39,7 +39,7 @@ public function getFunctions(): array
[
'needs_environment' => true,
'is_safe' => ['html'],
- ]
+ ],
),
];
}
diff --git a/src/Sylius/Bundle/AdminBundle/Twig/OrderUnitTaxesExtension.php b/src/Sylius/Bundle/AdminBundle/Twig/OrderUnitTaxesExtension.php
index e45984a04bf..0a41b89fcf1 100644
--- a/src/Sylius/Bundle/AdminBundle/Twig/OrderUnitTaxesExtension.php
+++ b/src/Sylius/Bundle/AdminBundle/Twig/OrderUnitTaxesExtension.php
@@ -43,8 +43,8 @@ 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,
- 0
+ static fn (int $total, BaseAdjustmentInterface $adjustment) => $neutral === $adjustment->isNeutral() ? $total + $adjustment->getAmount() : $total,
+ 0,
);
return $total;
diff --git a/src/Sylius/Bundle/AdminBundle/Twig/ShopExtension.php b/src/Sylius/Bundle/AdminBundle/Twig/ShopExtension.php
index 35b5f86b9c6..6c3fcd46838 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/AdminBundle/spec/Context/AdminBasedLocaleContextSpec.php b/src/Sylius/Bundle/AdminBundle/spec/Context/AdminBasedLocaleContextSpec.php
index c30ab7f1991..72745b99215 100644
--- a/src/Sylius/Bundle/AdminBundle/spec/Context/AdminBasedLocaleContextSpec.php
+++ b/src/Sylius/Bundle/AdminBundle/spec/Context/AdminBasedLocaleContextSpec.php
@@ -42,7 +42,7 @@ function it_throws_locale_not_found_exception_when_there_is_no_token(TokenStorag
function it_throws_locale_not_found_exception_when_there_is_no_user_in_the_token(
TokenStorageInterface $tokenStorage,
- TokenInterface $token
+ TokenInterface $token,
): void {
$token->getUser()->willReturn(null);
$tokenStorage->getToken()->willReturn($token);
@@ -53,7 +53,7 @@ function it_throws_locale_not_found_exception_when_there_is_no_user_in_the_token
function it_throws_locale_not_found_exception_when_the_user_taken_from_token_is_not_an_admin(
TokenStorageInterface $tokenStorage,
TokenInterface $token,
- UserInterface $user
+ UserInterface $user,
): void {
$token->getUser()->willReturn($user);
$tokenStorage->getToken()->willReturn($token);
@@ -64,7 +64,7 @@ function it_throws_locale_not_found_exception_when_the_user_taken_from_token_is_
function it_returns_locale_of_currently_logged_admin_user(
TokenStorageInterface $tokenStorage,
TokenInterface $token,
- AdminUserInterface $admin
+ AdminUserInterface $admin,
): void {
$admin->getLocaleCode()->willReturn('en_US');
$token->getUser()->willreturn($admin);
diff --git a/src/Sylius/Bundle/AdminBundle/spec/EmailManager/OrderEmailManagerSpec.php b/src/Sylius/Bundle/AdminBundle/spec/EmailManager/OrderEmailManagerSpec.php
index 60c94620196..add83076adb 100644
--- a/src/Sylius/Bundle/AdminBundle/spec/EmailManager/OrderEmailManagerSpec.php
+++ b/src/Sylius/Bundle/AdminBundle/spec/EmailManager/OrderEmailManagerSpec.php
@@ -36,7 +36,7 @@ function it_sends_an_order_confirmation_email(
SenderInterface $sender,
OrderInterface $order,
ChannelInterface $channel,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$order->getChannel()->willReturn($channel);
$order->getLocaleCode()->willReturn('en_US');
diff --git a/src/Sylius/Bundle/AdminBundle/spec/EmailManager/ShipmentEmailManagerSpec.php b/src/Sylius/Bundle/AdminBundle/spec/EmailManager/ShipmentEmailManagerSpec.php
index 51226a9b469..3fa415255b1 100644
--- a/src/Sylius/Bundle/AdminBundle/spec/EmailManager/ShipmentEmailManagerSpec.php
+++ b/src/Sylius/Bundle/AdminBundle/spec/EmailManager/ShipmentEmailManagerSpec.php
@@ -38,7 +38,7 @@ function it_sends_a_shipment_confirmation_email(
ShipmentInterface $shipment,
OrderInterface $order,
ChannelInterface $channel,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$shipment->getOrder()->willReturn($order);
$order->getChannel()->willReturn($channel);
diff --git a/src/Sylius/Bundle/AdminBundle/spec/Event/OrderShowMenuBuilderEventSpec.php b/src/Sylius/Bundle/AdminBundle/spec/Event/OrderShowMenuBuilderEventSpec.php
index d29484b3450..870a2b2c6c8 100644
--- a/src/Sylius/Bundle/AdminBundle/spec/Event/OrderShowMenuBuilderEventSpec.php
+++ b/src/Sylius/Bundle/AdminBundle/spec/Event/OrderShowMenuBuilderEventSpec.php
@@ -26,7 +26,7 @@ function let(
FactoryInterface $factory,
ItemInterface $menu,
OrderInterface $order,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$this->beConstructedWith($factory, $menu, $order, $stateMachine);
}
diff --git a/src/Sylius/Bundle/AdminBundle/spec/EventListener/AdminSectionCacheControlSubscriberSpec.php b/src/Sylius/Bundle/AdminBundle/spec/EventListener/AdminSectionCacheControlSubscriberSpec.php
index f67decf3f5d..ab137b811c7 100644
--- a/src/Sylius/Bundle/AdminBundle/spec/EventListener/AdminSectionCacheControlSubscriberSpec.php
+++ b/src/Sylius/Bundle/AdminBundle/spec/EventListener/AdminSectionCacheControlSubscriberSpec.php
@@ -43,7 +43,7 @@ function it_adds_cache_control_directives_to_admin_requests(
Request $request,
Response $response,
ResponseHeaderBag $responseHeaderBag,
- AdminSection $adminSection
+ AdminSection $adminSection,
): void {
$sectionProvider->getSection()->willReturn($adminSection);
@@ -53,7 +53,7 @@ function it_adds_cache_control_directives_to_admin_requests(
$kernel->getWrappedObject(),
$request->getWrappedObject(),
KernelInterface::MASTER_REQUEST,
- $response->getWrappedObject()
+ $response->getWrappedObject(),
);
$responseHeaderBag->addCacheControlDirective('no-cache', true)->shouldBeCalled();
@@ -70,7 +70,7 @@ function it_does_nothing_if_section_is_different_than_admin(
Request $request,
Response $response,
ResponseHeaderBag $responseHeaderBag,
- SectionInterface $section
+ SectionInterface $section,
): void {
$sectionProvider->getSection()->willReturn($section);
@@ -80,7 +80,7 @@ function it_does_nothing_if_section_is_different_than_admin(
$kernel->getWrappedObject(),
$request->getWrappedObject(),
KernelInterface::MASTER_REQUEST,
- $response->getWrappedObject()
+ $response->getWrappedObject(),
);
$responseHeaderBag->addCacheControlDirective('no-cache', true)->shouldNotBeCalled();
diff --git a/src/Sylius/Bundle/AdminBundle/spec/EventListener/ShipmentShipListenerSpec.php b/src/Sylius/Bundle/AdminBundle/spec/EventListener/ShipmentShipListenerSpec.php
index e1b4fec4441..d5610397d52 100644
--- a/src/Sylius/Bundle/AdminBundle/spec/EventListener/ShipmentShipListenerSpec.php
+++ b/src/Sylius/Bundle/AdminBundle/spec/EventListener/ShipmentShipListenerSpec.php
@@ -28,7 +28,7 @@ function let(ShipmentEmailManagerInterface $shipmentEmailManager): void
function it_sends_a_confirmation_email(
ShipmentEmailManagerInterface $shipmentEmailManager,
GenericEvent $event,
- ShipmentInterface $shipment
+ ShipmentInterface $shipment,
): void {
$event->getSubject()->willReturn($shipment);
@@ -39,7 +39,7 @@ function it_sends_a_confirmation_email(
function it_throws_an_invalid_argument_exception_if_an_event_subject_is_not_a_shipment_instance(
GenericEvent $event,
- \stdClass $shipment
+ \stdClass $shipment,
): void {
$event->getSubject()->willReturn($shipment);
diff --git a/src/Sylius/Bundle/AdminBundle/spec/Provider/StatisticsDataProviderSpec.php b/src/Sylius/Bundle/AdminBundle/spec/Provider/StatisticsDataProviderSpec.php
index 148a19a2060..ba6b291e018 100644
--- a/src/Sylius/Bundle/AdminBundle/spec/Provider/StatisticsDataProviderSpec.php
+++ b/src/Sylius/Bundle/AdminBundle/spec/Provider/StatisticsDataProviderSpec.php
@@ -30,7 +30,7 @@ class StatisticsDataProviderSpec extends ObjectBehavior
function let(
DashboardStatisticsProviderInterface $statisticsProvider,
SalesDataProviderInterface $salesDataProvider,
- MoneyFormatterInterface $moneyFormatter
+ MoneyFormatterInterface $moneyFormatter,
): void {
$this->beConstructedWith($statisticsProvider, $salesDataProvider, $moneyFormatter);
}
@@ -52,7 +52,7 @@ function it_provides_data_for_year(
DashboardStatistics $statistics,
SalesSummaryInterface $salesSummary,
CurrencyInterface $currency,
- MoneyFormatterInterface $moneyFormatter
+ MoneyFormatterInterface $moneyFormatter,
): void {
$startDate = new \DateTime('2020-01-01');
$endDate = new \DateTime('2021-01-01');
@@ -102,7 +102,7 @@ function it_provides_data_for_month(
DashboardStatistics $statistics,
SalesSummaryInterface $salesSummary,
CurrencyInterface $currency,
- MoneyFormatterInterface $moneyFormatter
+ MoneyFormatterInterface $moneyFormatter,
): void {
$startDate = new \DateTime('2020-05-01');
$endDate = new \DateTime('2020-06-01');
@@ -125,7 +125,7 @@ function it_provides_data_for_month(
'21.5.2020', '22.5.2020', '23.5.2020', '24.5.2020', '25.5.2020',
'26.5.2020', '27.5.2020', '28.5.2020', '29.5.2020', '30.5.2020',
'31.5.2020',
- ]
+ ],
);
$salesSummary->getSales()->willReturn(
[
@@ -134,7 +134,7 @@ function it_provides_data_for_month(
'0', '0', '0', '0', '0', '0', '0',
'0', '0', '0', '81.0', '0', '0', '0',
'0', '0', '0', '0', '0', '4.50', '0',
- ]
+ ],
);
$channel->getBaseCurrency()->willReturn($currency);
$currency->getCode()->willReturn('USD');
@@ -184,7 +184,7 @@ function it_provides_data_for_2_weeks(
DashboardStatistics $statistics,
SalesSummaryInterface $salesSummary,
CurrencyInterface $currency,
- MoneyFormatterInterface $moneyFormatter
+ MoneyFormatterInterface $moneyFormatter,
): void {
$startDate = new \DateTime('2020-05-21');
$endDate = new \DateTime('2020-06-04');
@@ -202,13 +202,13 @@ function it_provides_data_for_2_weeks(
[
'21.5.2020', '22.5.2020', '23.5.2020', '24.5.2020', '25.5.2020', '26.5.2020', '27.5.2020',
'28.5.2020', '29.5.2020', '30.5.2020', '31.5.2020', '1.6.2020', '2.6.2020', '3.6.2020',
- ]
+ ],
);
$salesSummary->getSales()->willReturn(
[
'0', '168.82', '0', '203.92', '0', '0', '10.0',
'0', '0', '40.50', '0', '0', '23.0', '0', '7.0', '11.0',
- ]
+ ],
);
$channel->getBaseCurrency()->willReturn($currency);
$currency->getCode()->willReturn('USD');
diff --git a/src/Sylius/Bundle/ApiBundle/ApiPlatform/Bridge/Symfony/Routing/CachedRouteNameResolver.php b/src/Sylius/Bundle/ApiBundle/ApiPlatform/Bridge/Symfony/Routing/CachedRouteNameResolver.php
index 5eec22f5d6e..6afb752e303 100644
--- a/src/Sylius/Bundle/ApiBundle/ApiPlatform/Bridge/Symfony/Routing/CachedRouteNameResolver.php
+++ b/src/Sylius/Bundle/ApiBundle/ApiPlatform/Bridge/Symfony/Routing/CachedRouteNameResolver.php
@@ -34,7 +34,7 @@ final class CachedRouteNameResolver implements RouteNameResolverInterface
public function __construct(
CacheItemPoolInterface $cacheItemPool,
RouteNameResolverInterface $decorated,
- PathPrefixProviderInterface $pathPrefixProvider
+ PathPrefixProviderInterface $pathPrefixProvider,
) {
$this->cacheItemPool = $cacheItemPool;
$this->decorated = $decorated;
@@ -48,7 +48,7 @@ public function getRouteName(string $resourceClass, $operationType /*, array $co
$context = \func_num_args() > 2 ? func_get_arg(2) : [];
$cacheKey = $currentPrefix . md5(
- serialize([$resourceClass, $operationType, $context['subresource_resources'] ?? null])
+ serialize([$resourceClass, $operationType, $context['subresource_resources'] ?? null]),
);
return $this->getCached($cacheKey, function () use ($resourceClass, $operationType, $context) {
diff --git a/src/Sylius/Bundle/ApiBundle/ApiPlatform/Bridge/Symfony/Routing/RouteNameResolver.php b/src/Sylius/Bundle/ApiBundle/ApiPlatform/Bridge/Symfony/Routing/RouteNameResolver.php
index 2b7b7284783..ca7a442c608 100644
--- a/src/Sylius/Bundle/ApiBundle/ApiPlatform/Bridge/Symfony/Routing/RouteNameResolver.php
+++ b/src/Sylius/Bundle/ApiBundle/ApiPlatform/Bridge/Symfony/Routing/RouteNameResolver.php
@@ -80,7 +80,7 @@ private function isSameSubresource(array $context, array $currentContext): bool
private function returnMatchingRouteName(
array $matchingRoutes,
string $operationType,
- string $resourceClass
+ string $resourceClass,
): string {
if (count($matchingRoutes) === 1) {
return array_key_first($matchingRoutes);
@@ -99,7 +99,7 @@ private function returnMatchingRouteName(
}
throw new InvalidArgumentException(
- sprintf('No %s route associated with the type "%s".', $operationType, $resourceClass)
+ sprintf('No %s route associated with the type "%s".', $operationType, $resourceClass),
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/Applicator/ShipmentStateMachineTransitionApplicator.php b/src/Sylius/Bundle/ApiBundle/Applicator/ShipmentStateMachineTransitionApplicator.php
index ac2d156529c..a3969dcd2f9 100644
--- a/src/Sylius/Bundle/ApiBundle/Applicator/ShipmentStateMachineTransitionApplicator.php
+++ b/src/Sylius/Bundle/ApiBundle/Applicator/ShipmentStateMachineTransitionApplicator.php
@@ -28,7 +28,7 @@ final class ShipmentStateMachineTransitionApplicator implements ShipmentStateMac
public function __construct(
StateMachineFactoryInterface $stateMachineFactory,
- EventDispatcherInterface $eventDispatcher
+ EventDispatcherInterface $eventDispatcher,
) {
$this->stateMachineFactory = $stateMachineFactory;
$this->eventDispatcher = $eventDispatcher;
diff --git a/src/Sylius/Bundle/ApiBundle/Behat/Tester/ApiScenarioEventDispatchingScenarioTester.php b/src/Sylius/Bundle/ApiBundle/Behat/Tester/ApiScenarioEventDispatchingScenarioTester.php
index 1bf75ccd8d5..41b87ce71a0 100644
--- a/src/Sylius/Bundle/ApiBundle/Behat/Tester/ApiScenarioEventDispatchingScenarioTester.php
+++ b/src/Sylius/Bundle/ApiBundle/Behat/Tester/ApiScenarioEventDispatchingScenarioTester.php
@@ -53,7 +53,7 @@ public function setUp(Environment $env, FeatureNode $feature, Scenario $scenario
$tags,
$scenario->getSteps(),
$scenario->getKeyword(),
- $scenario->getLine()
+ $scenario->getLine(),
);
return $this->baseTester->setUp($env, $feature, $scenario, $skip);
diff --git a/src/Sylius/Bundle/ApiBundle/Changer/PaymentMethodChanger.php b/src/Sylius/Bundle/ApiBundle/Changer/PaymentMethodChanger.php
index 7d0ccc6f460..7a48fc06aa6 100644
--- a/src/Sylius/Bundle/ApiBundle/Changer/PaymentMethodChanger.php
+++ b/src/Sylius/Bundle/ApiBundle/Changer/PaymentMethodChanger.php
@@ -29,7 +29,7 @@ final class PaymentMethodChanger implements PaymentMethodChangerInterface
public function __construct(
PaymentRepositoryInterface $paymentRepository,
- PaymentMethodRepositoryInterface $paymentMethodRepository
+ PaymentMethodRepositoryInterface $paymentMethodRepository,
) {
$this->paymentRepository = $paymentRepository;
$this->paymentMethodRepository = $paymentMethodRepository;
@@ -38,7 +38,7 @@ public function __construct(
public function changePaymentMethod(
string $paymentMethodCode,
string $paymentId,
- OrderInterface $order
+ OrderInterface $order,
): OrderInterface {
/** @var PaymentMethodInterface|null $paymentMethod */
$paymentMethod = $this->paymentMethodRepository->findOneBy([
@@ -53,7 +53,7 @@ public function changePaymentMethod(
Assert::same(
$payment->getState(),
PaymentInterface::STATE_NEW,
- 'Can not change payment method for this payment'
+ 'Can not change payment method for this payment',
);
$payment->setMethod($paymentMethod);
diff --git a/src/Sylius/Bundle/ApiBundle/Changer/PaymentMethodChangerInterface.php b/src/Sylius/Bundle/ApiBundle/Changer/PaymentMethodChangerInterface.php
index 12115e60566..de28e19a6da 100644
--- a/src/Sylius/Bundle/ApiBundle/Changer/PaymentMethodChangerInterface.php
+++ b/src/Sylius/Bundle/ApiBundle/Changer/PaymentMethodChangerInterface.php
@@ -21,6 +21,6 @@ interface PaymentMethodChangerInterface
public function changePaymentMethod(
string $paymentMethodCode,
string $paymentId,
- OrderInterface $order
+ OrderInterface $order,
): OrderInterface;
}
diff --git a/src/Sylius/Bundle/ApiBundle/Command/Account/ChangePaymentMethod.php b/src/Sylius/Bundle/ApiBundle/Command/Account/ChangePaymentMethod.php
index 3dc0ce9864d..8d3746e2e68 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 88c28133d07..9748bae2f05 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;
@@ -51,7 +56,7 @@ public function __construct(
?int $rating,
?string $comment,
string $productCode,
- ?string $email = null
+ ?string $email = null,
) {
$this->title = $title;
$this->rating = $rating;
diff --git a/src/Sylius/Bundle/ApiBundle/Command/BlameCart.php b/src/Sylius/Bundle/ApiBundle/Command/BlameCart.php
index 8b53e1ce054..84fd47f4250 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 09487621267..d279e0578a4 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 0510c302d28..b1a3171b446 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 110c82abe0e..cace2725f16 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 b3af4ac3673..bc90d2f47f4 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 39d021eb4ca..be8d80460cf 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 ab76e755de7..01d8fe65803 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 e9cde6e2f27..b6310250d1b 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 f5ff57ff4d4..f3f2fec70ad 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 8c9571e1530..f72bb4d619a 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 130463b9536..825c93b4a2b 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 1d7f8a6f8d7..0230cfac65a 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 8448364f5d7..83bee9c6c2b 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(
@@ -70,7 +72,7 @@ public function __construct(
string $email,
string $password,
?string $phoneNumber = null,
- bool $subscribedToNewsletter = false
+ bool $subscribedToNewsletter = false,
) {
$this->firstName = $firstName;
$this->lastName = $lastName;
diff --git a/src/Sylius/Bundle/ApiBundle/Command/RequestResetPasswordToken.php b/src/Sylius/Bundle/ApiBundle/Command/RequestResetPasswordToken.php
index 5c973032ea7..786c3089b1a 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 56e216c832d..3df221298d9 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 911440a3d92..80ef43629d9 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 a6e0ef091ca..3d128fa3f18 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 b76edd8c0a0..edf3f6037c5 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 08d2c8e365f..09ede58f595 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 66c4abc3ce0..181ca8b6aba 100644
--- a/src/Sylius/Bundle/ApiBundle/Command/SendResetPasswordEmail.php
+++ b/src/Sylius/Bundle/ApiBundle/Command/SendResetPasswordEmail.php
@@ -16,25 +16,19 @@
/** @experimental */
class SendResetPasswordEmail
{
- /**
- * @var string
- */
+ /** @var string */
public $email;
- /**
- * @var string
- */
+ /** @var string */
public $channelCode;
- /**
- * @var string
- */
+ /** @var string */
public $localeCode;
public function __construct(
string $email,
string $channelCode,
- string $localeCode
+ string $localeCode,
) {
$this->email = $email;
$this->channelCode = $channelCode;
diff --git a/src/Sylius/Bundle/ApiBundle/Command/VerifyCustomerAccount.php b/src/Sylius/Bundle/ApiBundle/Command/VerifyCustomerAccount.php
index 9dd8ec76359..0b1ca5bd38c 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/Account/ChangePaymentMethodHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/Account/ChangePaymentMethodHandler.php
index 04e4da773c0..53f76b666b6 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/Account/ChangePaymentMethodHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/Account/ChangePaymentMethodHandler.php
@@ -29,7 +29,7 @@ final class ChangePaymentMethodHandler implements MessageHandlerInterface
public function __construct(
PaymentMethodChangerInterface $commandPaymentMethodChanger,
- OrderRepositoryInterface $orderRepository
+ OrderRepositoryInterface $orderRepository,
) {
$this->paymentMethodChanger = $commandPaymentMethodChanger;
$this->orderRepository = $orderRepository;
@@ -45,7 +45,7 @@ public function __invoke(ChangePaymentMethod $changePaymentMethod): OrderInterfa
return $this->paymentMethodChanger->changePaymentMethod(
$changePaymentMethod->paymentMethodCode,
$changePaymentMethod->paymentId,
- $order
+ $order,
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/AddProductReviewHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/AddProductReviewHandler.php
index a623edb5839..2ede5f08679 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/AddProductReviewHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/AddProductReviewHandler.php
@@ -38,7 +38,7 @@ public function __construct(
FactoryInterface $productReviewFactory,
RepositoryInterface $productReviewRepository,
ProductRepositoryInterface $productRepository,
- CustomerProviderInterface $customerProvider
+ CustomerProviderInterface $customerProvider,
) {
$this->productReviewFactory = $productReviewFactory;
$this->productReviewRepository = $productReviewRepository;
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/BlameCartHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/BlameCartHandler.php
index d526551a4a0..5600a7ef563 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/BlameCartHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/BlameCartHandler.php
@@ -23,7 +23,7 @@ final class BlameCartHandler implements MessageHandlerInterface
public function __construct(
UserRepositoryInterface $shopUserRepository,
OrderRepositoryInterface $orderRepository,
- OrderProcessorInterface $orderProcessor
+ OrderProcessorInterface $orderProcessor,
) {
$this->shopUserRepository = $shopUserRepository;
$this->orderRepository = $orderRepository;
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/Cart/AddItemToCartHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/Cart/AddItemToCartHandler.php
index e6dd09b91fd..e033c6d2ae0 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/Cart/AddItemToCartHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/Cart/AddItemToCartHandler.php
@@ -43,7 +43,7 @@ public function __construct(
ProductVariantRepositoryInterface $productVariantRepository,
OrderModifierInterface $orderModifier,
CartItemFactoryInterface $cartItemFactory,
- OrderItemQuantityModifierInterface $orderItemQuantityModifier
+ OrderItemQuantityModifierInterface $orderItemQuantityModifier,
) {
$this->orderRepository = $orderRepository;
$this->productVariantRepository = $productVariantRepository;
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/Cart/ApplyCouponToCartHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/Cart/ApplyCouponToCartHandler.php
index acb4a4880c0..69008646624 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/Cart/ApplyCouponToCartHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/Cart/ApplyCouponToCartHandler.php
@@ -34,7 +34,7 @@ final class ApplyCouponToCartHandler implements MessageHandlerInterface
public function __construct(
OrderRepositoryInterface $orderRepository,
PromotionCouponRepositoryInterface $promotionCouponRepository,
- OrderProcessorInterface $orderProcessor
+ OrderProcessorInterface $orderProcessor,
) {
$this->orderRepository = $orderRepository;
$this->promotionCouponRepository = $promotionCouponRepository;
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/Cart/ChangeItemQuantityInCartHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/Cart/ChangeItemQuantityInCartHandler.php
index 353cbe283ce..ac2cddbac67 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/Cart/ChangeItemQuantityInCartHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/Cart/ChangeItemQuantityInCartHandler.php
@@ -34,7 +34,7 @@ final class ChangeItemQuantityInCartHandler implements MessageHandlerInterface
public function __construct(
OrderItemRepositoryInterface $orderItemRepository,
OrderItemQuantityModifierInterface $orderItemQuantityModifier,
- OrderProcessorInterface $orderProcessor
+ OrderProcessorInterface $orderProcessor,
) {
$this->orderItemRepository = $orderItemRepository;
$this->orderItemQuantityModifier = $orderItemQuantityModifier;
@@ -46,7 +46,7 @@ public function __invoke(ChangeItemQuantityInCart $command): OrderInterface
/** @var OrderItemInterface|null $orderItem */
$orderItem = $this->orderItemRepository->findOneByIdAndCartTokenValue(
$command->orderItemId,
- $command->orderTokenValue
+ $command->orderTokenValue,
);
Assert::notNull($orderItem);
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/Cart/RemoveItemFromCartHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/Cart/RemoveItemFromCartHandler.php
index efc93e637a6..56b2e267c99 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/Cart/RemoveItemFromCartHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/Cart/RemoveItemFromCartHandler.php
@@ -30,7 +30,7 @@ final class RemoveItemFromCartHandler implements MessageHandlerInterface
public function __construct(
OrderItemRepositoryInterface $orderItemRepository,
- OrderModifierInterface $orderModifier
+ OrderModifierInterface $orderModifier,
) {
$this->orderItemRepository = $orderItemRepository;
$this->orderModifier = $orderModifier;
@@ -41,7 +41,7 @@ public function __invoke(RemoveItemFromCart $removeItemFromCart): OrderInterface
/** @var OrderItemInterface|null $orderItem */
$orderItem = $this->orderItemRepository->findOneByIdAndCartTokenValue(
$removeItemFromCart->itemId,
- $removeItemFromCart->orderTokenValue
+ $removeItemFromCart->orderTokenValue,
);
Assert::notNull($orderItem);
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/AddressOrderHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/AddressOrderHandler.php
index bc6787e53b3..988d5fcdaed 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/AddressOrderHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/AddressOrderHandler.php
@@ -43,7 +43,7 @@ public function __construct(
CustomerRepositoryInterface $customerRepository,
FactoryInterface $customerFactory,
ObjectManager $manager,
- StateMachineFactoryInterface $stateMachineFactory
+ StateMachineFactoryInterface $stateMachineFactory,
) {
$this->orderRepository = $orderRepository;
$this->customerRepository = $customerRepository;
@@ -64,7 +64,7 @@ public function __invoke(AddressOrder $addressOrder): OrderInterface
Assert::true(
$stateMachine->can(OrderCheckoutTransitions::TRANSITION_ADDRESS),
- sprintf('Order with %s token cannot be addressed.', $tokenValue)
+ sprintf('Order with %s token cannot be addressed.', $tokenValue),
);
if (null === $order->getCustomer()) {
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/ChoosePaymentMethodHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/ChoosePaymentMethodHandler.php
index 88026e8adcf..fe77c7b8475 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/ChoosePaymentMethodHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/ChoosePaymentMethodHandler.php
@@ -43,7 +43,7 @@ public function __construct(
PaymentMethodRepositoryInterface $paymentMethodRepository,
PaymentRepositoryInterface $paymentRepository,
FactoryInterface $stateMachineFactory,
- PaymentMethodChangerInterface $paymentMethodChanger
+ PaymentMethodChangerInterface $paymentMethodChanger,
) {
$this->orderRepository = $orderRepository;
$this->paymentMethodRepository = $paymentMethodRepository;
@@ -82,9 +82,9 @@ public function __invoke(ChoosePaymentMethod $choosePaymentMethod): OrderInterfa
Assert::true(
$stateMachine->can(
- OrderCheckoutTransitions::TRANSITION_SELECT_PAYMENT
- ),
- 'Order cannot have payment method assigned.'
+ OrderCheckoutTransitions::TRANSITION_SELECT_PAYMENT,
+ ),
+ 'Order cannot have payment method assigned.',
);
$payment->setMethod($paymentMethod);
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/ChooseShippingMethodHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/ChooseShippingMethodHandler.php
index ff0abca47f6..16a9ded643f 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/ChooseShippingMethodHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/ChooseShippingMethodHandler.php
@@ -43,7 +43,7 @@ public function __construct(
ShippingMethodRepositoryInterface $shippingMethodRepository,
ShipmentRepositoryInterface $shipmentRepository,
ShippingMethodEligibilityCheckerInterface $eligibilityChecker,
- FactoryInterface $stateMachineFactory
+ FactoryInterface $stateMachineFactory,
) {
$this->orderRepository = $orderRepository;
$this->shippingMethodRepository = $shippingMethodRepository;
@@ -63,7 +63,7 @@ public function __invoke(ChooseShippingMethod $chooseShippingMethod): OrderInter
Assert::true(
$stateMachine->can(OrderCheckoutTransitions::TRANSITION_SELECT_SHIPPING),
- 'Order cannot have shipment method assigned.'
+ 'Order cannot have shipment method assigned.',
);
/** @var ShippingMethodInterface|null $shippingMethod */
@@ -77,7 +77,7 @@ public function __invoke(ChooseShippingMethod $chooseShippingMethod): OrderInter
Assert::true(
$this->eligibilityChecker->isEligible($shipment, $shippingMethod),
- 'Given shipment is not eligible for provided shipping method.'
+ 'Given shipment is not eligible for provided shipping method.',
);
$shipment->setMethod($shippingMethod);
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/CompleteOrderHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/CompleteOrderHandler.php
index e6bf4d1da1f..38b03eacb29 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/CompleteOrderHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/CompleteOrderHandler.php
@@ -36,7 +36,7 @@ final class CompleteOrderHandler implements MessageHandlerInterface
public function __construct(
OrderRepositoryInterface $orderRepository,
FactoryInterface $stateMachineFactory,
- MessageBusInterface $eventBus
+ MessageBusInterface $eventBus,
) {
$this->orderRepository = $orderRepository;
$this->stateMachineFactory = $stateMachineFactory;
@@ -60,7 +60,7 @@ public function __invoke(CompleteOrder $completeOrder): OrderInterface
Assert::true(
$stateMachine->can(OrderCheckoutTransitions::TRANSITION_COMPLETE),
- sprintf('Order with %s token cannot be completed.', $orderTokenValue)
+ sprintf('Order with %s token cannot be completed.', $orderTokenValue),
);
$stateMachine->apply(OrderCheckoutTransitions::TRANSITION_COMPLETE);
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/ShipShipmentHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/ShipShipmentHandler.php
index 5a52a4cd2db..e2a6f03d46b 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/ShipShipmentHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/ShipShipmentHandler.php
@@ -36,7 +36,7 @@ final class ShipShipmentHandler implements MessageHandlerInterface
public function __construct(
ShipmentRepositoryInterface $shipmentRepository,
FactoryInterface $stateMachineFactory,
- MessageBusInterface $eventBus
+ MessageBusInterface $eventBus,
) {
$this->shipmentRepository = $shipmentRepository;
$this->stateMachineFactory = $stateMachineFactory;
@@ -58,7 +58,7 @@ public function __invoke(ShipShipment $shipShipment): ShipmentInterface
Assert::true(
$stateMachine->can(ShipmentTransitions::TRANSITION_SHIP),
- 'This shipment cannot be completed.'
+ 'This shipment cannot be completed.',
);
$stateMachine->apply(ShipmentTransitions::TRANSITION_SHIP);
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/PickupCartHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/PickupCartHandler.php
index 13689940a98..a555f5e0800 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/PickupCartHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/PickupCartHandler.php
@@ -50,7 +50,7 @@ public function __construct(
ChannelRepositoryInterface $channelRepository,
UserContextInterface $userContext,
ObjectManager $orderManager,
- RandomnessGeneratorInterface $generator
+ RandomnessGeneratorInterface $generator,
) {
$this->cartFactory = $cartFactory;
$this->cartRepository = $cartRepository;
@@ -127,7 +127,7 @@ private function getLocaleCode(?string $localeCode, ChannelInterface $channel):
if (!$this->hasLocaleWithLocaleCode($channel, $localeCode)) {
throw new \InvalidArgumentException(sprintf(
'Cannot pick up cart, locale code "%s" does not exist.',
- $localeCode
+ $localeCode,
));
}
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/RegisterShopUserHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/RegisterShopUserHandler.php
index 7c0d3e90851..e219959e5a4 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/RegisterShopUserHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/RegisterShopUserHandler.php
@@ -48,7 +48,7 @@ public function __construct(
CustomerProviderInterface $customerProvider,
ChannelRepositoryInterface $channelRepository,
GeneratorInterface $tokenGenerator,
- MessageBusInterface $commandBus
+ MessageBusInterface $commandBus,
) {
$this->shopUserFactory = $shopUserFactory;
$this->shopUserManager = $shopUserManager;
@@ -84,7 +84,7 @@ public function __invoke(RegisterShopUser $command): ShopUserInterface
$this->commandBus->dispatch(new SendAccountRegistrationEmail(
$command->email,
$command->localeCode,
- $command->channelCode
+ $command->channelCode,
), [new DispatchAfterCurrentBusStamp()]);
if (!$channel->isAccountVerificationRequired()) {
@@ -99,7 +99,7 @@ public function __invoke(RegisterShopUser $command): ShopUserInterface
$this->commandBus->dispatch(new SendAccountVerificationEmail(
$command->email,
$command->localeCode,
- $command->channelCode
+ $command->channelCode,
), [new DispatchAfterCurrentBusStamp()]);
return $user;
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/RequestResetPasswordTokenHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/RequestResetPasswordTokenHandler.php
index a17ba66fd38..16e38ae7d31 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/RequestResetPasswordTokenHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/RequestResetPasswordTokenHandler.php
@@ -34,7 +34,7 @@ final class RequestResetPasswordTokenHandler implements MessageHandlerInterface
public function __construct(
UserRepositoryInterface $userRepository,
MessageBusInterface $eventBus,
- GeneratorInterface $generator
+ GeneratorInterface $generator,
) {
$this->userRepository = $userRepository;
$this->commandBus = $eventBus;
@@ -53,9 +53,9 @@ public function __invoke(RequestResetPasswordToken $command): void
new SendResetPasswordEmail(
$command->getEmail(),
$command->getChannelCode(),
- $command->getLocaleCode()
+ $command->getLocaleCode(),
),
- [new DispatchAfterCurrentBusStamp()]
+ [new DispatchAfterCurrentBusStamp()],
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/ResendVerificationEmailHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/ResendVerificationEmailHandler.php
index eca0c8af2e4..fcc878497e2 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/ResendVerificationEmailHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/ResendVerificationEmailHandler.php
@@ -35,7 +35,7 @@ final class ResendVerificationEmailHandler implements MessageHandlerInterface
public function __construct(
UserRepositoryInterface $shopUserRepository,
GeneratorInterface $tokenGenerator,
- MessageBusInterface $commandBus
+ MessageBusInterface $commandBus,
) {
$this->shopUserRepository = $shopUserRepository;
$this->tokenGenerator = $tokenGenerator;
@@ -53,7 +53,7 @@ public function __invoke(ResendVerificationEmail $command): void
$this->commandBus->dispatch(new SendAccountVerificationEmail(
$command->email,
$command->localeCode,
- $command->channelCode
+ $command->channelCode,
), [new DispatchAfterCurrentBusStamp()]);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/ResetPasswordHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/ResetPasswordHandler.php
index 336fa49e7c0..4068c4cea53 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/ResetPasswordHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/ResetPasswordHandler.php
@@ -33,7 +33,7 @@ final class ResetPasswordHandler implements MessageHandlerInterface
public function __construct(
UserRepositoryInterface $userRepository,
MetadataInterface $metadata,
- PasswordUpdaterInterface $passwordUpdater
+ PasswordUpdaterInterface $passwordUpdater,
) {
$this->userRepository = $userRepository;
$this->metadata = $metadata;
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/SendAccountRegistrationEmailHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/SendAccountRegistrationEmailHandler.php
index 81c31c3dc6b..a6e3f76c813 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/SendAccountRegistrationEmailHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/SendAccountRegistrationEmailHandler.php
@@ -33,7 +33,7 @@ final class SendAccountRegistrationEmailHandler implements MessageHandlerInterfa
public function __construct(
UserRepositoryInterface $shopUserRepository,
ChannelRepositoryInterface $channelRepository,
- SenderInterface $emailSender
+ SenderInterface $emailSender,
) {
$this->shopUserRepository = $shopUserRepository;
$this->channelRepository = $channelRepository;
@@ -50,7 +50,7 @@ public function __invoke(SendAccountRegistrationEmail $command): void
$this->emailSender->send(
Emails::USER_REGISTRATION,
[$command->shopUserEmail],
- ['user' => $shopUser, 'localeCode' => $command->localeCode, 'channel' => $channel]
+ ['user' => $shopUser, 'localeCode' => $command->localeCode, 'channel' => $channel],
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/SendAccountVerificationEmailHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/SendAccountVerificationEmailHandler.php
index 8ab10f86d12..63b708f1b33 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/SendAccountVerificationEmailHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/SendAccountVerificationEmailHandler.php
@@ -33,7 +33,7 @@ final class SendAccountVerificationEmailHandler implements MessageHandlerInterfa
public function __construct(
UserRepositoryInterface $shopUserRepository,
ChannelRepositoryInterface $channelRepository,
- SenderInterface $emailSender
+ SenderInterface $emailSender,
) {
$this->shopUserRepository = $shopUserRepository;
$this->channelRepository = $channelRepository;
@@ -50,7 +50,7 @@ public function __invoke(SendAccountVerificationEmail $command): void
$this->emailSender->send(
Emails::ACCOUNT_VERIFICATION_TOKEN,
[$command->shopUserEmail],
- ['user' => $shopUser, 'localeCode' => $command->localeCode, 'channel' => $channel]
+ ['user' => $shopUser, 'localeCode' => $command->localeCode, 'channel' => $channel],
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/SendOrderConfirmationHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/SendOrderConfirmationHandler.php
index b6813fca10c..5a21eb88738 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/SendOrderConfirmationHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/SendOrderConfirmationHandler.php
@@ -45,7 +45,7 @@ public function __invoke(SendOrderConfirmation $sendOrderConfirmation): void
'order' => $order,
'channel' => $order->getChannel(),
'localeCode' => $order->getLocaleCode(),
- ]
+ ],
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/SendResetPasswordEmailHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/SendResetPasswordEmailHandler.php
index f53a6488a4b..00060b4819e 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/SendResetPasswordEmailHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/SendResetPasswordEmailHandler.php
@@ -32,7 +32,7 @@ final class SendResetPasswordEmailHandler implements MessageHandlerInterface
public function __construct(
SenderInterface $emailSender,
ChannelRepositoryInterface $channelRepository,
- UserRepositoryInterface $userRepository
+ UserRepositoryInterface $userRepository,
) {
$this->emailSender = $emailSender;
$this->channelRepository = $channelRepository;
@@ -51,7 +51,7 @@ public function __invoke(SendResetPasswordEmail $command)
'user' => $user,
'localeCode' => $command->localeCode(),
'channel' => $channel,
- ]
+ ],
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/SendShipmentConfirmationEmailHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/SendShipmentConfirmationEmailHandler.php
index 4b164e061a3..2b712e017a6 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/SendShipmentConfirmationEmailHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/SendShipmentConfirmationEmailHandler.php
@@ -49,7 +49,7 @@ public function __invoke(SendShipmentConfirmationEmail $sendShipmentConfirmation
'order' => $order,
'channel' => $order->getChannel(),
'localeCode' => $order->getLocaleCode(),
- ]
+ ],
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/VerifyCustomerAccountHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/VerifyCustomerAccountHandler.php
index 9b269e88b77..a757cf1280a 100644
--- a/src/Sylius/Bundle/ApiBundle/CommandHandler/VerifyCustomerAccountHandler.php
+++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/VerifyCustomerAccountHandler.php
@@ -36,7 +36,7 @@ public function __invoke(VerifyCustomerAccount $command): JsonResponse
$user = $this->shopUserRepository->findOneBy(['emailVerificationToken' => $command->token]);
if (null === $user) {
throw new InvalidArgumentException(
- sprintf('There is no shop user with %s email verification token', $command->token)
+ sprintf('There is no shop user with %s email verification token', $command->token),
);
}
diff --git a/src/Sylius/Bundle/ApiBundle/Context/TokenValueBasedCartContext.php b/src/Sylius/Bundle/ApiBundle/Context/TokenValueBasedCartContext.php
index 961f26f03b0..cc4e1d2a21e 100644
--- a/src/Sylius/Bundle/ApiBundle/Context/TokenValueBasedCartContext.php
+++ b/src/Sylius/Bundle/ApiBundle/Context/TokenValueBasedCartContext.php
@@ -32,7 +32,7 @@ final class TokenValueBasedCartContext implements CartContextInterface
public function __construct(
RequestStack $requestStack,
OrderRepositoryInterface $orderRepository,
- string $newApiRoute
+ string $newApiRoute,
) {
$this->requestStack = $requestStack;
$this->orderRepository = $orderRepository;
diff --git a/src/Sylius/Bundle/ApiBundle/Controller/DeleteOrderItemAction.php b/src/Sylius/Bundle/ApiBundle/Controller/DeleteOrderItemAction.php
index 51943010165..3e6015cb085 100644
--- a/src/Sylius/Bundle/ApiBundle/Controller/DeleteOrderItemAction.php
+++ b/src/Sylius/Bundle/ApiBundle/Controller/DeleteOrderItemAction.php
@@ -32,7 +32,7 @@ public function __invoke(Request $request): Response
{
$command = new RemoveItemFromCart(
$request->attributes->get('tokenValue'),
- $request->attributes->get('itemId')
+ $request->attributes->get('itemId'),
);
$this->commandBus->dispatch($command);
diff --git a/src/Sylius/Bundle/ApiBundle/Controller/Payment/GetPaymentConfiguration.php b/src/Sylius/Bundle/ApiBundle/Controller/Payment/GetPaymentConfiguration.php
index 79086fcb86e..4aadb75e82b 100644
--- a/src/Sylius/Bundle/ApiBundle/Controller/Payment/GetPaymentConfiguration.php
+++ b/src/Sylius/Bundle/ApiBundle/Controller/Payment/GetPaymentConfiguration.php
@@ -29,7 +29,7 @@ final class GetPaymentConfiguration
public function __construct(
PaymentRepositoryInterface $paymentRepository,
- CompositePaymentConfigurationProviderInterface $compositePaymentConfigurationProvider
+ CompositePaymentConfigurationProviderInterface $compositePaymentConfigurationProvider,
) {
$this->paymentRepository = $paymentRepository;
$this->compositePaymentConfigurationProvider = $compositePaymentConfigurationProvider;
@@ -40,7 +40,7 @@ public function __invoke(Request $request): JsonResponse
/** @var PaymentInterface|null $payment */
$payment = $this->paymentRepository->findOneByOrderToken(
$request->attributes->get('paymentId'),
- $request->attributes->get('id')
+ $request->attributes->get('id'),
);
Assert::notNull($payment);
diff --git a/src/Sylius/Bundle/ApiBundle/Controller/UploadAvatarImageAction.php b/src/Sylius/Bundle/ApiBundle/Controller/UploadAvatarImageAction.php
index 02414b4719e..b9590ab0ca7 100644
--- a/src/Sylius/Bundle/ApiBundle/Controller/UploadAvatarImageAction.php
+++ b/src/Sylius/Bundle/ApiBundle/Controller/UploadAvatarImageAction.php
@@ -39,7 +39,7 @@ public function __construct(
FactoryInterface $avatarImageFactory,
AvatarImageRepositoryInterface $avatarImageRepository,
ImageUploaderInterface $imageUploader,
- IriConverterInterface $iriConverter
+ IriConverterInterface $iriConverter,
) {
$this->avatarImageFactory = $avatarImageFactory;
$this->avatarImageRepository = $avatarImageRepository;
diff --git a/src/Sylius/Bundle/ApiBundle/DataPersister/AddressDataPersister.php b/src/Sylius/Bundle/ApiBundle/DataPersister/AddressDataPersister.php
index 048cafa37aa..17ca2b83f9b 100644
--- a/src/Sylius/Bundle/ApiBundle/DataPersister/AddressDataPersister.php
+++ b/src/Sylius/Bundle/ApiBundle/DataPersister/AddressDataPersister.php
@@ -29,7 +29,7 @@ final class AddressDataPersister implements ContextAwareDataPersisterInterface
public function __construct(
ContextAwareDataPersisterInterface $decoratedDataPersister,
- UserContextInterface $userContext
+ UserContextInterface $userContext,
) {
$this->decoratedDataPersister = $decoratedDataPersister;
$this->userContext = $userContext;
diff --git a/src/Sylius/Bundle/ApiBundle/DataPersister/AdminUserDataPersister.php b/src/Sylius/Bundle/ApiBundle/DataPersister/AdminUserDataPersister.php
index d2aa32f08fd..9d430c289d1 100644
--- a/src/Sylius/Bundle/ApiBundle/DataPersister/AdminUserDataPersister.php
+++ b/src/Sylius/Bundle/ApiBundle/DataPersister/AdminUserDataPersister.php
@@ -32,7 +32,7 @@ final class AdminUserDataPersister implements ContextAwareDataPersisterInterface
public function __construct(
ContextAwareDataPersisterInterface $decoratedDataPersister,
TokenStorageInterface $tokenStorage,
- PasswordUpdaterInterface $passwordUpdater
+ PasswordUpdaterInterface $passwordUpdater,
) {
$this->decoratedDataPersister = $decoratedDataPersister;
$this->tokenStorage = $tokenStorage;
diff --git a/src/Sylius/Bundle/ApiBundle/DataProvider/CartPaymentMethodsSubresourceDataProvider.php b/src/Sylius/Bundle/ApiBundle/DataProvider/CartPaymentMethodsSubresourceDataProvider.php
index 9d240b0238c..e52ea196578 100644
--- a/src/Sylius/Bundle/ApiBundle/DataProvider/CartPaymentMethodsSubresourceDataProvider.php
+++ b/src/Sylius/Bundle/ApiBundle/DataProvider/CartPaymentMethodsSubresourceDataProvider.php
@@ -35,7 +35,7 @@ final class CartPaymentMethodsSubresourceDataProvider implements RestrictedDataP
public function __construct(
OrderRepositoryInterface $orderRepository,
PaymentRepositoryInterface $paymentRepository,
- PaymentMethodsResolverInterface $paymentMethodsResolver
+ PaymentMethodsResolverInterface $paymentMethodsResolver,
) {
$this->orderRepository = $orderRepository;
$this->paymentRepository = $paymentRepository;
diff --git a/src/Sylius/Bundle/ApiBundle/DataProvider/CartShippingMethodsSubresourceDataProvider.php b/src/Sylius/Bundle/ApiBundle/DataProvider/CartShippingMethodsSubresourceDataProvider.php
index 5a8d8554c6f..e9ab67650d5 100644
--- a/src/Sylius/Bundle/ApiBundle/DataProvider/CartShippingMethodsSubresourceDataProvider.php
+++ b/src/Sylius/Bundle/ApiBundle/DataProvider/CartShippingMethodsSubresourceDataProvider.php
@@ -43,7 +43,7 @@ public function __construct(
ShipmentRepositoryInterface $shipmentRepository,
ShippingMethodsResolverInterface $shippingMethodsResolver,
ServiceRegistryInterface $calculators,
- CartShippingMethodFactoryInterface $cartShippingMethodFactory
+ CartShippingMethodFactoryInterface $cartShippingMethodFactory,
) {
$this->orderRepository = $orderRepository;
$this->shipmentRepository = $shipmentRepository;
@@ -97,7 +97,7 @@ private function getCartShippingMethods(OrderInterface $cart, ShipmentInterface
$cartShippingMethods[] = $this->cartShippingMethodFactory->create(
$shippingMethod,
- $cost
+ $cost,
);
}
diff --git a/src/Sylius/Bundle/ApiBundle/DataProvider/OrderItemUnitItemDataProvider.php b/src/Sylius/Bundle/ApiBundle/DataProvider/OrderItemUnitItemDataProvider.php
index b50add9e182..fed770c8caf 100644
--- a/src/Sylius/Bundle/ApiBundle/DataProvider/OrderItemUnitItemDataProvider.php
+++ b/src/Sylius/Bundle/ApiBundle/DataProvider/OrderItemUnitItemDataProvider.php
@@ -31,7 +31,7 @@ final class OrderItemUnitItemDataProvider implements ItemDataProviderInterface,
public function __construct(
OrderItemUnitRepositoryInterface $orderItemUnitRepository,
- UserContextInterface $userContext
+ UserContextInterface $userContext,
) {
$this->orderItemUnitRepository = $orderItemUnitRepository;
$this->userContext = $userContext;
diff --git a/src/Sylius/Bundle/ApiBundle/DependencyInjection/Compiler/CommandDataTransformerPass.php b/src/Sylius/Bundle/ApiBundle/DependencyInjection/Compiler/CommandDataTransformerPass.php
index 61240a8b191..f90b45f8755 100644
--- a/src/Sylius/Bundle/ApiBundle/DependencyInjection/Compiler/CommandDataTransformerPass.php
+++ b/src/Sylius/Bundle/ApiBundle/DependencyInjection/Compiler/CommandDataTransformerPass.php
@@ -36,7 +36,7 @@ public function process(ContainerBuilder $container)
$container->setDefinition(
'sylius.api.data_transformer.command_aware_input_data_transformer',
- $commandDataTransformersChainDefinition
+ $commandDataTransformersChainDefinition,
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/Doctrine/Filter/ProductVariantOptionValueFilter.php b/src/Sylius/Bundle/ApiBundle/Doctrine/Filter/ProductVariantOptionValueFilter.php
index 44c5329208e..acee0d755c0 100644
--- a/src/Sylius/Bundle/ApiBundle/Doctrine/Filter/ProductVariantOptionValueFilter.php
+++ b/src/Sylius/Bundle/ApiBundle/Doctrine/Filter/ProductVariantOptionValueFilter.php
@@ -33,7 +33,7 @@ public function __construct(
?RequestStack $requestStack = null,
LoggerInterface $logger = null,
array $properties = null,
- NameConverterInterface $nameConverter = null
+ NameConverterInterface $nameConverter = null,
) {
parent::__construct($managerRegistry, $requestStack, $logger, $properties, $nameConverter);
@@ -46,7 +46,7 @@ protected function filterProperty(
QueryBuilder $queryBuilder,
QueryNameGeneratorInterface $queryNameGenerator,
string $resourceClass,
- string $operationName = null
+ string $operationName = null,
): void {
if ($property !== 'optionValues') {
return;
diff --git a/src/Sylius/Bundle/ApiBundle/Doctrine/Filters/ExchangeRateFilter.php b/src/Sylius/Bundle/ApiBundle/Doctrine/Filters/ExchangeRateFilter.php
index a1dfd69f20d..475286b56a5 100644
--- a/src/Sylius/Bundle/ApiBundle/Doctrine/Filters/ExchangeRateFilter.php
+++ b/src/Sylius/Bundle/ApiBundle/Doctrine/Filters/ExchangeRateFilter.php
@@ -26,7 +26,7 @@ protected function filterProperty(
QueryBuilder $queryBuilder,
QueryNameGeneratorInterface $queryNameGenerator,
string $resourceClass,
- string $operationName = null
+ string $operationName = null,
) {
if ($property === 'currencyCode') {
$queryBuilder
diff --git a/src/Sylius/Bundle/ApiBundle/Doctrine/Filters/TranslationOrderNameAndLocaleFilter.php b/src/Sylius/Bundle/ApiBundle/Doctrine/Filters/TranslationOrderNameAndLocaleFilter.php
index c43ba2cc9b3..e7e9f949c6b 100644
--- a/src/Sylius/Bundle/ApiBundle/Doctrine/Filters/TranslationOrderNameAndLocaleFilter.php
+++ b/src/Sylius/Bundle/ApiBundle/Doctrine/Filters/TranslationOrderNameAndLocaleFilter.php
@@ -27,7 +27,7 @@ protected function filterProperty(
QueryBuilder $queryBuilder,
QueryNameGeneratorInterface $queryNameGenerator,
string $resourceClass,
- string $operationName = null
+ string $operationName = null,
): void {
if ('order' === $property) {
if (!isset($value['translation.name'])) {
@@ -43,7 +43,7 @@ protected function filterProperty(
sprintf('%s.translations', $queryBuilder->getRootAliases()[0]),
'translation',
'WITH',
- 'translation.locale = :locale'
+ 'translation.locale = :locale',
)
->orderBy('translation.name', $direction)
->setParameter('locale', $value['localeCode'])
diff --git a/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/AcceptedProductReviewsExtension.php b/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/AcceptedProductReviewsExtension.php
index 92628ae5d74..cf64f146694 100644
--- a/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/AcceptedProductReviewsExtension.php
+++ b/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/AcceptedProductReviewsExtension.php
@@ -33,7 +33,7 @@ public function applyToCollection(
QueryNameGeneratorInterface $queryNameGenerator,
string $resourceClass,
string $operationName = null,
- array $context = []
+ array $context = [],
): void {
if ($this->productReviewClass !== $resourceClass) {
return;
diff --git a/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/AddressesExtension.php b/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/AddressesExtension.php
index 59e7628ddae..58a28386ee6 100644
--- a/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/AddressesExtension.php
+++ b/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/AddressesExtension.php
@@ -38,7 +38,7 @@ public function applyToCollection(
QueryNameGeneratorInterface $queryNameGenerator,
string $resourceClass,
string $operationName = null,
- array $context = []
+ array $context = [],
): void {
if (!is_a($resourceClass, AddressInterface::class, true)) {
return;
diff --git a/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/HideArchivedShippingMethodExtension.php b/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/HideArchivedShippingMethodExtension.php
index 2a0d418edb2..4bcfc28d58f 100644
--- a/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/HideArchivedShippingMethodExtension.php
+++ b/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/HideArchivedShippingMethodExtension.php
@@ -32,7 +32,7 @@ public function applyToCollection(
QueryNameGeneratorInterface $queryNameGenerator,
string $resourceClass,
string $operationName = null,
- array $context = []
+ array $context = [],
): void {
if ($this->shippingMethodClass !== $resourceClass) {
return;
diff --git a/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/OrdersByLoggedInUserExtension.php b/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/OrdersByLoggedInUserExtension.php
index 5ed5c9faffb..f5b2c1f0234 100644
--- a/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/OrdersByLoggedInUserExtension.php
+++ b/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/OrdersByLoggedInUserExtension.php
@@ -38,7 +38,7 @@ public function applyToCollection(
QueryNameGeneratorInterface $queryNameGenerator,
string $resourceClass,
string $operationName = null,
- array $context = []
+ array $context = [],
): void {
if (!is_a($resourceClass, OrderInterface::class, true)) {
return;
diff --git a/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/ProductsByChannelAndLocaleCodeExtension.php b/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/ProductsByChannelAndLocaleCodeExtension.php
index 31b1808e78c..686aa29f9cd 100644
--- a/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/ProductsByChannelAndLocaleCodeExtension.php
+++ b/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/ProductsByChannelAndLocaleCodeExtension.php
@@ -36,7 +36,7 @@ public function applyToCollection(
QueryNameGeneratorInterface $queryNameGenerator,
string $resourceClass,
string $operationName = null,
- array $context = []
+ array $context = [],
): void {
if (!is_a($resourceClass, ProductInterface::class, true)) {
return;
diff --git a/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/ProductsWithEnableFlagExtension.php b/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/ProductsWithEnableFlagExtension.php
index e8ab2510e1e..f33eaf9d80c 100644
--- a/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/ProductsWithEnableFlagExtension.php
+++ b/src/Sylius/Bundle/ApiBundle/Doctrine/QueryCollectionExtension/ProductsWithEnableFlagExtension.php
@@ -34,7 +34,7 @@ public function applyToCollection(
QueryNameGeneratorInterface $queryNameGenerator,
string $resourceClass,
?string $operationName = null,
- array $context = []
+ array $context = [],
): void {
if (!is_a($resourceClass, ProductInterface::class, true)) {
return;
diff --git a/src/Sylius/Bundle/ApiBundle/Doctrine/QueryItemExtension/OrderGetMethodItemExtension.php b/src/Sylius/Bundle/ApiBundle/Doctrine/QueryItemExtension/OrderGetMethodItemExtension.php
index e0b8a7f80cd..4483eff3d61 100644
--- a/src/Sylius/Bundle/ApiBundle/Doctrine/QueryItemExtension/OrderGetMethodItemExtension.php
+++ b/src/Sylius/Bundle/ApiBundle/Doctrine/QueryItemExtension/OrderGetMethodItemExtension.php
@@ -41,7 +41,7 @@ public function applyToItem(
string $resourceClass,
array $identifiers,
string $operationName = null,
- array $context = []
+ array $context = [],
) {
if (!is_a($resourceClass, OrderInterface::class, true)) {
return;
@@ -60,7 +60,7 @@ public function applyToItem(
private function applyToItemForGetMethod(
?UserInterface $user,
QueryBuilder $queryBuilder,
- string $rootAlias
+ string $rootAlias,
): void {
if ($user === null) {
$queryBuilder
diff --git a/src/Sylius/Bundle/ApiBundle/Doctrine/QueryItemExtension/OrderMethodsItemExtension.php b/src/Sylius/Bundle/ApiBundle/Doctrine/QueryItemExtension/OrderMethodsItemExtension.php
index 0b917bc18a6..df43ce1e153 100644
--- a/src/Sylius/Bundle/ApiBundle/Doctrine/QueryItemExtension/OrderMethodsItemExtension.php
+++ b/src/Sylius/Bundle/ApiBundle/Doctrine/QueryItemExtension/OrderMethodsItemExtension.php
@@ -40,7 +40,7 @@ public function applyToItem(
string $resourceClass,
array $identifiers,
string $operationName = null,
- array $context = []
+ array $context = [],
) {
if (!is_a($resourceClass, OrderInterface::class, true)) {
return;
@@ -94,7 +94,7 @@ private function applyForShopUser(
QueryBuilder $queryBuilder,
string $rootAlias,
string $operationName,
- ShopUserInterface $user
+ ShopUserInterface $user,
): void {
$queryBuilder
->andWhere(sprintf('%s.customer = :customer', $rootAlias))
diff --git a/src/Sylius/Bundle/ApiBundle/EventListener/ApiCartBlamerListener.php b/src/Sylius/Bundle/ApiBundle/EventListener/ApiCartBlamerListener.php
index 9e09466c6af..0e26a85a6a2 100644
--- a/src/Sylius/Bundle/ApiBundle/EventListener/ApiCartBlamerListener.php
+++ b/src/Sylius/Bundle/ApiBundle/EventListener/ApiCartBlamerListener.php
@@ -35,7 +35,7 @@ final class ApiCartBlamerListener
public function __construct(
CartContextInterface $cartContext,
SectionProviderInterface $uriBasedSectionContext,
- MessageBusInterface $commandBus
+ MessageBusInterface $commandBus,
) {
$this->cartContext = $cartContext;
$this->uriBasedSectionContext = $uriBasedSectionContext;
diff --git a/src/Sylius/Bundle/ApiBundle/Filter/TaxonFilter.php b/src/Sylius/Bundle/ApiBundle/Filter/TaxonFilter.php
index 6512382cb93..349e5f8ec2b 100644
--- a/src/Sylius/Bundle/ApiBundle/Filter/TaxonFilter.php
+++ b/src/Sylius/Bundle/ApiBundle/Filter/TaxonFilter.php
@@ -38,7 +38,7 @@ public function filterProperty(
QueryNameGeneratorInterface $queryNameGenerator,
string $resourceClass,
string $operationName = null,
- array $context = []
+ array $context = [],
) {
if ($property !== 'taxon') {
return;
diff --git a/src/Sylius/Bundle/ApiBundle/PropertyInfo/Extractor/ReflectionExtractor.php b/src/Sylius/Bundle/ApiBundle/PropertyInfo/Extractor/ReflectionExtractor.php
index 400fef08a17..8381eb01452 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
{
@@ -440,7 +440,7 @@ public function getWriteInfo(string $class, string $property, array $context = [
'the new value must be an array or an instance of \Traversable',
$property,
$reflClass->getName(),
- implode('()", "', [$adderAccessName, $removerAccessName])
+ implode('()", "', [$adderAccessName, $removerAccessName]),
);
}
diff --git a/src/Sylius/Bundle/ApiBundle/Provider/CustomerProvider.php b/src/Sylius/Bundle/ApiBundle/Provider/CustomerProvider.php
index 2f70a692c4a..27dcb26f35c 100644
--- a/src/Sylius/Bundle/ApiBundle/Provider/CustomerProvider.php
+++ b/src/Sylius/Bundle/ApiBundle/Provider/CustomerProvider.php
@@ -30,7 +30,7 @@ final class CustomerProvider implements CustomerProviderInterface
public function __construct(
CanonicalizerInterface $canonicalizer,
FactoryInterface $customerFactory,
- CustomerRepositoryInterface $customerRepository
+ CustomerRepositoryInterface $customerRepository,
) {
$this->canonicalizer = $canonicalizer;
$this->customerFactory = $customerFactory;
diff --git a/src/Sylius/Bundle/ApiBundle/Serializer/AddressDenormalizer.php b/src/Sylius/Bundle/ApiBundle/Serializer/AddressDenormalizer.php
index edde75a637e..b8dca1bf37d 100644
--- a/src/Sylius/Bundle/ApiBundle/Serializer/AddressDenormalizer.php
+++ b/src/Sylius/Bundle/ApiBundle/Serializer/AddressDenormalizer.php
@@ -28,7 +28,7 @@ final class AddressDenormalizer implements ContextAwareDenormalizerInterface
public function __construct(
DenormalizerInterface $objectNormalizer,
string $classType,
- string $interfaceType
+ string $interfaceType,
) {
$this->objectNormalizer = $objectNormalizer;
$this->classType = $classType;
@@ -41,7 +41,7 @@ public function denormalize($data, $type, $format = null, array $context = [])
$data,
$this->classType,
$format,
- $context
+ $context,
);
}
diff --git a/src/Sylius/Bundle/ApiBundle/Serializer/CommandDenormalizer.php b/src/Sylius/Bundle/ApiBundle/Serializer/CommandDenormalizer.php
index fec1ee86c68..669b085b5b4 100644
--- a/src/Sylius/Bundle/ApiBundle/Serializer/CommandDenormalizer.php
+++ b/src/Sylius/Bundle/ApiBundle/Serializer/CommandDenormalizer.php
@@ -64,7 +64,7 @@ private function assertConstructorArgumentsPresence(\ReflectionMethod $construct
if (count($missingFields) > 0) {
throw new MissingConstructorArgumentsException(
- sprintf('Request does not have the following required fields specified: %s.', implode(', ', $missingFields))
+ sprintf('Request does not have the following required fields specified: %s.', implode(', ', $missingFields)),
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/Serializer/CommandFieldItemIriToIdentifierDenormalizer.php b/src/Sylius/Bundle/ApiBundle/Serializer/CommandFieldItemIriToIdentifierDenormalizer.php
index 3e1b7093eb1..3d8c1b0982a 100644
--- a/src/Sylius/Bundle/ApiBundle/Serializer/CommandFieldItemIriToIdentifierDenormalizer.php
+++ b/src/Sylius/Bundle/ApiBundle/Serializer/CommandFieldItemIriToIdentifierDenormalizer.php
@@ -33,7 +33,7 @@ public function __construct(
DenormalizerInterface $objectNormalizer,
ItemIriToIdentifierConverterInterface $itemIriToIdentifierConverter,
CommandAwareInputDataTransformer $commandAwareInputDataTransformer,
- CommandItemIriArgumentToIdentifierMapInterface $commandItemIriArgumentToIdentifierMap
+ CommandItemIriArgumentToIdentifierMapInterface $commandItemIriArgumentToIdentifierMap,
) {
$this->objectNormalizer = $objectNormalizer;
$this->itemIriToIdentifierConverter = $itemIriToIdentifierConverter;
diff --git a/src/Sylius/Bundle/ApiBundle/Serializer/ProductNormalizer.php b/src/Sylius/Bundle/ApiBundle/Serializer/ProductNormalizer.php
index 91c73ed73c8..8c225e70b22 100644
--- a/src/Sylius/Bundle/ApiBundle/Serializer/ProductNormalizer.php
+++ b/src/Sylius/Bundle/ApiBundle/Serializer/ProductNormalizer.php
@@ -25,7 +25,7 @@ final class ProductNormalizer implements ContextAwareNormalizerInterface, Normal
public function __construct(
ProductVariantResolverInterface $defaultProductVariantResolver,
- IriConverterInterface $iriConverter
+ IriConverterInterface $iriConverter,
) {
$this->defaultProductVariantResolver = $defaultProductVariantResolver;
$this->iriConverter = $iriConverter;
diff --git a/src/Sylius/Bundle/ApiBundle/Serializer/ProductVariantNormalizer.php b/src/Sylius/Bundle/ApiBundle/Serializer/ProductVariantNormalizer.php
index 9a2c2bb42cf..7aaab3c3f2a 100644
--- a/src/Sylius/Bundle/ApiBundle/Serializer/ProductVariantNormalizer.php
+++ b/src/Sylius/Bundle/ApiBundle/Serializer/ProductVariantNormalizer.php
@@ -30,7 +30,7 @@ final class ProductVariantNormalizer implements ContextAwareNormalizerInterface,
public function __construct(
ProductVariantPricesCalculatorInterface $priceCalculator,
ChannelContextInterface $channelContext,
- AvailabilityCheckerInterface $availabilityChecker
+ AvailabilityCheckerInterface $availabilityChecker,
) {
$this->priceCalculator = $priceCalculator;
$this->channelContext = $channelContext;
diff --git a/src/Sylius/Bundle/ApiBundle/Tests/ApiPlatform/Bridge/Symfony/Routing/CachedRouteNameResolverTest.php b/src/Sylius/Bundle/ApiBundle/Tests/ApiPlatform/Bridge/Symfony/Routing/CachedRouteNameResolverTest.php
index 72bb3ff2798..752c6fc5cf7 100644
--- a/src/Sylius/Bundle/ApiBundle/Tests/ApiPlatform/Bridge/Symfony/Routing/CachedRouteNameResolverTest.php
+++ b/src/Sylius/Bundle/ApiBundle/Tests/ApiPlatform/Bridge/Symfony/Routing/CachedRouteNameResolverTest.php
@@ -44,16 +44,17 @@ public function it_get_route_name_for_item_route_with_no_matching_route(): void
$decorated = $this->prophesize(RouteNameResolverInterface::class);
$decorated->getRouteName('AppBundle\Entity\User', OperationType::ITEM, [])
->willThrow(
- new InvalidArgumentException('No item route associated with the type "AppBundle\Entity\User".')
+ new InvalidArgumentException('No item route associated with the type "AppBundle\Entity\User".'),
)
- ->shouldBeCalled();
+ ->shouldBeCalled()
+ ;
$pathPrefixProvider = $this->prophesize(PathPrefixProviderInterface::class);
$cachedRouteNameResolver = new CachedRouteNameResolver(
$cacheItemPool->reveal(),
$decorated->reveal(),
- $pathPrefixProvider->reveal()
+ $pathPrefixProvider->reveal(),
);
$cachedRouteNameResolver->getRouteName('AppBundle\Entity\User', OperationType::ITEM);
}
@@ -82,17 +83,17 @@ public function test_get_route_name_forItem_route_on_cache_miss(): void
$cachedRouteNameResolver = new CachedRouteNameResolver(
$cacheItemPool->reveal(),
$decorated->reveal(),
- $pathPrefixProvider->reveal()
+ $pathPrefixProvider->reveal(),
);
$this->assertSame(
'certain_item_route',
- $cachedRouteNameResolver->getRouteName('AppBundle\Entity\User', false)
+ $cachedRouteNameResolver->getRouteName('AppBundle\Entity\User', false),
);
$this->assertSame(
'certain_item_route',
$cachedRouteNameResolver->getRouteName('AppBundle\Entity\User', false),
- 'Trigger the local cache'
+ 'Trigger the local cache',
);
}
@@ -117,23 +118,23 @@ public function it_get_route_name_for_item_route_on_cache_hit(): void
$cachedRouteNameResolver = new CachedRouteNameResolver(
$cacheItemPool->reveal(),
$decorated->reveal(),
- $pathPrefixProvider->reveal()
+ $pathPrefixProvider->reveal(),
);
$this->assertSame(
'certain_item_route',
$cachedRouteNameResolver->getRouteName(
'AppBundle\Entity\User',
- OperationType::ITEM
- )
+ OperationType::ITEM,
+ ),
);
$this->assertSame(
'certain_item_route',
$cachedRouteNameResolver->getRouteName(
'AppBundle\Entity\User',
- OperationType::ITEM
+ OperationType::ITEM,
),
- 'Trigger the local cache'
+ 'Trigger the local cache',
);
}
@@ -157,8 +158,8 @@ public function get_route_name_for_collection_route_with_no_matching_route(): vo
->getRouteName('AppBundle\Entity\User', OperationType::COLLECTION, [])
->willThrow(
new InvalidArgumentException(
- 'No collection route associated with the type "AppBundle\Entity\User".'
- )
+ 'No collection route associated with the type "AppBundle\Entity\User".',
+ ),
)
->shouldBeCalled()
;
@@ -168,11 +169,11 @@ public function get_route_name_for_collection_route_with_no_matching_route(): vo
$cachedRouteNameResolver = new CachedRouteNameResolver(
$cacheItemPool->reveal(),
$decorated->reveal(),
- $pathPrefixProvider->reveal()
+ $pathPrefixProvider->reveal(),
);
$cachedRouteNameResolver->getRouteName(
'AppBundle\Entity\User',
- OperationType::COLLECTION
+ OperationType::COLLECTION,
);
}
@@ -200,17 +201,17 @@ public function get_route_name_for_collection_route_on_cache_miss(): void
$cachedRouteNameResolver = new CachedRouteNameResolver(
$cacheItemPool->reveal(),
$decorated->reveal(),
- $pathPrefixProvider->reveal()
+ $pathPrefixProvider->reveal(),
);
$this->assertSame(
'certain_collection_route',
- $cachedRouteNameResolver->getRouteName('AppBundle\Entity\User', true)
+ $cachedRouteNameResolver->getRouteName('AppBundle\Entity\User', true),
);
$this->assertSame(
'certain_collection_route',
$cachedRouteNameResolver->getRouteName('AppBundle\Entity\User', true),
- 'Trigger the local cache'
+ 'Trigger the local cache',
);
}
@@ -235,23 +236,23 @@ public function get_route_name_for_collection_route_on_cache_hit(): void
$cachedRouteNameResolver = new CachedRouteNameResolver(
$cacheItemPool->reveal(),
$decorated->reveal(),
- $pathPrefixProvider->reveal()
+ $pathPrefixProvider->reveal(),
);
$this->assertSame(
'certain_collection_route',
$cachedRouteNameResolver->getRouteName(
'AppBundle\Entity\User',
- OperationType::COLLECTION
- )
+ OperationType::COLLECTION,
+ ),
);
$this->assertSame(
'certain_collection_route',
$cachedRouteNameResolver->getRouteName(
'AppBundle\Entity\User',
- OperationType::COLLECTION
+ OperationType::COLLECTION,
),
- 'Trigger the local cache'
+ 'Trigger the local cache',
);
}
@@ -264,7 +265,8 @@ public function get_route_name_with_cache_item_throws_cache_exception(): void
$cacheItemPool
->getItem(Argument::type('string'))
->shouldBeCalledTimes(1)
- ->willThrow(new CacheException());
+ ->willThrow(new CacheException())
+ ;
$decorated = $this->prophesize(RouteNameResolverInterface::class);
$decorated
@@ -277,23 +279,23 @@ public function get_route_name_with_cache_item_throws_cache_exception(): void
$cachedRouteNameResolver = new CachedRouteNameResolver(
$cacheItemPool->reveal(),
$decorated->reveal(),
- $pathPrefixProvider->reveal()
+ $pathPrefixProvider->reveal(),
);
$this->assertSame(
'certain_item_route',
$cachedRouteNameResolver->getRouteName(
'AppBundle\Entity\User',
- OperationType::ITEM
- )
+ OperationType::ITEM,
+ ),
);
$this->assertSame(
'certain_item_route',
$cachedRouteNameResolver->getRouteName(
'AppBundle\Entity\User',
- OperationType::ITEM
+ OperationType::ITEM,
),
- 'Trigger the local cache'
+ 'Trigger the local cache',
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendAccountRegistrationEmailHandlerTest.php b/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendAccountRegistrationEmailHandlerTest.php
index e032d92935a..4677b17e561 100644
--- a/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendAccountRegistrationEmailHandlerTest.php
+++ b/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendAccountRegistrationEmailHandlerTest.php
@@ -65,21 +65,21 @@ public function it_sends_account_registration_email(): void
$sendAccountRegistrationEmailHandler = new SendAccountRegistrationEmailHandler(
$userRepository->reveal(),
$channelRepository->reveal(),
- $emailSender
+ $emailSender,
);
$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'));
self::assertTrue($emailChecker->hasMessageTo(
$translator->trans('sylius.email.user_registration.start_shopping', [], null, 'en_US'),
- 'user@example.com'
+ 'user@example.com',
));
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendAccountVerificationEmailHandlerTest.php b/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendAccountVerificationEmailHandlerTest.php
index 6674b44f578..62439369701 100644
--- a/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendAccountVerificationEmailHandlerTest.php
+++ b/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendAccountVerificationEmailHandlerTest.php
@@ -65,21 +65,21 @@ public function it_sends_account_verification_token_email(): void
$sendAccountVerificationEmailHandler = new SendAccountVerificationEmailHandler(
$userRepository->reveal(),
$channelRepository->reveal(),
- $emailSender
+ $emailSender,
);
$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'));
self::assertTrue($emailChecker->hasMessageTo(
$translator->trans('sylius.email.verification_token.message', [], null, 'en_US'),
- 'user@example.com'
+ 'user@example.com',
));
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendOrderConfirmationEmailHandlerTest.php b/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendOrderConfirmationEmailHandlerTest.php
index 247dfadcf4e..77d3e5cfc38 100644
--- a/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendOrderConfirmationEmailHandlerTest.php
+++ b/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendOrderConfirmationEmailHandlerTest.php
@@ -68,7 +68,7 @@ public function it_sends_order_confirmation_email(): void
$sendOrderConfirmationEmailHandler = new SendOrderConfirmationHandler(
$emailSender,
- $orderRepository->reveal()
+ $orderRepository->reveal(),
);
$sendOrderConfirmationEmailHandler(new SendOrderConfirmation('TOKEN'));
@@ -79,9 +79,9 @@ public function it_sends_order_confirmation_email(): void
'%s %s %s',
$translator->trans('sylius.email.order_confirmation.your_order_number', [], null, 'pl_PL'),
'#000001',
- $translator->trans('sylius.email.order_confirmation.has_been_successfully_placed', [], null, 'pl_PL')
+ $translator->trans('sylius.email.order_confirmation.has_been_successfully_placed', [], null, 'pl_PL'),
),
- 'johnny.bravo@email.com'
+ 'johnny.bravo@email.com',
));
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendResetPasswordEmailHandlerTest.php b/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendResetPasswordEmailHandlerTest.php
index 2884bf3b522..0e04ebe2b0a 100644
--- a/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendResetPasswordEmailHandlerTest.php
+++ b/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/SendResetPasswordEmailHandlerTest.php
@@ -65,19 +65,19 @@ public function it_sends_password_reset_token_email(): void
$resetPasswordEmailHandler = new SendResetPasswordEmailHandler(
$emailSender,
$channelRepository->reveal(),
- $userRepository->reveal()
+ $userRepository->reveal(),
);
$resetPasswordEmailHandler(new SendResetPasswordEmail(
'user@example.com',
'CHANNEL_CODE',
- 'en_US'
+ 'en_US',
));
self::assertSame(1, $emailChecker->countMessagesTo('user@example.com'));
self::assertTrue($emailChecker->hasMessageTo(
$translator->trans('sylius.email.password_reset.to_reset_your_password_token', [], null, 'en_US'),
- 'user@example.com'
+ 'user@example.com',
));
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/Tests/DependencyInjection/Compiler/CommandDataTransformerPassTest.php b/src/Sylius/Bundle/ApiBundle/Tests/DependencyInjection/Compiler/CommandDataTransformerPassTest.php
index 3ed53b80c94..c58e0ae8e8a 100644
--- a/src/Sylius/Bundle/ApiBundle/Tests/DependencyInjection/Compiler/CommandDataTransformerPassTest.php
+++ b/src/Sylius/Bundle/ApiBundle/Tests/DependencyInjection/Compiler/CommandDataTransformerPassTest.php
@@ -27,12 +27,12 @@ public function it_collects_tagged_command_data_transformer_services(): void
{
$this->setDefinition(
'sylius.api.command_data_transformer.service.first',
- (new Definition())->addTag('sylius.api.command_data_transformer')
+ (new Definition())->addTag('sylius.api.command_data_transformer'),
);
$this->setDefinition(
'sylius.api.command_data_transformer.service.second',
- (new Definition())->addTag('sylius.api.command_data_transformer')
+ (new Definition())->addTag('sylius.api.command_data_transformer'),
);
$this->compile();
@@ -40,13 +40,13 @@ public function it_collects_tagged_command_data_transformer_services(): void
$this->assertContainerBuilderHasServiceDefinitionWithArgument(
'sylius.api.data_transformer.command_aware_input_data_transformer',
0,
- 'sylius.api.command_data_transformer.service.first'
+ 'sylius.api.command_data_transformer.service.first',
);
$this->assertContainerBuilderHasServiceDefinitionWithArgument(
'sylius.api.data_transformer.command_aware_input_data_transformer',
1,
- 'sylius.api.command_data_transformer.service.second'
+ 'sylius.api.command_data_transformer.service.second',
);
}
diff --git a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/AccountVerificationTokenEligibilityValidator.php b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/AccountVerificationTokenEligibilityValidator.php
index eb63b9d865e..fab1464a3fc 100644
--- a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/AccountVerificationTokenEligibilityValidator.php
+++ b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/AccountVerificationTokenEligibilityValidator.php
@@ -44,7 +44,7 @@ public function validate($value, Constraint $constraint)
if (null === $user) {
$this->context->addViolation(
$constraint->message,
- ['%verificationToken%' => $value->token]
+ ['%verificationToken%' => $value->token],
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/AddingEligibleProductVariantToCartValidator.php b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/AddingEligibleProductVariantToCartValidator.php
index 838e8d93e5d..77657fe58f6 100644
--- a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/AddingEligibleProductVariantToCartValidator.php
+++ b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/AddingEligibleProductVariantToCartValidator.php
@@ -36,7 +36,7 @@ final class AddingEligibleProductVariantToCartValidator extends ConstraintValida
public function __construct(
ProductVariantRepositoryInterface $productVariantRepository,
OrderRepositoryInterface $orderRepository,
- AvailabilityCheckerInterface $availabilityChecker
+ AvailabilityCheckerInterface $availabilityChecker,
) {
$this->productVariantRepository = $productVariantRepository;
$this->orderRepository = $orderRepository;
@@ -56,7 +56,7 @@ public function validate($value, Constraint $constraint)
if ($productVariant === null) {
$this->context->addViolation(
$constraint->productVariantNotExistMessage,
- ['%productVariantCode%' => $value->productVariantCode]
+ ['%productVariantCode%' => $value->productVariantCode],
);
return;
@@ -67,7 +67,7 @@ public function validate($value, Constraint $constraint)
if (!$product->isEnabled()) {
$this->context->addViolation(
$constraint->productNotExistMessage,
- ['%productName%' => $product->getName()]
+ ['%productName%' => $product->getName()],
);
return;
@@ -76,7 +76,7 @@ public function validate($value, Constraint $constraint)
if (!$productVariant->isEnabled()) {
$this->context->addViolation(
$constraint->productVariantNotExistMessage,
- ['%productVariantCode%' => $productVariant->getCode()]
+ ['%productVariantCode%' => $productVariant->getCode()],
);
return;
@@ -88,11 +88,11 @@ public function validate($value, Constraint $constraint)
if (!$this->availabilityChecker->isStockSufficient(
$productVariant,
- $value->quantity + $this->getExistingCartItemQuantityFromCart($cart, $productVariant)
+ $value->quantity + $this->getExistingCartItemQuantityFromCart($cart, $productVariant),
)) {
$this->context->addViolation(
$constraint->productVariantNotSufficient,
- ['%productVariantCode%' => $productVariant->getCode()]
+ ['%productVariantCode%' => $productVariant->getCode()],
);
return;
@@ -104,7 +104,7 @@ public function validate($value, Constraint $constraint)
if (!$product->hasChannel($channel)) {
$this->context->addViolation(
$constraint->productNotExistMessage,
- ['%productName%' => $product->getName()]
+ ['%productName%' => $product->getName()],
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/ChangedItemQuantityInCartValidator.php b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/ChangedItemQuantityInCartValidator.php
index 5a8070f04f3..598b9d714d4 100644
--- a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/ChangedItemQuantityInCartValidator.php
+++ b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/ChangedItemQuantityInCartValidator.php
@@ -35,7 +35,7 @@ final class ChangedItemQuantityInCartValidator extends ConstraintValidator
public function __construct(
RepositoryInterface $orderItemRepository,
OrderRepositoryInterface $orderRepository,
- AvailabilityCheckerInterface $availabilityChecker
+ AvailabilityCheckerInterface $availabilityChecker,
) {
$this->orderItemRepository = $orderItemRepository;
$this->orderRepository = $orderRepository;
@@ -58,7 +58,7 @@ public function validate($value, Constraint $constraint)
if ($productVariant === null) {
$this->context->addViolation(
$constraint->productVariantNotLongerAvailable,
- ['%productVariantName%' => $orderItem->getVariantName()]
+ ['%productVariantName%' => $orderItem->getVariantName()],
);
return;
@@ -71,7 +71,7 @@ public function validate($value, Constraint $constraint)
if (!$product->isEnabled()) {
$this->context->addViolation(
$constraint->productNotExistMessage,
- ['%productName%' => $product->getName()]
+ ['%productName%' => $product->getName()],
);
return;
@@ -80,7 +80,7 @@ public function validate($value, Constraint $constraint)
if (!$productVariant->isEnabled()) {
$this->context->addViolation(
$constraint->productVariantNotLongerAvailable,
- ['%productVariantName%' => $orderItem->getVariantName()]
+ ['%productVariantName%' => $orderItem->getVariantName()],
);
return;
@@ -89,7 +89,7 @@ public function validate($value, Constraint $constraint)
if (!$this->availabilityChecker->isStockSufficient($productVariant, $value->quantity)) {
$this->context->addViolation(
$constraint->productVariantNotSufficient,
- ['%productVariantCode%' => $productVariantCode]
+ ['%productVariantCode%' => $productVariantCode],
);
return;
@@ -104,7 +104,7 @@ public function validate($value, Constraint $constraint)
if (!$product->hasChannel($channel)) {
$this->context->addViolation(
$constraint->productNotExistMessage,
- ['%productName%' => $product->getName()]
+ ['%productName%' => $product->getName()],
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/ChosenPaymentMethodEligibilityValidator.php b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/ChosenPaymentMethodEligibilityValidator.php
index 1d857ca9f8a..93e8fcdb848 100644
--- a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/ChosenPaymentMethodEligibilityValidator.php
+++ b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/ChosenPaymentMethodEligibilityValidator.php
@@ -34,7 +34,7 @@ final class ChosenPaymentMethodEligibilityValidator extends ConstraintValidator
public function __construct(
PaymentRepositoryInterface $paymentRepository,
PaymentMethodRepositoryInterface $paymentMethodRepository,
- PaymentMethodsResolverInterface $paymentMethodsResolver
+ PaymentMethodsResolverInterface $paymentMethodsResolver,
) {
$this->paymentRepository = $paymentRepository;
$this->paymentMethodRepository = $paymentMethodRepository;
diff --git a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/ChosenShippingMethodEligibilityValidator.php b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/ChosenShippingMethodEligibilityValidator.php
index a86b31c4cfb..51fb9fa65cb 100644
--- a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/ChosenShippingMethodEligibilityValidator.php
+++ b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/ChosenShippingMethodEligibilityValidator.php
@@ -35,7 +35,7 @@ final class ChosenShippingMethodEligibilityValidator extends ConstraintValidator
public function __construct(
ShipmentRepositoryInterface $shipmentRepository,
ShippingMethodRepositoryInterface $shippingMethodRepository,
- ShippingMethodsResolverInterface $shippingMethodsResolver
+ ShippingMethodsResolverInterface $shippingMethodsResolver,
) {
$this->shipmentRepository = $shipmentRepository;
$this->shippingMethodRepository = $shippingMethodRepository;
diff --git a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/CorrectOrderAddressValidator.php b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/CorrectOrderAddressValidator.php
index e653c0bcf38..8305ed35286 100644
--- a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/CorrectOrderAddressValidator.php
+++ b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/CorrectOrderAddressValidator.php
@@ -53,7 +53,7 @@ private function validateAddress(?AddressInterface $address, CorrectOrderAddress
if ($countryCode === null) {
$this->context->addViolation(
- $constraint->addressWithoutCountryCodeCanNotExistMessage
+ $constraint->addressWithoutCountryCodeCanNotExistMessage,
);
return;
@@ -65,7 +65,7 @@ private function validateAddress(?AddressInterface $address, CorrectOrderAddress
if ($country === null) {
$this->context->addViolation(
$constraint->countryCodeNotExistMessage,
- ['%countryCode%' => $countryCode]
+ ['%countryCode%' => $countryCode],
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/OrderItemAvailabilityValidator.php b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/OrderItemAvailabilityValidator.php
index 9c6d83a8ccd..f296b99173e 100644
--- a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/OrderItemAvailabilityValidator.php
+++ b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/OrderItemAvailabilityValidator.php
@@ -31,7 +31,7 @@ final class OrderItemAvailabilityValidator extends ConstraintValidator
public function __construct(
OrderRepositoryInterface $orderRepository,
- AvailabilityCheckerInterface $availabilityChecker
+ AvailabilityCheckerInterface $availabilityChecker,
) {
$this->orderRepository = $orderRepository;
$this->availabilityChecker = $availabilityChecker;
@@ -55,7 +55,7 @@ public function validate($value, Constraint $constraint)
if (!$this->availabilityChecker->isStockSufficient($variant, $orderItem->getQuantity())) {
$this->context->addViolation(
$constraint->message,
- ['%productVariantName%' => $variant->getName()]
+ ['%productVariantName%' => $variant->getName()],
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/OrderPaymentMethodEligibilityValidator.php b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/OrderPaymentMethodEligibilityValidator.php
index 701d568d583..c02158abed1 100644
--- a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/OrderPaymentMethodEligibilityValidator.php
+++ b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/OrderPaymentMethodEligibilityValidator.php
@@ -46,7 +46,7 @@ public function validate($value, Constraint $constraint): void
if (!$payment->getMethod()->isEnabled()) {
$this->context->addViolation(
$constraint->message,
- ['%paymentMethodName%' => $payment->getMethod()->getName()]
+ ['%paymentMethodName%' => $payment->getMethod()->getName()],
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/OrderProductEligibilityValidator.php b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/OrderProductEligibilityValidator.php
index 78a65547bee..3cacfe45708 100644
--- a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/OrderProductEligibilityValidator.php
+++ b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/OrderProductEligibilityValidator.php
@@ -53,12 +53,12 @@ public function validate($value, Constraint $constraint): void
if (!$orderItem->getVariant()->isEnabled()) {
$this->context->addViolation(
$constraint->message,
- ['%productName%' => $orderItem->getVariant()->getName()]
+ ['%productName%' => $orderItem->getVariant()->getName()],
);
} elseif (!$orderItem->getProduct()->isEnabled()) {
$this->context->addViolation(
$constraint->message,
- ['%productName%' => $orderItem->getProduct()->getName()]
+ ['%productName%' => $orderItem->getProduct()->getName()],
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/OrderShippingMethodEligibilityValidator.php b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/OrderShippingMethodEligibilityValidator.php
index d0770f0a260..090eb3a08c0 100644
--- a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/OrderShippingMethodEligibilityValidator.php
+++ b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/OrderShippingMethodEligibilityValidator.php
@@ -32,7 +32,7 @@ final class OrderShippingMethodEligibilityValidator extends ConstraintValidator
public function __construct(
OrderRepositoryInterface $orderRepository,
- ShippingMethodEligibilityCheckerInterface $eligibilityChecker
+ ShippingMethodEligibilityCheckerInterface $eligibilityChecker,
) {
$this->orderRepository = $orderRepository;
$this->eligibilityChecker = $eligibilityChecker;
@@ -58,7 +58,7 @@ public function validate($value, Constraint $constraint)
if (!$this->eligibilityChecker->isEligible($shipment, $shippingMethod)) {
$this->context->addViolation(
$constraint->message,
- ['%shippingMethodName%' => $shippingMethod->getName()]
+ ['%shippingMethodName%' => $shippingMethod->getName()],
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/PromotionCouponEligibilityValidator.php b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/PromotionCouponEligibilityValidator.php
index 6a77a55bc9e..463b0562a30 100644
--- a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/PromotionCouponEligibilityValidator.php
+++ b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/PromotionCouponEligibilityValidator.php
@@ -39,7 +39,7 @@ public function __construct(
PromotionCouponRepositoryInterface $promotionCouponRepository,
OrderRepositoryInterface $orderRepository,
PromotionEligibilityCheckerInterface $promotionChecker,
- PromotionCouponEligibilityCheckerInterface $promotionCouponChecker
+ PromotionCouponEligibilityCheckerInterface $promotionCouponChecker,
) {
$this->promotionCouponRepository = $promotionCouponRepository;
$this->orderRepository = $orderRepository;
diff --git a/src/Sylius/Bundle/ApiBundle/View/Factory/CartShippingMethodFactory.php b/src/Sylius/Bundle/ApiBundle/View/Factory/CartShippingMethodFactory.php
index 313889ad4ca..ed30a6ad75c 100644
--- a/src/Sylius/Bundle/ApiBundle/View/Factory/CartShippingMethodFactory.php
+++ b/src/Sylius/Bundle/ApiBundle/View/Factory/CartShippingMethodFactory.php
@@ -22,7 +22,7 @@ final class CartShippingMethodFactory implements CartShippingMethodFactoryInterf
{
public function create(
ShippingMethodInterface $shippingMethod,
- int $cost
+ int $cost,
): CartShippingMethodInterface {
return new CartShippingMethod($shippingMethod, $cost);
}
diff --git a/src/Sylius/Bundle/ApiBundle/View/Factory/CartShippingMethodFactoryInterface.php b/src/Sylius/Bundle/ApiBundle/View/Factory/CartShippingMethodFactoryInterface.php
index cc8c423ee7e..e09916ca1d2 100644
--- a/src/Sylius/Bundle/ApiBundle/View/Factory/CartShippingMethodFactoryInterface.php
+++ b/src/Sylius/Bundle/ApiBundle/View/Factory/CartShippingMethodFactoryInterface.php
@@ -21,6 +21,6 @@ interface CartShippingMethodFactoryInterface
{
public function create(
ShippingMethodInterface $shippingMethod,
- int $cost
+ int $cost,
): CartShippingMethodInterface;
}
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Applicator/OrderStateMachineTransitionApplicatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Applicator/OrderStateMachineTransitionApplicatorSpec.php
index cd6969cfd76..4af1444f734 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Applicator/OrderStateMachineTransitionApplicatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Applicator/OrderStateMachineTransitionApplicatorSpec.php
@@ -29,7 +29,7 @@ function let(StateMachineFactoryInterface $stateMachineFactory)
function it_cancels_order(
StateMachineFactoryInterface $stateMachineFactory,
OrderInterface $order,
- StateMachine $stateMachine
+ StateMachine $stateMachine,
): void {
$stateMachineFactory->get($order, OrderTransitions::GRAPH)->willReturn($stateMachine);
$stateMachine->apply(OrderTransitions::TRANSITION_CANCEL)->shouldBeCalled();
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Applicator/PaymentStateMachineTransitionApplicatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Applicator/PaymentStateMachineTransitionApplicatorSpec.php
index 50ecac573ca..7e321609627 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Applicator/PaymentStateMachineTransitionApplicatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Applicator/PaymentStateMachineTransitionApplicatorSpec.php
@@ -29,7 +29,7 @@ function let(StateMachineFactoryInterface $stateMachineFactory)
function it_completes_payment(
StateMachineFactoryInterface $stateMachineFactory,
PaymentInterface $payment,
- StateMachine $stateMachine
+ StateMachine $stateMachine,
): void {
$stateMachineFactory->get($payment, PaymentTransitions::GRAPH)->willReturn($stateMachine);
$stateMachine->apply(PaymentTransitions::TRANSITION_COMPLETE)->shouldBeCalled();
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Applicator/ProductReviewStateMachineTransitionApplicatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Applicator/ProductReviewStateMachineTransitionApplicatorSpec.php
index 5f2474eebf5..ecf9dd0a7f1 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Applicator/ProductReviewStateMachineTransitionApplicatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Applicator/ProductReviewStateMachineTransitionApplicatorSpec.php
@@ -29,7 +29,7 @@ function let(StateMachineFactoryInterface $stateMachineFactory)
public function it_accepts_product_review(
StateMachineFactoryInterface $stateMachineFactory,
ReviewInterface $review,
- StateMachine $stateMachine
+ StateMachine $stateMachine,
): void {
$stateMachineFactory->get($review, ProductReviewTransitions::GRAPH)->willReturn($stateMachine);
$stateMachine->apply(ProductReviewTransitions::TRANSITION_ACCEPT)->shouldBeCalled();
@@ -40,7 +40,7 @@ public function it_accepts_product_review(
public function it_rejects_product_review(
StateMachineFactoryInterface $stateMachineFactory,
ReviewInterface $review,
- StateMachine $stateMachine
+ StateMachine $stateMachine,
): void {
$stateMachineFactory->get($review, ProductReviewTransitions::GRAPH)->willReturn($stateMachine);
$stateMachine->apply(ProductReviewTransitions::TRANSITION_REJECT)->shouldBeCalled();
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Applicator/ShipmentStateMachineTransitionApplicatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Applicator/ShipmentStateMachineTransitionApplicatorSpec.php
index d6373b040a2..ffb0ce1540a 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Applicator/ShipmentStateMachineTransitionApplicatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Applicator/ShipmentStateMachineTransitionApplicatorSpec.php
@@ -32,7 +32,7 @@ function it_ships_shipment_and_sends_emails(
StateMachineFactoryInterface $stateMachineFactory,
ShipmentInterface $shipment,
StateMachine $stateMachine,
- EventDispatcherInterface $eventDispatcher
+ EventDispatcherInterface $eventDispatcher,
): void {
$stateMachineFactory->get($shipment, ShipmentTransitions::GRAPH)->willReturn($stateMachine);
$stateMachine->apply(ShipmentTransitions::TRANSITION_SHIP)->shouldBeCalled();
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Changer/PaymentMethodChangerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Changer/PaymentMethodChangerSpec.php
index 0b5df5bfb13..d44c849442f 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Changer/PaymentMethodChangerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Changer/PaymentMethodChangerSpec.php
@@ -24,7 +24,7 @@ final class PaymentMethodChangerSpec extends ObjectBehavior
{
function let(
PaymentRepositoryInterface $paymentRepository,
- PaymentMethodRepositoryInterface $paymentMethodRepository
+ PaymentMethodRepositoryInterface $paymentMethodRepository,
): void {
$this->beConstructedWith($paymentRepository, $paymentMethodRepository);
}
@@ -32,7 +32,7 @@ function let(
function it_throws_an_exception_if_payment_method_with_given_code_has_not_been_found(
PaymentRepositoryInterface $paymentRepository,
PaymentMethodRepositoryInterface $paymentMethodRepository,
- OrderInterface $order
+ OrderInterface $order,
): void {
$paymentMethodRepository->findOneBy(['code' => 'CASH_ON_DELIVERY_METHOD'])->willReturn(null);
@@ -50,7 +50,7 @@ function it_throws_an_exception_if_payment_with_given_id_has_not_been_found(
PaymentRepositoryInterface $paymentRepository,
PaymentMethodRepositoryInterface $paymentMethodRepository,
PaymentMethodInterface $paymentMethod,
- OrderInterface $order
+ OrderInterface $order,
): void {
$paymentMethodRepository->findOneBy(['code' => 'CASH_ON_DELIVERY_METHOD'])->willReturn($paymentMethod);
@@ -71,7 +71,7 @@ function it_throws_an_exception_if_payment_is_in_different_state_than_new(
PaymentMethodRepositoryInterface $paymentMethodRepository,
PaymentMethodInterface $paymentMethod,
PaymentInterface $payment,
- OrderInterface $order
+ OrderInterface $order,
): void {
$paymentMethodRepository->findOneBy(['code' => 'CASH_ON_DELIVERY_METHOD'])->willReturn($paymentMethod);
@@ -94,7 +94,7 @@ function it_changes_payment_method_to_specified_payment(
PaymentMethodRepositoryInterface $paymentMethodRepository,
PaymentMethodInterface $paymentMethod,
PaymentInterface $payment,
- OrderInterface $order
+ OrderInterface $order,
): void {
$paymentMethodRepository->findOneBy(['code' => 'CASH_ON_DELIVERY_METHOD'])->willReturn($paymentMethod);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Account/ChangePaymentMethodHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Account/ChangePaymentMethodHandlerSpec.php
index 8a26149a0ee..31d11bd12fe 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Account/ChangePaymentMethodHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Account/ChangePaymentMethodHandlerSpec.php
@@ -24,14 +24,14 @@ final class ChangePaymentMethodHandlerSpec extends ObjectBehavior
{
function let(
PaymentMethodChangerInterface $paymentMethodChanger,
- OrderRepositoryInterface $orderRepository
+ OrderRepositoryInterface $orderRepository,
): void {
$this->beConstructedWith($paymentMethodChanger, $orderRepository);
}
function it_throws_an_exception_if_order_with_given_token_has_not_been_found(
OrderRepositoryInterface $orderRepository,
- PaymentMethodChangerInterface $paymentMethodChanger
+ PaymentMethodChangerInterface $paymentMethodChanger,
): void {
$changePaymentMethod = new ChangePaymentMethod('CASH_ON_DELIVERY_METHOD');
$changePaymentMethod->setOrderTokenValue('ORDERTOKEN');
@@ -43,7 +43,7 @@ function it_throws_an_exception_if_order_with_given_token_has_not_been_found(
->changePaymentMethod(
'CASH_ON_DELIVERY_METHOD',
'123',
- Argument::type(OrderInterface::class)
+ Argument::type(OrderInterface::class),
)
->shouldNotBeCalled()
;
@@ -57,7 +57,7 @@ function it_throws_an_exception_if_order_with_given_token_has_not_been_found(
function it_assigns_shop_user_s_change_payment_method_to_specified_payment_after_checkout_completed(
PaymentMethodChangerInterface $paymentMethodChanger,
OrderRepositoryInterface $orderRepository,
- OrderInterface $order
+ OrderInterface $order,
): void {
$changePaymentMethod = new ChangePaymentMethod('CASH_ON_DELIVERY_METHOD');
$changePaymentMethod->setOrderTokenValue('ORDERTOKEN');
@@ -69,7 +69,7 @@ function it_assigns_shop_user_s_change_payment_method_to_specified_payment_after
->changePaymentMethod(
'CASH_ON_DELIVERY_METHOD',
'123',
- $order
+ $order,
)
->willReturn($order)
;
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/AddProductReviewHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/AddProductReviewHandlerSpec.php
index cb494fcb108..4c0aeba3ad5 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/AddProductReviewHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/AddProductReviewHandlerSpec.php
@@ -29,13 +29,13 @@ function let(
FactoryInterface $productReviewFactory,
RepositoryInterface $productReviewRepository,
ProductRepositoryInterface $productRepository,
- CustomerProviderInterface $customerProvider
+ CustomerProviderInterface $customerProvider,
): void {
$this->beConstructedWith(
$productReviewFactory,
$productReviewRepository,
$productRepository,
- $customerProvider
+ $customerProvider,
);
}
@@ -46,7 +46,7 @@ function it_adds_product_review(
CustomerProviderInterface $customerProvider,
ProductInterface $product,
CustomerInterface $customer,
- ReviewInterface $review
+ ReviewInterface $review,
): void {
$productRepository->findOneByCode('winter_cap')->willReturn($product);
@@ -69,13 +69,13 @@ function it_adds_product_review(
5,
'Really good stuff',
'winter_cap',
- 'mark@example.com'
+ 'mark@example.com',
));
}
function it_throws_an_exception_if_email_has_not_been_found(
ProductRepositoryInterface $productRepository,
- ProductInterface $product
+ ProductInterface $product,
): void {
$productRepository->findOneByCode('winter_cap')->willReturn($product);
@@ -86,7 +86,7 @@ function it_throws_an_exception_if_email_has_not_been_found(
'Good stuff',
5,
'Really good stuff',
- 'winter_cap'
+ 'winter_cap',
),
])
;
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/BlameCartHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/BlameCartHandlerSpec.php
index 50a08dd8ec9..79601a0d716 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/BlameCartHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/BlameCartHandlerSpec.php
@@ -28,12 +28,12 @@ final class BlameCartHandlerSpec extends ObjectBehavior
function let(
UserRepositoryInterface $shopUserRepository,
OrderRepositoryInterface $orderRepository,
- OrderProcessorInterface $orderProcessor
+ OrderProcessorInterface $orderProcessor,
): void {
$this->beConstructedWith(
$shopUserRepository,
$orderRepository,
- $orderProcessor
+ $orderProcessor,
);
}
@@ -48,7 +48,7 @@ function it_blames_cart_with_given_data(
OrderInterface $cart,
ShopUserInterface $user,
CustomerInterface $customer,
- OrderProcessorInterface $orderProcessor
+ OrderProcessorInterface $orderProcessor,
): void {
$shopUserRepository->findOneByEmail('sylius@example.com')->willReturn($user);
$orderRepository->findCartByTokenValue('TOKEN')->willReturn($cart);
@@ -69,7 +69,7 @@ function it_throws_an_exception_if_cart_is_occupied(
OrderRepositoryInterface $orderRepository,
OrderInterface $cart,
ShopUserInterface $user,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$shopUserRepository->findOneByEmail('sylius@example.com')->willReturn($user);
$orderRepository->findCartByTokenValue('TOKEN')->willReturn($cart);
@@ -86,7 +86,7 @@ function it_throws_an_exception_if_cart_is_occupied(
function it_throws_an_exception_if_cart_has_not_been_found(
UserRepositoryInterface $shopUserRepository,
- ShopUserInterface $user
+ ShopUserInterface $user,
): void {
$shopUserRepository->findOneByEmail('sylius@example.com')->willReturn($user);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Cart/AddItemToCartHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Cart/AddItemToCartHandlerSpec.php
index 6cee777eafb..37afd7392e5 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Cart/AddItemToCartHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Cart/AddItemToCartHandlerSpec.php
@@ -32,7 +32,7 @@ function let(
ProductVariantRepositoryInterface $productVariantRepository,
OrderModifierInterface $orderModifier,
CartItemFactoryInterface $cartItemFactory,
- OrderItemQuantityModifierInterface $orderItemQuantityModifier
+ OrderItemQuantityModifierInterface $orderItemQuantityModifier,
): void {
$this->beConstructedWith(
$orderRepository,
@@ -56,7 +56,7 @@ function it_adds_simple_product_to_cart(
OrderItemQuantityModifierInterface $orderItemQuantityModifier,
OrderInterface $cart,
OrderItemInterface $cartItem,
- ProductVariantInterface $productVariant
+ ProductVariantInterface $productVariant,
): void {
$orderRepository->findCartByTokenValue('TOKEN')->willReturn($cart);
$productVariantRepository
@@ -74,13 +74,13 @@ function it_adds_simple_product_to_cart(
$this(AddItemToCart::createFromData(
'TOKEN',
'PRODUCT_VARIANT_CODE',
- 5
+ 5,
))->shouldReturn($cart);
}
function it_throws_an_exception_if_product_is_not_found(
ProductVariantRepositoryInterface $productVariantRepository,
- CartItemFactoryInterface $cartItemFactory
+ CartItemFactoryInterface $cartItemFactory,
): void {
$productVariantRepository->findOneBy(['code' => 'PRODUCT_VARIANT_CODE'])->willReturn(null);
@@ -91,7 +91,7 @@ function it_throws_an_exception_if_product_is_not_found(
->during('__invoke', [AddItemToCart::createFromData(
'TOKEN',
'PRODUCT_VARIANT_CODE',
- 1
+ 1,
)])
;
}
@@ -100,7 +100,7 @@ function it_throws_an_exception_if_cart_is_not_found(
OrderRepositoryInterface $orderRepository,
ProductVariantRepositoryInterface $productVariantRepository,
CartItemFactoryInterface $cartItemFactory,
- ProductVariantInterface $productVariant
+ ProductVariantInterface $productVariant,
): void {
$productVariantRepository
->findOneBy(['code' => 'PRODUCT_VARIANT_CODE'])
@@ -116,7 +116,7 @@ function it_throws_an_exception_if_cart_is_not_found(
->during('__invoke', [AddItemToCart::createFromData(
'TOKEN',
'PRODUCT_VARIANT_CODE',
- 1
+ 1,
)])
;
}
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Cart/ApplyCouponToCartHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Cart/ApplyCouponToCartHandlerSpec.php
index c7b21b584ba..acb7eca35f0 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Cart/ApplyCouponToCartHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Cart/ApplyCouponToCartHandlerSpec.php
@@ -27,7 +27,7 @@ final class ApplyCouponToCartHandlerSpec extends ObjectBehavior
function let(
OrderRepositoryInterface $orderRepository,
PromotionCouponRepositoryInterface $promotionCouponRepository,
- OrderProcessorInterface $orderProcessor
+ OrderProcessorInterface $orderProcessor,
) {
$this->beConstructedWith($orderRepository, $promotionCouponRepository, $orderProcessor);
}
@@ -42,7 +42,7 @@ function it_applies_coupon_to_cart(
PromotionCouponRepositoryInterface $promotionCouponRepository,
OrderProcessorInterface $orderProcessor,
OrderInterface $cart,
- PromotionCouponInterface $promotionCoupon
+ PromotionCouponInterface $promotionCoupon,
): void {
$orderRepository->findCartByTokenValue('cart')->willReturn($cart);
@@ -60,7 +60,7 @@ function it_throws_exception_if_cart_is_not_found(
PromotionCouponRepositoryInterface $promotionCouponRepository,
OrderProcessorInterface $orderProcessor,
OrderInterface $cart,
- PromotionCouponInterface $promotionCoupon
+ PromotionCouponInterface $promotionCoupon,
): void {
$orderRepository->findCartByTokenValue('cart')->willReturn(null);
@@ -71,14 +71,15 @@ function it_throws_exception_if_cart_is_not_found(
$orderProcessor->process($cart)->shouldNotBeCalled();
$this->shouldThrow(\InvalidArgumentException::class)
- ->during('__invoke', [ApplyCouponToCart::createFromData('cart', 'couponCode')]);
+ ->during('__invoke', [ApplyCouponToCart::createFromData('cart', 'couponCode')])
+ ;
}
function it_throws_exception_if_promotion_coupon_is_not_found(
OrderRepositoryInterface $orderRepository,
PromotionCouponRepositoryInterface $promotionCouponRepository,
OrderProcessorInterface $orderProcessor,
- OrderInterface $cart
+ OrderInterface $cart,
): void {
$orderRepository->findCartByTokenValue('cart')->willReturn($cart);
@@ -89,14 +90,15 @@ function it_throws_exception_if_promotion_coupon_is_not_found(
$orderProcessor->process($cart)->shouldNotBeCalled();
$this->shouldThrow(\InvalidArgumentException::class)
- ->during('__invoke', [ApplyCouponToCart::createFromData('cart', 'couponCode')]);
+ ->during('__invoke', [ApplyCouponToCart::createFromData('cart', 'couponCode')])
+ ;
}
function it_removes_coupon_if_passed_promotion_coupon_code_is_null(
OrderRepositoryInterface $orderRepository,
PromotionCouponRepositoryInterface $promotionCouponRepository,
OrderProcessorInterface $orderProcessor,
- OrderInterface $cart
+ OrderInterface $cart,
): void {
$orderRepository->findCartByTokenValue('cart')->willReturn($cart);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Cart/ChangeItemQuantityInCartHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Cart/ChangeItemQuantityInCartHandlerSpec.php
index 6686681165e..078051d3a2e 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Cart/ChangeItemQuantityInCartHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Cart/ChangeItemQuantityInCartHandlerSpec.php
@@ -27,7 +27,7 @@ final class ChangeItemQuantityInCartHandlerSpec extends ObjectBehavior
function let(
OrderItemRepositoryInterface $orderItemRepository,
OrderItemQuantityModifierInterface $orderItemQuantityModifier,
- OrderProcessorInterface $orderProcessor
+ OrderProcessorInterface $orderProcessor,
) {
$this->beConstructedWith($orderItemRepository, $orderItemQuantityModifier, $orderProcessor);
}
@@ -42,11 +42,11 @@ function it_changes_order_item_quantity(
OrderItemQuantityModifierInterface $orderItemQuantityModifier,
OrderProcessorInterface $orderProcessor,
OrderInterface $cart,
- OrderItemInterface $cartItem
+ OrderItemInterface $cartItem,
): void {
$orderItemRepository->findOneByIdAndCartTokenValue(
'ORDER_ITEM_ID',
- 'TOKEN_VALUE'
+ 'TOKEN_VALUE',
)->willReturn($cartItem);
$cartItem->getOrder()->willReturn($cart);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Cart/RemoveItemFromCartHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Cart/RemoveItemFromCartHandlerSpec.php
index cd47912f64a..f5ffbc73634 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Cart/RemoveItemFromCartHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Cart/RemoveItemFromCartHandlerSpec.php
@@ -27,12 +27,12 @@ final class RemoveItemFromCartHandlerSpec extends ObjectBehavior
function let(
OrderItemRepository $orderItemRepository,
OrderModifierInterface $orderModifier,
- ProductVariantResolverInterface $variantResolver
+ ProductVariantResolverInterface $variantResolver,
): void {
$this->beConstructedWith(
$orderItemRepository,
$orderModifier,
- $variantResolver
+ $variantResolver,
);
}
@@ -45,11 +45,11 @@ function it_removes_order_item_from_cart(
OrderItemRepository $orderItemRepository,
OrderModifierInterface $orderModifier,
OrderInterface $cart,
- OrderItemInterface $cartItem
+ OrderItemInterface $cartItem,
): void {
$orderItemRepository->findOneByIdAndCartTokenValue(
'ORDER_ITEM_ID',
- 'TOKEN_VALUE'
+ 'TOKEN_VALUE',
)->willReturn($cartItem);
$cartItem->getOrder()->willReturn($cart);
@@ -63,11 +63,11 @@ function it_removes_order_item_from_cart(
function it_throws_an_exception_if_order_item_was_not_found(
OrderItemRepository $orderItemRepository,
- OrderItemInterface $cartItem
+ OrderItemInterface $cartItem,
): void {
$orderItemRepository->findOneByIdAndCartTokenValue(
'ORDER_ITEM_ID',
- 'TOKEN_VALUE'
+ 'TOKEN_VALUE',
)->willReturn(null);
$cartItem->getOrder()->shouldNotBeCalled();
@@ -76,7 +76,7 @@ function it_throws_an_exception_if_order_item_was_not_found(
->shouldThrow(\InvalidArgumentException::class)
->during(
'__invoke',
- [RemoveItemFromCart::removeFromData('TOKEN_VALUE', 'ORDER_ITEM_ID')]
+ [RemoveItemFromCart::removeFromData('TOKEN_VALUE', 'ORDER_ITEM_ID')],
)
;
}
@@ -85,11 +85,11 @@ function it_throws_an_exception_if_cart_token_value_was_not_properly(
OrderItemRepository $orderItemRepository,
OrderModifierInterface $orderModifier,
OrderItemInterface $cartItem,
- OrderInterface $cart
+ OrderInterface $cart,
): void {
$orderItemRepository->findOneByIdAndCartTokenValue(
'ORDER_ITEM_ID',
- 'TOKEN_VALUE'
+ 'TOKEN_VALUE',
)->willReturn($cartItem);
$cartItem->getOrder()->willReturn($cart);
@@ -102,7 +102,7 @@ function it_throws_an_exception_if_cart_token_value_was_not_properly(
->shouldThrow(\InvalidArgumentException::class)
->during(
'__invoke',
- [RemoveItemFromCart::removeFromData('TOKEN_VALUE', 'ORDER_ITEM_ID')]
+ [RemoveItemFromCart::removeFromData('TOKEN_VALUE', 'ORDER_ITEM_ID')],
)
;
}
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/ChangeShopUserPasswordHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/ChangeShopUserPasswordHandlerSpec.php
index d05c76532ad..3b29763e002 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/ChangeShopUserPasswordHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/ChangeShopUserPasswordHandlerSpec.php
@@ -36,7 +36,7 @@ function it_is_a_message_handler(): void
function it_updates_user_password(
PasswordUpdaterInterface $passwordUpdater,
UserRepositoryInterface $userRepository,
- ShopUserInterface $shopUser
+ ShopUserInterface $shopUser,
): void {
$userRepository->find(42)->willReturn($shopUser);
@@ -46,7 +46,7 @@ function it_updates_user_password(
$changePasswordShopUser = new ChangeShopUserPassword(
'PLAIN_PASSWORD',
'PLAIN_PASSWORD',
- 'OLD_PASSWORD'
+ 'OLD_PASSWORD',
);
$changePasswordShopUser->setShopUserId(42);
@@ -57,7 +57,7 @@ function it_updates_user_password(
function it_throws_exception_if_new_passwords_do_not_match(
PasswordUpdaterInterface $passwordUpdater,
UserRepositoryInterface $userRepository,
- ShopUserInterface $shopUser
+ ShopUserInterface $shopUser,
): void {
$userRepository->find(Argument::any())->shouldNotBeCalled();
@@ -67,7 +67,7 @@ function it_throws_exception_if_new_passwords_do_not_match(
$changePasswordShopUser = new ChangeShopUserPassword(
'PLAIN_PASSWORD',
'WRONG_PASSWORD',
- 'OLD_PASSWORD'
+ 'OLD_PASSWORD',
);
$changePasswordShopUser->setShopUserId(42);
@@ -81,7 +81,7 @@ function it_throws_exception_if_new_passwords_do_not_match(
function it_throws_exception_if_shop_user_has_not_been_found(
PasswordUpdaterInterface $passwordUpdater,
UserRepositoryInterface $userRepository,
- ShopUserInterface $shopUser
+ ShopUserInterface $shopUser,
): void {
$userRepository->find(42)->willReturn(null);
@@ -91,7 +91,7 @@ function it_throws_exception_if_shop_user_has_not_been_found(
$changePasswordShopUser = new ChangeShopUserPassword(
'PLAIN_PASSWORD',
'PLAIN_PASSWORD',
- 'OLD_PASSWORD'
+ 'OLD_PASSWORD',
);
$changePasswordShopUser->setShopUserId(42);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Checkout/AddressOrderHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Checkout/AddressOrderHandlerSpec.php
index e797dcc99af..efc4af1823b 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Checkout/AddressOrderHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Checkout/AddressOrderHandlerSpec.php
@@ -34,14 +34,14 @@ function let(
CustomerRepositoryInterface $customerRepository,
FactoryInterface $customerFactory,
ObjectManager $manager,
- StateMachineFactoryInterface $stateMachineFactory
+ StateMachineFactoryInterface $stateMachineFactory,
): void {
$this->beConstructedWith(
$orderRepository,
$customerRepository,
$customerFactory,
$manager,
- $stateMachineFactory
+ $stateMachineFactory,
);
}
@@ -51,7 +51,7 @@ function it_handles_addressing_an_order_without_provided_shipping_address(
CustomerInterface $customer,
AddressInterface $billingAddress,
OrderInterface $order,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$addressOrder = new AddressOrder('r2d2@droid.com', $billingAddress->getWrappedObject());
$addressOrder->setOrderTokenValue('ORDERTOKEN');
@@ -80,12 +80,12 @@ function it_handles_addressing_an_order_for_visitor(
AddressInterface $billingAddress,
AddressInterface $shippingAddress,
OrderInterface $order,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$addressOrder = new AddressOrder(
'r2d2@droid.com',
$billingAddress->getWrappedObject(),
- $shippingAddress->getWrappedObject()
+ $shippingAddress->getWrappedObject(),
);
$addressOrder->setOrderTokenValue('ORDERTOKEN');
@@ -118,12 +118,12 @@ function it_handles_addressing_an_order_for_logged_in_shop_user(
AddressInterface $billingAddress,
AddressInterface $shippingAddress,
OrderInterface $order,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$addressOrder = new AddressOrder(
'r2d2@droid.com',
$billingAddress->getWrappedObject(),
- $shippingAddress->getWrappedObject()
+ $shippingAddress->getWrappedObject(),
);
$addressOrder->setOrderTokenValue('ORDERTOKEN');
@@ -158,12 +158,12 @@ function it_handles_addressing_an_order_for_not_logged_in_shop_user(
AddressInterface $billingAddress,
AddressInterface $shippingAddress,
OrderInterface $order,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$addressOrder = new AddressOrder(
'r2d2@droid.com',
$billingAddress->getWrappedObject(),
- $shippingAddress->getWrappedObject()
+ $shippingAddress->getWrappedObject(),
);
$addressOrder->setOrderTokenValue('ORDERTOKEN');
@@ -193,12 +193,12 @@ function it_throws_an_exception_if_visitor_does_not_provide_an_email(
AddressInterface $shippingAddress,
StateMachineFactoryInterface $stateMachineFactory,
OrderInterface $order,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$addressOrder = new AddressOrder(
null,
$billingAddress->getWrappedObject(),
- $shippingAddress->getWrappedObject()
+ $shippingAddress->getWrappedObject(),
);
$addressOrder->setOrderTokenValue('ORDERTOKEN');
@@ -215,12 +215,12 @@ function it_throws_an_exception_if_visitor_does_not_provide_an_email(
function it_throws_an_exception_if_order_does_not_exist(
OrderRepositoryInterface $orderRepository,
AddressInterface $billingAddress,
- AddressInterface $shippingAddress
+ AddressInterface $shippingAddress,
): void {
$addressOrder = new AddressOrder(
'r2d2@droid.com',
$billingAddress->getWrappedObject(),
- $shippingAddress->getWrappedObject()
+ $shippingAddress->getWrappedObject(),
);
$addressOrder->setOrderTokenValue('ORDERTOKEN');
@@ -235,12 +235,12 @@ function it_throws_an_exception_if_order_cannot_be_addressed(
AddressInterface $billingAddress,
AddressInterface $shippingAddress,
OrderInterface $order,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$addressOrder = new AddressOrder(
'r2d2@droid.com',
$billingAddress->getWrappedObject(),
- $shippingAddress->getWrappedObject()
+ $shippingAddress->getWrappedObject(),
);
$addressOrder->setOrderTokenValue('ORDERTOKEN');
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Checkout/ChoosePaymentMethodHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Checkout/ChoosePaymentMethodHandlerSpec.php
index 2a7195fe923..e8f56b1508d 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Checkout/ChoosePaymentMethodHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Checkout/ChoosePaymentMethodHandlerSpec.php
@@ -35,14 +35,14 @@ function let(
PaymentMethodRepositoryInterface $paymentMethodRepository,
PaymentRepositoryInterface $paymentRepository,
FactoryInterface $stateMachineFactory,
- PaymentMethodChangerInterface $paymentMethodChanger
+ PaymentMethodChangerInterface $paymentMethodChanger,
): void {
$this->beConstructedWith(
$orderRepository,
$paymentMethodRepository,
$paymentRepository,
$stateMachineFactory,
- $paymentMethodChanger
+ $paymentMethodChanger,
);
}
@@ -54,7 +54,7 @@ function it_assigns_chosen_payment_method_to_specified_payment_while_checkout(
OrderInterface $cart,
PaymentInterface $payment,
PaymentMethodInterface $paymentMethod,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$choosePaymentMethod = new ChoosePaymentMethod('CASH_ON_DELIVERY_METHOD');
$choosePaymentMethod->setOrderTokenValue('ORDERTOKEN');
@@ -83,7 +83,7 @@ function it_assigns_chosen_payment_method_to_specified_payment_while_checkout(
function it_throws_an_exception_if_order_with_given_token_has_not_been_found(
OrderRepositoryInterface $orderRepository,
- PaymentInterface $payment
+ PaymentInterface $payment,
): void {
$choosePaymentMethod = new ChoosePaymentMethod('CASH_ON_DELIVERY_METHOD');
$choosePaymentMethod->setOrderTokenValue('ORDERTOKEN');
@@ -105,7 +105,7 @@ function it_throws_an_exception_if_order_cannot_have_payment_selected(
FactoryInterface $stateMachineFactory,
OrderInterface $cart,
StateMachineInterface $stateMachine,
- PaymentInterface $payment
+ PaymentInterface $payment,
): void {
$choosePaymentMethod = new ChoosePaymentMethod('CASH_ON_DELIVERY_METHOD');
$choosePaymentMethod->setOrderTokenValue('ORDERTOKEN');
@@ -134,7 +134,7 @@ function it_throws_an_exception_if_payment_method_with_given_code_has_not_been_f
FactoryInterface $stateMachineFactory,
OrderInterface $cart,
StateMachineInterface $stateMachine,
- PaymentInterface $payment
+ PaymentInterface $payment,
): void {
$choosePaymentMethod = new ChoosePaymentMethod('CASH_ON_DELIVERY_METHOD');
$choosePaymentMethod->setOrderTokenValue('ORDERTOKEN');
@@ -164,7 +164,7 @@ function it_throws_an_exception_if_ordered_payment_has_not_been_found(
FactoryInterface $stateMachineFactory,
OrderInterface $cart,
PaymentMethodInterface $paymentMethod,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$choosePaymentMethod = new ChoosePaymentMethod('CASH_ON_DELIVERY_METHOD');
$choosePaymentMethod->setOrderTokenValue('ORDERTOKEN');
@@ -197,7 +197,7 @@ function it_throws_an_exception_if_payment_is_in_different_state_than_new(
PaymentRepositoryInterface $paymentRepository,
OrderInterface $cart,
PaymentInterface $payment,
- PaymentMethodInterface $paymentMethod
+ PaymentMethodInterface $paymentMethod,
): void {
$choosePaymentMethod = new ChoosePaymentMethod('CASH_ON_DELIVERY_METHOD');
$choosePaymentMethod->setOrderTokenValue('ORDERTOKEN');
@@ -225,7 +225,7 @@ function it_assigns_chosen_payment_method_to_specified_payment_after_checkout(
OrderRepositoryInterface $orderRepository,
PaymentMethodRepositoryInterface $paymentMethodRepository,
PaymentMethodChangerInterface $paymentMethodChanger,
- OrderInterface $cart
+ OrderInterface $cart,
): void {
$choosePaymentMethod = new ChoosePaymentMethod('CASH_ON_DELIVERY_METHOD');
$choosePaymentMethod->setOrderTokenValue('ORDERTOKEN');
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Checkout/ChooseShippingMethodHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Checkout/ChooseShippingMethodHandlerSpec.php
index 6d51994d3ac..15570fbf9f1 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Checkout/ChooseShippingMethodHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Checkout/ChooseShippingMethodHandlerSpec.php
@@ -35,14 +35,14 @@ function let(
ShippingMethodRepositoryInterface $shippingMethodRepository,
ShipmentRepositoryInterface $shipmentRepository,
ShippingMethodEligibilityCheckerInterface $eligibilityChecker,
- FactoryInterface $stateMachineFactory
+ FactoryInterface $stateMachineFactory,
): void {
$this->beConstructedWith(
$orderRepository,
$shippingMethodRepository,
$shipmentRepository,
$eligibilityChecker,
- $stateMachineFactory
+ $stateMachineFactory,
);
}
@@ -55,7 +55,7 @@ function it_assigns_choosen_shipping_method_to_specified_shipment(
OrderInterface $cart,
ShippingMethodInterface $shippingMethod,
ShipmentInterface $shipment,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$chooseShippingMethod = new ChooseShippingMethod('DHL_SHIPPING_METHOD');
$chooseShippingMethod->setOrderTokenValue('ORDERTOKEN');
@@ -91,7 +91,7 @@ function it_throws_an_exception_if_shipping_method_is_not_eligible(
OrderInterface $cart,
ShippingMethodInterface $shippingMethod,
ShipmentInterface $shipment,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$chooseShippingMethod = new ChooseShippingMethod('DHL_SHIPPING_METHOD');
$chooseShippingMethod->setOrderTokenValue('ORDERTOKEN');
@@ -123,7 +123,7 @@ function it_throws_an_exception_if_shipping_method_is_not_eligible(
function it_throws_an_exception_if_order_with_given_token_has_not_been_found(
OrderRepositoryInterface $orderRepository,
- ShipmentInterface $shipment
+ ShipmentInterface $shipment,
): void {
$chooseShippingMethod = new ChooseShippingMethod('DHL_SHIPPING_METHOD');
$chooseShippingMethod->setOrderTokenValue('ORDERTOKEN');
@@ -144,7 +144,7 @@ function it_throws_an_exception_if_order_cannot_have_shipping_selected(
FactoryInterface $stateMachineFactory,
OrderInterface $cart,
StateMachineInterface $stateMachine,
- ShipmentInterface $shipment
+ ShipmentInterface $shipment,
): void {
$chooseShippingMethod = new ChooseShippingMethod('DHL_SHIPPING_METHOD');
$chooseShippingMethod->setOrderTokenValue('ORDERTOKEN');
@@ -169,7 +169,7 @@ function it_throws_an_exception_if_shipping_method_with_given_code_has_not_been_
FactoryInterface $stateMachineFactory,
OrderInterface $cart,
StateMachineInterface $stateMachine,
- ShipmentInterface $shipment
+ ShipmentInterface $shipment,
): void {
$chooseShippingMethod = new ChooseShippingMethod('DHL_SHIPPING_METHOD');
$chooseShippingMethod->setOrderTokenValue('ORDERTOKEN');
@@ -198,7 +198,7 @@ function it_throws_an_exception_if_ordered_shipment_has_not_been_found(
FactoryInterface $stateMachineFactory,
OrderInterface $cart,
ShippingMethodInterface $shippingMethod,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$chooseShippingMethod = new ChooseShippingMethod('DHL_SHIPPING_METHOD');
$chooseShippingMethod->setOrderTokenValue('ORDERTOKEN');
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Checkout/CompleteOrderHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Checkout/CompleteOrderHandlerSpec.php
index 2f5a483a356..0c1861c728a 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Checkout/CompleteOrderHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Checkout/CompleteOrderHandlerSpec.php
@@ -30,7 +30,7 @@ final class CompleteOrderHandlerSpec extends ObjectBehavior
function let(
OrderRepositoryInterface $orderRepository,
FactoryInterface $stateMachineFactory,
- MessageBusInterface $eventBus
+ MessageBusInterface $eventBus,
): void {
$this->beConstructedWith($orderRepository, $stateMachineFactory, $eventBus);
}
@@ -40,7 +40,7 @@ function it_handles_order_completion_without_notes(
StateMachineInterface $stateMachine,
OrderInterface $order,
FactoryInterface $stateMachineFactory,
- MessageBusInterface $eventBus
+ MessageBusInterface $eventBus,
): void {
$completeOrder = new CompleteOrder();
$completeOrder->setOrderTokenValue('ORDERTOKEN');
@@ -71,7 +71,7 @@ function it_handles_order_completion_with_notes(
StateMachineInterface $stateMachine,
OrderInterface $order,
FactoryInterface $stateMachineFactory,
- MessageBusInterface $eventBus
+ MessageBusInterface $eventBus,
): void {
$completeOrder = new CompleteOrder('ThankYou');
$completeOrder->setOrderTokenValue('ORDERTOKEN');
@@ -98,7 +98,7 @@ function it_handles_order_completion_with_notes(
}
function it_throws_an_exception_if_order_does_not_exist(
- OrderRepositoryInterface $orderRepository
+ OrderRepositoryInterface $orderRepository,
): void {
$completeOrder = new CompleteOrder();
$completeOrder->setOrderTokenValue('ORDERTOKEN');
@@ -115,7 +115,7 @@ function it_throws_an_exception_if_order_cannot_be_completed(
OrderRepositoryInterface $orderRepository,
StateMachineInterface $stateMachine,
OrderInterface $order,
- FactoryInterface $stateMachineFactory
+ FactoryInterface $stateMachineFactory,
): void {
$completeOrder = new CompleteOrder();
$completeOrder->setOrderTokenValue('ORDERTOKEN');
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Checkout/ShipShipmentHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Checkout/ShipShipmentHandlerSpec.php
index bce7d000088..ca44be766da 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Checkout/ShipShipmentHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Checkout/ShipShipmentHandlerSpec.php
@@ -30,7 +30,7 @@ final class ShipShipmentHandlerSpec extends ObjectBehavior
function let(
ShipmentRepositoryInterface $shipmentRepository,
FactoryInterface $stateMachineFactory,
- MessageBusInterface $eventBus
+ MessageBusInterface $eventBus,
): void {
$this->beConstructedWith($shipmentRepository, $stateMachineFactory, $eventBus);
}
@@ -40,7 +40,7 @@ function it_handles_shipping_without_tracking_number(
StateMachineInterface $stateMachine,
ShipmentInterface $shipment,
FactoryInterface $stateMachineFactory,
- MessageBusInterface $eventBus
+ MessageBusInterface $eventBus,
): void {
$shipShipment = new ShipShipment();
$shipShipment->setShipmentId(123);
@@ -70,7 +70,7 @@ function it_handles_shipping_with_tracking_number(
StateMachineInterface $stateMachine,
ShipmentInterface $shipment,
FactoryInterface $stateMachineFactory,
- MessageBusInterface $eventBus
+ MessageBusInterface $eventBus,
): void {
$shipShipment = new ShipShipment('TRACK');
$shipShipment->setShipmentId(123);
@@ -96,7 +96,7 @@ function it_handles_shipping_with_tracking_number(
}
function it_throws_an_exception_if_shipment_does_not_exist(
- ShipmentRepositoryInterface $shipmentRepository
+ ShipmentRepositoryInterface $shipmentRepository,
): void {
$shipShipment = new ShipShipment('TRACK');
$shipShipment->setShipmentId(123);
@@ -113,7 +113,7 @@ function it_throws_an_exception_if_shipment_cannot_be_shipped(
ShipmentRepositoryInterface $shipmentRepository,
StateMachineInterface $stateMachine,
ShipmentInterface $shipment,
- FactoryInterface $stateMachineFactory
+ FactoryInterface $stateMachineFactory,
): void {
$shipShipment = new ShipShipment('TRACK');
$shipShipment->setShipmentId(123);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/PickupCartHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/PickupCartHandlerSpec.php
index 8d66c8e4a08..2ac4d3df6fc 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/PickupCartHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/PickupCartHandlerSpec.php
@@ -39,7 +39,7 @@ function let(
ChannelRepositoryInterface $channelRepository,
UserContextInterface $userContext,
ObjectManager $orderManager,
- RandomnessGeneratorInterface $generator
+ RandomnessGeneratorInterface $generator,
): void {
$this->beConstructedWith(
$cartFactory,
@@ -47,7 +47,7 @@ function let(
$channelRepository,
$userContext,
$orderManager,
- $generator
+ $generator,
);
}
@@ -68,7 +68,7 @@ function it_picks_up_a_new_cart_for_logged_in_shop_user(
OrderInterface $cart,
ChannelInterface $channel,
CurrencyInterface $currency,
- LocaleInterface $locale
+ LocaleInterface $locale,
): void {
$pickupCart = new PickupCart();
$pickupCart->setChannelCode('code');
@@ -109,7 +109,7 @@ function it_picks_up_an_existing_cart_for_logged_in_shop_user(
CustomerInterface $customer,
ObjectManager $orderManager,
OrderInterface $cart,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$pickupCart = new PickupCart();
$pickupCart->setChannelCode('code');
@@ -140,7 +140,7 @@ function it_picks_up_a_cart_for_visitor(
OrderInterface $cart,
ChannelInterface $channel,
CurrencyInterface $currency,
- LocaleInterface $locale
+ LocaleInterface $locale,
): void {
$pickupCart = new PickupCart();
$pickupCart->setChannelCode('code');
@@ -181,7 +181,7 @@ function it_picks_up_a_cart_with_locale_code_for_visitor(
OrderInterface $cart,
ChannelInterface $channel,
CurrencyInterface $currency,
- LocaleInterface $locale
+ LocaleInterface $locale,
): void {
$pickupCart = new PickupCart();
$pickupCart->setChannelCode('code');
@@ -222,7 +222,7 @@ function it_throws_exception_if_locale_code_is_not_correct(
OrderInterface $cart,
ChannelInterface $channel,
CurrencyInterface $currency,
- LocaleInterface $locale
+ LocaleInterface $locale,
): void {
$pickupCart = new PickupCart();
$pickupCart->setChannelCode('code');
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/RegisterShopUserHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/RegisterShopUserHandlerSpec.php
index 7fd30d065eb..bcb96ff096b 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/RegisterShopUserHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/RegisterShopUserHandlerSpec.php
@@ -38,7 +38,7 @@ function let(
CustomerProviderInterface $customerProvider,
ChannelRepositoryInterface $channelRepository,
GeneratorInterface $generator,
- MessageBusInterface $commandBus
+ MessageBusInterface $commandBus,
): void {
$this->beConstructedWith(
$shopUserFactory,
@@ -46,7 +46,7 @@ function let(
$customerProvider,
$channelRepository,
$generator,
- $commandBus
+ $commandBus,
);
}
@@ -64,7 +64,7 @@ function it_creates_a_shop_user_with_given_data(
ChannelRepositoryInterface $channelRepository,
ChannelInterface $channel,
GeneratorInterface $generator,
- MessageBusInterface $commandBus
+ MessageBusInterface $commandBus,
): void {
$command = new RegisterShopUser('Will', 'Smith', 'WILL.SMITH@example.com', 'iamrobot', '+13104322400', true);
$command->setChannelCode('CHANNEL_CODE');
@@ -115,7 +115,7 @@ function it_creates_a_shop_user_with_given_data_and_verifies_it(
CustomerInterface $customer,
ChannelRepositoryInterface $channelRepository,
ChannelInterface $channel,
- MessageBusInterface $commandBus
+ MessageBusInterface $commandBus,
): void {
$command = new RegisterShopUser('Will', 'Smith', 'WILL.SMITH@example.com', 'iamrobot', '+13104322400', true);
$command->setChannelCode('CHANNEL_CODE');
@@ -157,7 +157,7 @@ function it_throws_an_exception_if_customer_with_user_already_exists(
ShopUserInterface $shopUser,
CustomerInterface $customer,
ShopUserInterface $existingShopUser,
- MessageBusInterface $commandBus
+ MessageBusInterface $commandBus,
): void {
$shopUserFactory->createNew()->willReturn($shopUser);
$customerProvider->provide('WILL.SMITH@example.com')->willReturn($customer);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/RequestResetPasswordTokenHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/RequestResetPasswordTokenHandlerSpec.php
index 345da8b5434..f02c48abcb5 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/RequestResetPasswordTokenHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/RequestResetPasswordTokenHandlerSpec.php
@@ -21,7 +21,7 @@ final class RequestResetPasswordTokenHandlerSpec extends ObjectBehavior
function let(
UserRepositoryInterface $userRepository,
MessageBusInterface $messageBus,
- GeneratorInterface $generator
+ GeneratorInterface $generator,
): void {
$this->beConstructedWith($userRepository, $messageBus, $generator);
}
@@ -35,7 +35,7 @@ function it_handles_request_for_password_reset_token(
UserRepositoryInterface $userRepository,
ShopUserInterface $shopUser,
GeneratorInterface $generator,
- MessageBusInterface $messageBus
+ MessageBusInterface $messageBus,
): void {
$userRepository->findOneByEmail('test@email.com')->willReturn($shopUser);
@@ -47,7 +47,7 @@ function it_handles_request_for_password_reset_token(
$messageBus->dispatch(
$sendResetPasswordEmail,
- [new DispatchAfterCurrentBusStamp()]
+ [new DispatchAfterCurrentBusStamp()],
)->willReturn(new Envelope($sendResetPasswordEmail))->shouldBeCalled();
$requestResetPasswordToken = new RequestResetPasswordToken('test@email.com');
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/ResendVerificationEmailHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/ResendVerificationEmailHandlerSpec.php
index 9e7f458da5c..8b4693ea1b1 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/ResendVerificationEmailHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/ResendVerificationEmailHandlerSpec.php
@@ -21,7 +21,7 @@ final class ResendVerificationEmailHandlerSpec extends ObjectBehavior
function let(
UserRepositoryInterface $userRepository,
GeneratorInterface $generator,
- MessageBusInterface $messageBus
+ MessageBusInterface $messageBus,
): void {
$this->beConstructedWith($userRepository, $generator, $messageBus);
}
@@ -50,7 +50,7 @@ function it_handles_request_for_resend_verification_email(
ShopUserInterface $shopUser,
GeneratorInterface $generator,
MessageBusInterface $messageBus,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$userRepository->findOneByEmail('test@email.com')->willReturn($shopUser);
@@ -63,7 +63,7 @@ function it_handles_request_for_resend_verification_email(
$messageBus->dispatch(
$sendAccountVerificationEmail,
- [new DispatchAfterCurrentBusStamp()]
+ [new DispatchAfterCurrentBusStamp()],
)->willReturn(new Envelope($sendAccountVerificationEmail))->shouldBeCalled();
$resendVerificationEmail = new ResendVerificationEmail('test@email.com');
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/ResetPasswordHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/ResetPasswordHandlerSpec.php
index 0d4e6f82279..ff494fc12a7 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/ResetPasswordHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/ResetPasswordHandlerSpec.php
@@ -27,7 +27,7 @@ final class ResetPasswordHandlerSpec extends ObjectBehavior
function let(
UserRepositoryInterface $userRepository,
MetadataInterface $metadata,
- PasswordUpdaterInterface $passwordUpdater
+ PasswordUpdaterInterface $passwordUpdater,
): void {
$this->beConstructedWith($userRepository, $metadata, $passwordUpdater);
}
@@ -41,7 +41,7 @@ function it_resets_password(
UserRepositoryInterface $userRepository,
ShopUserInterface $shopUser,
MetadataInterface $metadata,
- PasswordUpdaterInterface $passwordUpdater
+ PasswordUpdaterInterface $passwordUpdater,
): void {
$userRepository->findOneBy(['passwordResetToken' => 'TOKEN'])->willReturn($shopUser);
$metadata->getParameter('resetting')->willReturn(['token' => ['ttl' => 'P5D']]);
@@ -67,7 +67,7 @@ function it_throws_exception_if_token_is_expired(
UserRepositoryInterface $userRepository,
ShopUserInterface $shopUser,
MetadataInterface $metadata,
- PasswordUpdaterInterface $passwordUpdater
+ PasswordUpdaterInterface $passwordUpdater,
): void {
$userRepository->findOneBy(['passwordResetToken' => 'TOKEN'])->willReturn($shopUser);
$metadata->getParameter('resetting')->willReturn(['token' => ['ttl' => 'P5D']]);
@@ -94,7 +94,7 @@ function it_throws_exception_if_tokens_are_not_exact(
UserRepositoryInterface $userRepository,
ShopUserInterface $shopUser,
MetadataInterface $metadata,
- PasswordUpdaterInterface $passwordUpdater
+ PasswordUpdaterInterface $passwordUpdater,
): void {
$userRepository->findOneBy(['passwordResetToken' => 'TOKEN'])->willReturn($shopUser);
$metadata->getParameter('resetting')->willReturn(['token' => ['ttl' => 'P5D']]);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/SendOrderConfirmationHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/SendOrderConfirmationHandlerSpec.php
index 12af945ad17..a0c7b3ab226 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/SendOrderConfirmationHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/SendOrderConfirmationHandlerSpec.php
@@ -41,7 +41,7 @@ function it_sends_order_confirmation_message(
SenderInterface $sender,
CustomerInterface $customer,
ChannelInterface $channel,
- OrderRepositoryInterface $orderRepository
+ OrderRepositoryInterface $orderRepository,
): void {
$sendOrderConfirmation->orderToken()->willReturn('TOKEN');
@@ -60,7 +60,7 @@ function it_sends_order_confirmation_message(
'order' => $order->getWrappedObject(),
'channel' => $channel->getWrappedObject(),
'localeCode' => 'pl_PL',
- ]
+ ],
)->shouldBeCalled();
$this(new SendOrderConfirmation('TOKEN'));
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/SendResetPasswordEmailHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/SendResetPasswordEmailHandlerSpec.php
index 10ff2de8882..8021f140212 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/SendResetPasswordEmailHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/SendResetPasswordEmailHandlerSpec.php
@@ -28,7 +28,7 @@ final class SendResetPasswordEmailHandlerSpec extends ObjectBehavior
function let(
SenderInterface $emailSender,
ChannelRepositoryInterface $channelRepository,
- UserRepositoryInterface $userRepository
+ UserRepositoryInterface $userRepository,
): void {
$this->beConstructedWith($emailSender, $channelRepository, $userRepository);
}
@@ -44,7 +44,7 @@ function it_sends_message_with_reset_password_token(
SendResetPasswordEmail $sendResetPasswordEmail,
UserInterface $user,
ChannelRepositoryInterface $channelRepository,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$sendResetPasswordEmail->email()->willReturn('iAmAnEmail@spaghettiCode.php');
@@ -63,7 +63,7 @@ function it_sends_message_with_reset_password_token(
'user' => $user->getWrappedObject(),
'localeCode' => 'en_US',
'channel' => $channel->getWrappedObject(),
- ]
+ ],
);
$this(new SendResetPasswordEmail('iAmAnEmail@spaghettiCode.php', 'WEB', 'en_US'));
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/SendShipmentConfirmationEmailHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/SendShipmentConfirmationEmailHandlerSpec.php
index 42475273ace..75b3c87ad86 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/SendShipmentConfirmationEmailHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/SendShipmentConfirmationEmailHandlerSpec.php
@@ -42,7 +42,7 @@ function it_sends_shipment_confirmation_message(
CustomerInterface $customer,
ChannelInterface $channel,
ShipmentRepositoryInterface $shipmentRepository,
- OrderInterface $order
+ OrderInterface $order,
): void {
$shipmentRepository->find(123)->willReturn($shipment);
$shipment->getOrder()->willReturn($order);
@@ -61,7 +61,7 @@ function it_sends_shipment_confirmation_message(
'order' => $order->getWrappedObject(),
'channel' => $channel->getWrappedObject(),
'localeCode' => 'pl_PL',
- ]
+ ],
)->shouldBeCalled();
$this(new SendShipmentConfirmationEmail(123));
diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/VerifyCustomerAccountHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/VerifyCustomerAccountHandlerSpec.php
index 566e933c869..9001c7daf9c 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/VerifyCustomerAccountHandlerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/VerifyCustomerAccountHandlerSpec.php
@@ -34,7 +34,7 @@ function it_is_a_message_handler(): void
function it_verifies_shop_user(
RepositoryInterface $shopUserRepository,
- UserInterface $user
+ UserInterface $user,
): void {
$shopUserRepository->findOneBy(['emailVerificationToken' => 'ToKeN'])->willReturn($user);
@@ -46,7 +46,7 @@ function it_verifies_shop_user(
}
function it_throws_error_if_user_does_not_exist(
- RepositoryInterface $shopUserRepository
+ RepositoryInterface $shopUserRepository,
): void {
$shopUserRepository->findOneBy(['emailVerificationToken' => 'ToKeN'])->willReturn(null);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Context/TokenBasedUserContextSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Context/TokenBasedUserContextSpec.php
index a22e4ccd2ed..4733bf72469 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Context/TokenBasedUserContextSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Context/TokenBasedUserContextSpec.php
@@ -34,7 +34,7 @@ function it_implements_user_context_interface(): void
function it_returns_user_from_token(
TokenStorageInterface $tokenStorage,
TokenInterface $token,
- UserInterface $user
+ UserInterface $user,
): void {
$tokenStorage->getToken()->willReturn($token);
$token->getUser()->willReturn($user);
@@ -44,7 +44,7 @@ function it_returns_user_from_token(
function it_returns_null_if_user_from_token_is_anonymous(
TokenStorageInterface $tokenStorage,
- TokenInterface $token
+ TokenInterface $token,
): void {
$tokenStorage->getToken()->willReturn($token);
$token->getUser()->willReturn('anon.');
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Context/TokenValueBasedCartContextSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Context/TokenValueBasedCartContextSpec.php
index c258c0e9d48..6bd5f5bb32b 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Context/TokenValueBasedCartContextSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Context/TokenValueBasedCartContextSpec.php
@@ -38,7 +38,7 @@ function it_returns_cart_by_token_value(
RequestStack $requestStack,
OrderRepositoryInterface $orderRepository,
Request $request,
- OrderInterface $cart
+ OrderInterface $cart,
): void {
$request->attributes = new ParameterBag(['tokenValue' => 'TOKEN_VALUE']);
$request->getRequestUri()->willReturn('/api/v2/orders/TOKEN_VALUE');
@@ -61,7 +61,7 @@ function it_throws_an_exception_if_there_is_no_master_request_on_request_stack(R
function it_throws_an_exception_if_the_request_is_not_an_api_request(
RequestStack $requestStack,
- Request $request
+ Request $request,
): void {
$request->attributes = new ParameterBag([]);
$request->getRequestUri()->willReturn('/orders');
@@ -76,7 +76,7 @@ function it_throws_an_exception_if_the_request_is_not_an_api_request(
function it_throws_an_exception_if_there_is_no_token_value(
RequestStack $requestStack,
- Request $request
+ Request $request,
): void {
$request->attributes = new ParameterBag([]);
$request->getRequestUri()->willReturn('/api/v2/orders');
@@ -92,7 +92,7 @@ function it_throws_an_exception_if_there_is_no_token_value(
function it_throws_an_exception_if_there_is_no_cart_with_given_token_value(
RequestStack $requestStack,
OrderRepositoryInterface $orderRepository,
- Request $request
+ Request $request,
): void {
$request->attributes = new ParameterBag(['tokenValue' => 'TOKEN_VALUE']);
$request->getRequestUri()->willReturn('/api/v2/orders/TOKEN_VALUE');
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataPersister/AddressDataPersisterSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataPersister/AddressDataPersisterSpec.php
index 3ac1cf2a0ea..4d96af1d297 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataPersister/AddressDataPersisterSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataPersister/AddressDataPersisterSpec.php
@@ -27,7 +27,7 @@ final class AddressDataPersisterSpec extends ObjectBehavior
{
function let(
ContextAwareDataPersisterInterface $decoratedDataPersister,
- UserContextInterface $userContext
+ UserContextInterface $userContext,
): void {
$this->beConstructedWith($decoratedDataPersister, $userContext);
}
@@ -43,7 +43,7 @@ function it_sets_a_customer_and_marks_an_address_as_default_during_persisting_an
UserContextInterface $userContext,
ShopUserInterface $shopUser,
CustomerInterface $customer,
- AddressInterface $address
+ AddressInterface $address,
): void {
$userContext->getUser()->willReturn($shopUser);
$shopUser->getCustomer()->willReturn($customer);
@@ -63,7 +63,7 @@ function it_sets_a_customer_without_marking_an_address_as_default_during_persist
ShopUserInterface $shopUser,
CustomerInterface $customer,
AddressInterface $address,
- AddressInterface $defaultAddress
+ AddressInterface $defaultAddress,
): void {
$userContext->getUser()->willReturn($shopUser);
$shopUser->getCustomer()->willReturn($customer);
@@ -81,7 +81,7 @@ function it_does_not_set_a_customer_if_there_is_not_logged_in_customer(
ContextAwareDataPersisterInterface $decoratedDataPersister,
UserContextInterface $userContext,
ShopUserInterface $shopUser,
- AddressInterface $address
+ AddressInterface $address,
): void {
$userContext->getUser()->willReturn($shopUser);
$shopUser->getCustomer()->willReturn(null);
@@ -97,7 +97,7 @@ function it_uses_decorated_data_persister_to_remove_address(
ContextAwareDataPersisterInterface $decoratedDataPersister,
UserContextInterface $userContext,
ShopUserInterface $shopUser,
- AddressInterface $address
+ AddressInterface $address,
): void {
$userContext->getUser()->willReturn($shopUser);
@@ -108,7 +108,7 @@ function it_uses_decorated_data_persister_to_remove_address(
function it_throws_an_exception_if_there_is_not_logged_in_user_during_persisting(
ContextAwareDataPersisterInterface $decoratedDataPersister,
- AddressInterface $address
+ AddressInterface $address,
): void {
$decoratedDataPersister->persist($address, [])->shouldNotBeCalled();
@@ -117,7 +117,7 @@ function it_throws_an_exception_if_there_is_not_logged_in_user_during_persisting
function it_throws_an_exception_if_there_is_not_logged_in_user_during_removing(
ContextAwareDataPersisterInterface $decoratedDataPersister,
- AddressInterface $address
+ AddressInterface $address,
): void {
$decoratedDataPersister->remove($address, [])->shouldNotBeCalled();
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataPersister/AdminUserDataPersisterSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataPersister/AdminUserDataPersisterSpec.php
index fc7325da22b..0795699642c 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataPersister/AdminUserDataPersisterSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataPersister/AdminUserDataPersisterSpec.php
@@ -27,7 +27,7 @@ final class AdminUserDataPersisterSpec extends ObjectBehavior
function let(
ContextAwareDataPersisterInterface $decoratedDataPersister,
TokenStorageInterface $tokenStorage,
- PasswordUpdaterInterface $passwordUpdater
+ PasswordUpdaterInterface $passwordUpdater,
): void {
$this->beConstructedWith($decoratedDataPersister, $tokenStorage, $passwordUpdater);
}
@@ -41,7 +41,7 @@ function it_supports_only_admin_user_entity(AdminUserInterface $adminUser, Produ
function it_updates_password_during_persisting_an_admin_user(
ContextAwareDataPersisterInterface $decoratedDataPersister,
PasswordUpdaterInterface $passwordUpdater,
- AdminUserInterface $adminUser
+ AdminUserInterface $adminUser,
): void {
$passwordUpdater->updatePassword($adminUser)->shouldBeCalled();
$decoratedDataPersister->persist($adminUser, [])->shouldBeCalled();
@@ -54,7 +54,7 @@ function it_removes_admin_user_if_it_is_different_than_currently_logged_in_admin
TokenStorageInterface $tokenStorage,
AdminUserInterface $userToBeDeleted,
AdminUserInterface $currentlyLoggedInUser,
- TokenInterface $token
+ TokenInterface $token,
): void {
$userToBeDeleted->getId()->willReturn(1);
@@ -72,7 +72,7 @@ function it_does_not_allow_to_remove_currently_logged_in_admin_user(
TokenStorageInterface $tokenStorage,
AdminUserInterface $userToBeDeleted,
AdminUserInterface $currentlyLoggedInUser,
- TokenInterface $token
+ TokenInterface $token,
): void {
$userToBeDeleted->getId()->willReturn(1);
@@ -91,7 +91,7 @@ function it_does_not_allow_to_remove_currently_logged_in_admin_user(
function it_removes_admin_user_if_there_is_no_token(
ContextAwareDataPersisterInterface $decoratedDataPersister,
TokenStorageInterface $tokenStorage,
- AdminUserInterface $userToBeDeleted
+ AdminUserInterface $userToBeDeleted,
): void {
$userToBeDeleted->getId()->willReturn(11);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/AddressItemDataProviderSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/AddressItemDataProviderSpec.php
index 4015eacc9ef..df88b8dc947 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/AddressItemDataProviderSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/AddressItemDataProviderSpec.php
@@ -29,7 +29,7 @@ final class AddressItemDataProviderSpec extends ObjectBehavior
{
function let(
AddressRepositoryInterface $addressRepository,
- UserContextInterface $userContext
+ UserContextInterface $userContext,
): void {
$this->beConstructedWith($addressRepository, $userContext);
}
@@ -45,7 +45,7 @@ function it_provides_address_for_shop_user(
UserContextInterface $userContext,
ShopUserInterface $shopUser,
CustomerInterface $customer,
- AddressInterface $address
+ AddressInterface $address,
) {
$userContext->getUser()->willReturn($shopUser);
@@ -64,7 +64,7 @@ function it_provides_address_for_admin_user(
AddressRepositoryInterface $addressRepository,
UserContextInterface $userContext,
AdminUserInterface $adminUser,
- AddressInterface $address
+ AddressInterface $address,
) {
$userContext->getUser()->willReturn($adminUser);
@@ -78,7 +78,7 @@ function it_provides_address_for_admin_user(
function it_return_null_for_shop_user_with_null_customer(
AddressRepositoryInterface $addressRepository,
UserContextInterface $userContext,
- ShopUserInterface $shopUser
+ ShopUserInterface $shopUser,
) {
$userContext->getUser()->willReturn($shopUser);
@@ -94,7 +94,7 @@ function it_provides_empty_array_for_shop_user_without_properly_roles(
AddressRepositoryInterface $addressRepository,
UserContextInterface $userContext,
CustomerInterface $customer,
- ShopUserInterface $shopUser
+ ShopUserInterface $shopUser,
) {
$userContext->getUser()->willReturn($shopUser);
@@ -108,7 +108,7 @@ function it_provides_empty_array_for_shop_user_without_properly_roles(
function it_throws_an_exception_if_there_is_not_logged_in_user(
AddressRepositoryInterface $addressRepository,
- UserContextInterface $userContext
+ UserContextInterface $userContext,
): void {
$userContext->getUser()->willReturn(null);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/CartPaymentMethodsSubresourceDataProviderSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/CartPaymentMethodsSubresourceDataProviderSpec.php
index d16194b2e19..d9015fa1aa1 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/CartPaymentMethodsSubresourceDataProviderSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/CartPaymentMethodsSubresourceDataProviderSpec.php
@@ -28,7 +28,7 @@ final class CartPaymentMethodsSubresourceDataProviderSpec extends ObjectBehavior
function let(
OrderRepositoryInterface $orderRepository,
PaymentRepositoryInterface $paymentRepository,
- PaymentMethodsResolverInterface $paymentMethodsResolver
+ PaymentMethodsResolverInterface $paymentMethodsResolver,
): void {
$this->beConstructedWith($orderRepository, $paymentRepository, $paymentMethodsResolver);
}
@@ -51,16 +51,15 @@ function it_supports_only_order_payment_methods_subresource_data_provider_with_i
->supports(
PaymentMethodInterface::class,
Request::METHOD_GET,
- $context
+ $context,
)
->shouldReturn(true)
;
}
function it_throws_an_exception_if_cart_does_not_exist(
- OrderRepositoryInterface $orderRepository
- ): void
- {
+ OrderRepositoryInterface $orderRepository,
+ ): void {
$context['subresource_identifiers'] = ['tokenValue' => '69', 'payments' => '420'];
$orderRepository->findCartByTokenValue($context['subresource_identifiers']['tokenValue'])->willReturn(null);
@@ -80,7 +79,7 @@ function it_throws_an_exception_if_payment_does_not_exist(
OrderRepositoryInterface $orderRepository,
PaymentRepositoryInterface $paymentRepository,
OrderInterface $order,
- PaymentInterface $payment
+ PaymentInterface $payment,
): void {
$context['subresource_identifiers'] = ['tokenValue' => '69', 'payments' => '420'];
@@ -104,7 +103,7 @@ function it_throws_an_exception_if_payment_does_not_match_order(
OrderRepositoryInterface $orderRepository,
PaymentRepositoryInterface $paymentRepository,
OrderInterface $order,
- PaymentInterface $payment
+ PaymentInterface $payment,
): void {
$context['subresource_identifiers'] = ['tokenValue' => '69', 'payments' => '420'];
@@ -128,7 +127,7 @@ function it_returns_an_exception_if_cart_does_not_have_payments(
OrderRepositoryInterface $orderRepository,
PaymentRepositoryInterface $paymentRepository,
OrderInterface $order,
- PaymentInterface $payment
+ PaymentInterface $payment,
): void {
$context['subresource_identifiers'] = ['tokenValue' => '69', 'payments' => '420'];
@@ -154,7 +153,7 @@ function it_returns_order_payment_methods(
PaymentMethodsResolverInterface $paymentMethodsResolver,
OrderInterface $order,
PaymentInterface $payment,
- PaymentMethodInterface $paymentMethod
+ PaymentMethodInterface $paymentMethod,
): void {
$context['subresource_identifiers'] = ['tokenValue' => '69', 'payments' => '420'];
@@ -171,7 +170,7 @@ function it_returns_order_payment_methods(
PaymentMethodInterface::class,
[],
$context,
- Request::METHOD_GET
+ Request::METHOD_GET,
)
->shouldReturn([$paymentMethod])
;
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/CartShippingMethodsSubresourceDataProviderSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/CartShippingMethodsSubresourceDataProviderSpec.php
index 3dcf82a459b..22e92617000 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/CartShippingMethodsSubresourceDataProviderSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/CartShippingMethodsSubresourceDataProviderSpec.php
@@ -34,14 +34,14 @@ function let(
ShipmentRepositoryInterface $shipmentRepository,
ShippingMethodsResolverInterface $shippingMethodsResolver,
ServiceRegistryInterface $calculators,
- CartShippingMethodFactoryInterface $cartShippingMethodFactory
+ CartShippingMethodFactoryInterface $cartShippingMethodFactory,
): void {
$this->beConstructedWith(
$orderRepository,
$shipmentRepository,
$shippingMethodsResolver,
$calculators,
- $cartShippingMethodFactory
+ $cartShippingMethodFactory,
);
}
@@ -62,14 +62,14 @@ function it_supports_only_cart_shipping_methods_subresource_data_provider_with_i
->supports(
ShippingMethodInterface::class,
Request::METHOD_GET,
- $context
+ $context,
)
->shouldReturn(true)
;
}
function it_throws_an_exception_if_cart_does_not_exist(
- OrderRepositoryInterface $orderRepository
+ OrderRepositoryInterface $orderRepository,
): void {
$context['subresource_identifiers'] = ['tokenValue' => '666', 'shipments' => '999'];
@@ -89,7 +89,7 @@ function it_throws_an_exception_if_cart_does_not_exist(
function it_throws_an_exception_if_shipment_does_not_exist(
OrderRepositoryInterface $orderRepository,
ShipmentRepositoryInterface $shipmentRepository,
- OrderInterface $cart
+ OrderInterface $cart,
): void {
$context['subresource_identifiers'] = ['tokenValue' => '666', 'shipments' => '999'];
@@ -111,7 +111,7 @@ function it_throws_an_exception_if_shipment_does_not_match_for_order(
OrderRepositoryInterface $orderRepository,
ShipmentRepositoryInterface $shipmentRepository,
OrderInterface $cart,
- ShipmentInterface $shipment
+ ShipmentInterface $shipment,
): void {
$context['subresource_identifiers'] = ['tokenValue' => '666', 'shipments' => '999'];
@@ -135,7 +135,7 @@ function it_returns_empty_array_if_cart_does_not_have_shipments(
OrderRepositoryInterface $orderRepository,
ShipmentRepositoryInterface $shipmentRepository,
OrderInterface $cart,
- ShipmentInterface $shipment
+ ShipmentInterface $shipment,
): void {
$context['subresource_identifiers'] = ['tokenValue' => '666', 'shipments' => '999'];
@@ -150,7 +150,7 @@ function it_returns_empty_array_if_cart_does_not_have_shipments(
ShippingMethodInterface::class,
[],
$context,
- Request::METHOD_GET
+ Request::METHOD_GET,
)
->shouldReturn([])
;
@@ -166,7 +166,7 @@ function it_returns_cart_shipping_methods(
ShipmentInterface $shipment,
ShippingMethodInterface $shippingMethod,
CalculatorInterface $calculator,
- CartShippingMethodInterface $cartShippingMethod
+ CartShippingMethodInterface $cartShippingMethod,
): void {
$context['subresource_identifiers'] = ['tokenValue' => '666', 'shipments' => '999'];
@@ -196,7 +196,7 @@ function it_returns_cart_shipping_methods(
ShippingMethodInterface::class,
[],
$context,
- Request::METHOD_GET
+ Request::METHOD_GET,
)
->shouldReturn([$cartShippingMethod])
;
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/ChannelAwareItemDataProviderSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/ChannelAwareItemDataProviderSpec.php
index 3bff9a499f6..0886f4697e6 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/ChannelAwareItemDataProviderSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/ChannelAwareItemDataProviderSpec.php
@@ -26,7 +26,7 @@ function it_is_an_item_data_provider(): void
function it_adds_channel_to_the_context_if_not_there_yet(
ItemDataProviderInterface $itemDataProvider,
ChannelContextInterface $channelContext,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$channelContext->getChannel()->willReturn($channel);
@@ -37,7 +37,7 @@ function it_adds_channel_to_the_context_if_not_there_yet(
function it_does_not_add_channel_to_the_context_silently_if_it_could_not_be_found(
ItemDataProviderInterface $itemDataProvider,
- ChannelContextInterface $channelContext
+ ChannelContextInterface $channelContext,
): void {
$channelContext->getChannel()->willThrow(ChannelNotFoundException::class);
@@ -49,7 +49,7 @@ function it_does_not_add_channel_to_the_context_silently_if_it_could_not_be_foun
function it_does_not_add_channel_to_the_context_if_it_is_already_added(
ItemDataProviderInterface $itemDataProvider,
ChannelContextInterface $channelContext,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$channelContext->getChannel()->shouldNotBeCalled();
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/CountryCollectionDataProviderSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/CountryCollectionDataProviderSpec.php
index 71d39c59cd8..3260321e5de 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/CountryCollectionDataProviderSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/CountryCollectionDataProviderSpec.php
@@ -41,7 +41,7 @@ function it_provides_countries_from_channel_if_logged_in_user_is_not_admin_user(
UserContextInterface $userContext,
UserInterface $user,
ChannelInterface $channel,
- CountryInterface $country
+ CountryInterface $country,
): void {
$userContext->getUser()->willReturn($user);
$user->getRoles()->willReturn(['ROLE_USER']);
@@ -57,7 +57,7 @@ function it_provides_countries_from_channel_if_logged_in_user_is_not_admin_user(
function it_provides_countries_from_channel_if_there_is_no_logged_in_user(
UserContextInterface $userContext,
ChannelInterface $channel,
- CountryInterface $country
+ CountryInterface $country,
): void {
$userContext->getUser()->willReturn(null);
@@ -73,7 +73,7 @@ function it_provides_all_countries_if_channel_has_no_associated_countries_and_th
RepositoryInterface $countryRepository,
UserContextInterface $userContext,
ChannelInterface $channel,
- CountryInterface $country
+ CountryInterface $country,
): void {
$userContext->getUser()->willReturn(null);
@@ -90,7 +90,7 @@ function it_provides_all_countries_if_channel_has_no_associated_countries_and_th
function it_provides_all_countries_if_there_is_no_channel_in_context(
RepositoryInterface $countryRepository,
UserContextInterface $userContext,
- CountryInterface $country
+ CountryInterface $country,
): void {
$userContext->getUser()->willReturn(null);
@@ -107,7 +107,7 @@ function it_provides_all_countries_if_logged_in_user_is_an_admin_user(
UserContextInterface $userContext,
AdminUserInterface $user,
ChannelInterface $channel,
- CountryInterface $country
+ CountryInterface $country,
): void {
$userContext->getUser()->willReturn($user);
$user->getRoles()->willReturn(['ROLE_API_ACCESS']);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/CustomerItemDataProviderSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/CustomerItemDataProviderSpec.php
index 7fe67d85e31..cc5241e1af6 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/CustomerItemDataProviderSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/CustomerItemDataProviderSpec.php
@@ -39,7 +39,7 @@ function it_provides_customer_by_id_for_logged_in_admin_user(
UserContextInterface $userContext,
AdminUserInterface $user,
CustomerRepositoryInterface $customerRepository,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$userContext->getUser()->willReturn($user);
$user->getRoles()->willReturn(['ROLE_API_ACCESS']);
@@ -51,7 +51,7 @@ function it_provides_customer_by_id_for_logged_in_admin_user(
CustomerInterface::class,
'1',
Request::METHOD_PUT,
- []
+ [],
)
->shouldReturn($customer)
;
@@ -61,7 +61,7 @@ function it_provides_customer_by_id_for_logged_in_same_customer(
UserContextInterface $userContext,
ShopUserInterface $user,
CustomerInterface $customer,
- CustomerRepositoryInterface $customerRepository
+ CustomerRepositoryInterface $customerRepository,
): void {
$userContext->getUser()->willReturn($user);
$user->getCustomer()->willReturn($customer);
@@ -74,7 +74,7 @@ function it_provides_customer_by_id_for_logged_in_same_customer(
CustomerInterface::class,
'1',
Request::METHOD_PUT,
- []
+ [],
)
->shouldReturn($customer)
;
@@ -84,7 +84,7 @@ function it_provides_null_when_logged_in_customer_try_to_get_another_customer(
UserContextInterface $userContext,
ShopUserInterface $user,
CustomerInterface $customer,
- CustomerRepositoryInterface $customerRepository
+ CustomerRepositoryInterface $customerRepository,
): void {
$userContext->getUser()->willReturn($user);
$user->getCustomer()->willReturn($customer);
@@ -97,7 +97,7 @@ function it_provides_null_when_logged_in_customer_try_to_get_another_customer(
CustomerInterface::class,
'2',
Request::METHOD_PUT,
- []
+ [],
)
->shouldReturn(null)
;
@@ -107,7 +107,7 @@ function it_provides_customer_by_id_for_email_verification_purpose(
UserContextInterface $userContext,
ShopUserInterface $user,
CustomerInterface $customer,
- CustomerRepositoryInterface $customerRepository
+ CustomerRepositoryInterface $customerRepository,
): void {
$userContext->getUser()->willReturn($user);
$user->getCustomer()->willReturn($customer);
@@ -120,7 +120,7 @@ function it_provides_customer_by_id_for_email_verification_purpose(
CustomerInterface::class,
'1',
'shop_verify_customer_account',
- []
+ [],
)
->shouldReturn($customer)
;
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/OrderAdjustmentsSubresourceDataProviderSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/OrderAdjustmentsSubresourceDataProviderSpec.php
index 45a85a4a2eb..a9cc362aaf9 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/OrderAdjustmentsSubresourceDataProviderSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/OrderAdjustmentsSubresourceDataProviderSpec.php
@@ -67,7 +67,7 @@ function it_throws_an_exception_if_order_with_given_token_does_not_exist(OrderRe
function it_returns_order_adjustments(
OrderRepositoryInterface $orderRepository,
OrderInterface $order,
- AdjustmentInterface $adjustment
+ AdjustmentInterface $adjustment,
): void {
$context['subresource_identifiers'] = ['tokenValue' => 'TOKEN'];
$orderRepository->findOneBy(['tokenValue' => 'TOKEN'])->willReturn($order);
@@ -79,7 +79,7 @@ function it_returns_order_adjustments(
AdjustmentInterface::class,
[],
$context,
- Request::METHOD_GET
+ Request::METHOD_GET,
)
->shouldBeLike(new ArrayCollection([$adjustment->getWrappedObject()]))
;
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/OrderItemAdjustmentsSubresourceDataProviderSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/OrderItemAdjustmentsSubresourceDataProviderSpec.php
index f292c2a55cf..57920fc950d 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/OrderItemAdjustmentsSubresourceDataProviderSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/OrderItemAdjustmentsSubresourceDataProviderSpec.php
@@ -43,7 +43,7 @@ function it_supports_only_order_item_adjustments_subresource_data_provider(): vo
}
function it_throws_an_exception_if_order_item_with_given_id_does_not_exist(
- OrderItemRepositoryInterface $orderItemRepository
+ OrderItemRepositoryInterface $orderItemRepository,
): void {
$context['subresource_identifiers'] = ['tokenValue' => 'TOKEN', 'items' => 11];
$orderItemRepository->find(11)->willReturn(null);
@@ -62,7 +62,7 @@ function it_throws_an_exception_if_order_item_with_given_id_does_not_exist(
function it_returns_order_adjustments(
OrderItemRepositoryInterface $orderItemRepository,
OrderItemInterface $orderItem,
- AdjustmentInterface $adjustment
+ AdjustmentInterface $adjustment,
): void {
$context['subresource_identifiers'] = ['tokenValue' => 'TOKEN', 'items' => 11];
$orderItemRepository->find(11)->willReturn($orderItem);
@@ -74,7 +74,7 @@ function it_returns_order_adjustments(
AdjustmentInterface::class,
[],
$context,
- Request::METHOD_GET
+ Request::METHOD_GET,
)
->shouldBeLike(new ArrayCollection([$adjustment->getWrappedObject()]))
;
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/OrderItemItemDataProviderSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/OrderItemItemDataProviderSpec.php
index 438245b16ed..306bdc71b71 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/OrderItemItemDataProviderSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/OrderItemItemDataProviderSpec.php
@@ -41,7 +41,7 @@ function it_provides_order_item_for_shop_user(
UserContextInterface $userContext,
ShopUserInterface $shopUser,
CustomerInterface $customer,
- OrderItemInterface $orderItem
+ OrderItemInterface $orderItem,
) {
$userContext->getUser()->willReturn($shopUser);
@@ -60,7 +60,7 @@ function it_provides_order_item_for_admin_user(
OrderItemRepositoryInterface $orderItemRepository,
UserContextInterface $userContext,
AdminUserInterface $adminUser,
- OrderItemInterface $orderItem
+ OrderItemInterface $orderItem,
) {
$userContext->getUser()->willReturn($adminUser);
@@ -74,7 +74,7 @@ function it_provides_order_item_for_admin_user(
function it_returns_null_if_shop_user_has_no_customer(
OrderItemRepositoryInterface $orderItemRepository,
UserContextInterface $userContext,
- ShopUserInterface $shopUser
+ ShopUserInterface $shopUser,
) {
$userContext->getUser()->willReturn($shopUser);
@@ -90,7 +90,7 @@ function it_returns_null_if_shop_user_does_have_proper_roles(
OrderItemRepositoryInterface $orderItemRepository,
UserContextInterface $userContext,
CustomerInterface $customer,
- ShopUserInterface $shopUser
+ ShopUserInterface $shopUser,
) {
$userContext->getUser()->willReturn($shopUser);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/OrderItemUnitItemDataProviderSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/OrderItemUnitItemDataProviderSpec.php
index 802d0ccac38..4c9c1d8275c 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/OrderItemUnitItemDataProviderSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/OrderItemUnitItemDataProviderSpec.php
@@ -41,7 +41,7 @@ function it_provides_order_item_unit_for_shop_user(
UserContextInterface $userContext,
ShopUserInterface $shopUser,
CustomerInterface $customer,
- OrderItemUnitInterface $orderItemUnit
+ OrderItemUnitInterface $orderItemUnit,
) {
$userContext->getUser()->willReturn($shopUser);
@@ -60,7 +60,7 @@ function it_provides_order_item_unit_for_admin_user(
OrderItemUnitRepositoryInterface $orderItemUnitRepository,
UserContextInterface $userContext,
AdminUserInterface $adminUser,
- OrderItemUnitInterface $orderItemUnit
+ OrderItemUnitInterface $orderItemUnit,
) {
$userContext->getUser()->willReturn($adminUser);
@@ -74,7 +74,7 @@ function it_provides_order_item_unit_for_admin_user(
function it_returns_null_if_shop_user_has_no_customer(
OrderItemUnitRepositoryInterface $orderItemUnitRepository,
UserContextInterface $userContext,
- ShopUserInterface $shopUser
+ ShopUserInterface $shopUser,
) {
$userContext->getUser()->willReturn($shopUser);
@@ -90,7 +90,7 @@ function it_returns_null_if_shop_user_does_have_proper_roles(
OrderItemUnitRepositoryInterface $orderItemUnitRepository,
UserContextInterface $userContext,
CustomerInterface $customer,
- ShopUserInterface $shopUser
+ ShopUserInterface $shopUser,
) {
$userContext->getUser()->willReturn($shopUser);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/PaymentItemDataProviderSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/PaymentItemDataProviderSpec.php
index 62d3304a065..2c5a858745f 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/PaymentItemDataProviderSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/PaymentItemDataProviderSpec.php
@@ -41,7 +41,7 @@ function it_provides_payment_for_shop_user(
UserContextInterface $userContext,
ShopUserInterface $shopUser,
CustomerInterface $customer,
- PaymentInterface $payment
+ PaymentInterface $payment,
) {
$userContext->getUser()->willReturn($shopUser);
@@ -60,7 +60,7 @@ function it_provides_payment_for_admin_user(
PaymentRepositoryInterface $paymentRepository,
UserContextInterface $userContext,
AdminUserInterface $adminUser,
- PaymentInterface $payment
+ PaymentInterface $payment,
) {
$userContext->getUser()->willReturn($adminUser);
@@ -74,7 +74,7 @@ function it_provides_payment_for_admin_user(
function it_returns_null_if_shop_user_has_no_customer(
PaymentRepositoryInterface $paymentRepository,
UserContextInterface $userContext,
- ShopUserInterface $shopUser
+ ShopUserInterface $shopUser,
) {
$userContext->getUser()->willReturn($shopUser);
@@ -90,7 +90,7 @@ function it_returns_null_if_shop_user_does_have_proper_roles(
PaymentRepositoryInterface $paymentRepository,
UserContextInterface $userContext,
CustomerInterface $customer,
- ShopUserInterface $shopUser
+ ShopUserInterface $shopUser,
) {
$userContext->getUser()->willReturn($shopUser);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/ProductItemDataProviderSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/ProductItemDataProviderSpec.php
index 7fcf461d41c..09ebe3ca88f 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/ProductItemDataProviderSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/ProductItemDataProviderSpec.php
@@ -49,7 +49,7 @@ function it_provides_product_by_code_for_a_logged_in_admin_user(
ProductRepositoryInterface $productRepository,
UserContextInterface $userContext,
AdminUserInterface $user,
- ProductInterface $product
+ ProductInterface $product,
): void {
$userContext->getUser()->willReturn($user);
$user->getRoles()->willReturn(['ROLE_API_ACCESS']);
@@ -67,7 +67,7 @@ function it_provides_product_by_slug_for_a_logged_in_shop_user(
UserContextInterface $userContext,
UserInterface $user,
ChannelInterface $channel,
- ProductInterface $product
+ ProductInterface $product,
): void {
$userContext->getUser()->willReturn($user);
$user->getRoles()->willReturn([]);
@@ -81,7 +81,7 @@ function it_provides_product_by_slug_for_a_logged_in_shop_user(
Request::METHOD_GET,
[
ContextKeys::CHANNEL => $channel,
- ]
+ ],
)
->shouldReturn($product)
;
@@ -91,7 +91,7 @@ function it_provides_product_by_slug_if_there_is_no_logged_in_user(
ProductRepositoryInterface $productRepository,
UserContextInterface $userContext,
ChannelInterface $channel,
- ProductInterface $product
+ ProductInterface $product,
): void {
$userContext->getUser()->willReturn(null);
@@ -104,7 +104,7 @@ function it_provides_product_by_slug_if_there_is_no_logged_in_user(
Request::METHOD_GET,
[
ContextKeys::CHANNEL => $channel,
- ]
+ ],
)
->shouldReturn($product)
;
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/ShipmentItemDataProviderSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/ShipmentItemDataProviderSpec.php
index 775f02f4814..45a0586eed5 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/ShipmentItemDataProviderSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/ShipmentItemDataProviderSpec.php
@@ -41,7 +41,7 @@ function it_provides_shipment_for_shop_user(
UserContextInterface $userContext,
ShopUserInterface $shopUser,
CustomerInterface $customer,
- ShipmentInterface $shipment
+ ShipmentInterface $shipment,
) {
$userContext->getUser()->willReturn($shopUser);
@@ -60,7 +60,7 @@ function it_provides_shipment_for_admin_user(
ShipmentRepositoryInterface $shipmentRepository,
UserContextInterface $userContext,
AdminUserInterface $adminUser,
- ShipmentInterface $shipment
+ ShipmentInterface $shipment,
) {
$userContext->getUser()->willReturn($adminUser);
@@ -74,7 +74,7 @@ function it_provides_shipment_for_admin_user(
function it_returns_null_if_shop_user_has_no_customer(
ShipmentRepositoryInterface $shipmentRepository,
UserContextInterface $userContext,
- ShopUserInterface $shopUser
+ ShopUserInterface $shopUser,
) {
$userContext->getUser()->willReturn($shopUser);
@@ -90,7 +90,7 @@ function it_returns_null_if_shop_user_does_have_proper_roles(
ShipmentRepositoryInterface $shipmentRepository,
UserContextInterface $userContext,
CustomerInterface $customer,
- ShopUserInterface $shopUser
+ ShopUserInterface $shopUser,
) {
$userContext->getUser()->willReturn($shopUser);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/TaxonCollectionDataProviderSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/TaxonCollectionDataProviderSpec.php
index 3ef3ce029f8..514671d5f33 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataProvider/TaxonCollectionDataProviderSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataProvider/TaxonCollectionDataProviderSpec.php
@@ -50,7 +50,7 @@ function it_provides_taxon_from_channel_menu_taxon_if_logged_in_user_is_not_admi
TaxonInterface $firstTaxon,
TaxonInterface $secondTaxon,
ChannelInterface $channel,
- UserInterface $user
+ UserInterface $user,
): void {
$userContext->getUser()->willReturn($user);
$user->getRoles()->willReturn(['ROLE_USER']);
@@ -70,7 +70,7 @@ function it_provides_taxon_from_channel_menu_taxon_if_there_is_no_logged_in_user
TaxonInterface $menuTaxon,
TaxonInterface $firstTaxon,
TaxonInterface $secondTaxon,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$userContext->getUser()->willReturn(null);
@@ -91,7 +91,7 @@ function it_provides_all_taxons_if_logged_in_user_is_admin(
TaxonInterface $secondTaxon,
TaxonInterface $thirdTaxon,
ChannelInterface $channel,
- UserInterface $user
+ UserInterface $user,
): void {
$userContext->getUser()->willReturn($user);
$user->getRoles()->willReturn(['ROLE_API_ACCESS']);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataTransformer/CommandAwareInputDataTransformerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataTransformer/CommandAwareInputDataTransformerSpec.php
index 5a3d0a439ae..c007e0f78c0 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataTransformer/CommandAwareInputDataTransformerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataTransformer/CommandAwareInputDataTransformerSpec.php
@@ -42,9 +42,10 @@ function it_transforms_object_by_proper_data_transformer(CommandDataTransformerI
->transform(
$object,
CommandAwareDataTransformerInterface::class,
- $this::$CONTEXT
+ $this::$CONTEXT,
)
- ->shouldReturn($object);
+ ->shouldReturn($object)
+ ;
}
function it_supports_only_command_aware_data_transformer_type(): void
@@ -58,7 +59,7 @@ function it_supports_only_command_aware_data_transformer_type(): void
->supportsTransformation(
new PickupCart(),
CommandAwareDataTransformerInterface::class,
- ['input' => ['class' => Order::class]]
+ ['input' => ['class' => Order::class]],
)
->shouldReturn(false)
;
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataTransformer/LocaleCodeAwareInputCommandDataTransformerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataTransformer/LocaleCodeAwareInputCommandDataTransformerSpec.php
index 93f8c5592ce..5a4a4bf8438 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataTransformer/LocaleCodeAwareInputCommandDataTransformerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataTransformer/LocaleCodeAwareInputCommandDataTransformerSpec.php
@@ -27,7 +27,7 @@ function let(LocaleContextInterface $localeContext): void
function it_supports_only_locale_code_aware_interface(
LocaleCodeAwareInterface $localeCodeAware,
- ResourceInterface $resource
+ ResourceInterface $resource,
): void {
$this->supportsTransformation($localeCodeAware)->shouldReturn(true);
$this->supportsTransformation($resource)->shouldReturn(false);
@@ -35,7 +35,7 @@ function it_supports_only_locale_code_aware_interface(
function it_adds_locale_code_to_object(
LocaleContextInterface $localeContext,
- LocaleCodeAwareInterface $command
+ LocaleCodeAwareInterface $command,
): void {
$command->getLocaleCode()->willReturn(null);
@@ -47,7 +47,7 @@ function it_adds_locale_code_to_object(
}
function it_does_nothing_if_object_has_locale_code(
- LocaleCodeAwareInterface $command
+ LocaleCodeAwareInterface $command,
): void {
$command->getLocaleCode()->willReturn('en_US');
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataTransformer/LoggedInShopUserEmailAwareCommandDataTransformerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataTransformer/LoggedInShopUserEmailAwareCommandDataTransformerSpec.php
index 288b305e58b..f9b71d8c40f 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataTransformer/LoggedInShopUserEmailAwareCommandDataTransformerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataTransformer/LoggedInShopUserEmailAwareCommandDataTransformerSpec.php
@@ -30,7 +30,7 @@ function let(UserContextInterface $userContext)
function it_adds_email_to_add_product_review_for_logged_in_customer(
UserContextInterface $userContext,
ShopUserInterface $shopUser,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$userContext->getUser()->willReturn($shopUser);
@@ -41,17 +41,17 @@ function it_adds_email_to_add_product_review_for_logged_in_customer(
'Good stuff',
5,
'Really good stuff',
- 'winter_cap'
+ 'winter_cap',
),
'Sylius\Component\Core\Model\ProductReview',
- []
+ [],
);
}
function it_does_not_add_email_to_add_product_review_for_visitor(
UserContextInterface $userContext,
ShopUserInterface $shopUser,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$userContext->getUser()->willReturn($shopUser);
@@ -63,10 +63,10 @@ function it_does_not_add_email_to_add_product_review_for_visitor(
5,
'Really good stuff',
'winter_cap',
- 'john@example.com'
+ 'john@example.com',
),
'Sylius\Component\Core\Model\ProductReview',
- []
+ [],
);
}
@@ -77,8 +77,8 @@ function it_supports_command_for_adding_product_review(): void
'Good stuff',
5,
'Really good stuff',
- 'winter_cap'
- )
+ 'winter_cap',
+ ),
)->shouldReturn(true);
}
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataTransformer/LoggedInShopUserIdAwareCommandDataTransformerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataTransformer/LoggedInShopUserIdAwareCommandDataTransformerSpec.php
index a323ae07f25..f0871ae18b1 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataTransformer/LoggedInShopUserIdAwareCommandDataTransformerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataTransformer/LoggedInShopUserIdAwareCommandDataTransformerSpec.php
@@ -30,7 +30,7 @@ function let(UserContextInterface $userContext): void
function it_supports_only_shop_user_id_commands(
ShopUserIdAwareInterface $shopUserIdAware,
- CommandAwareDataTransformerInterface $commandAwareDataTransformer
+ CommandAwareDataTransformerInterface $commandAwareDataTransformer,
): void {
$this->supportsTransformation($shopUserIdAware)->shouldReturn(true);
$this->supportsTransformation($commandAwareDataTransformer)->shouldReturn(false);
@@ -39,7 +39,7 @@ function it_supports_only_shop_user_id_commands(
function it_sets_current_shop_user_id(
UserContextInterface $userContext,
ShopUserInterface $shopUser,
- ShopUserIdAwareInterface $shopUserIdAwareCommand
+ ShopUserIdAwareInterface $shopUserIdAwareCommand,
): void {
$userContext->getUser()->willReturn($shopUser);
@@ -53,7 +53,7 @@ function it_sets_current_shop_user_id(
function it_does_nothing_if_logged_in_user_is_not_shop_user(
UserContextInterface $userContext,
UserInterface $user,
- ShopUserIdAwareInterface $shopUserIdAwareCommand
+ ShopUserIdAwareInterface $shopUserIdAwareCommand,
): void {
$userContext->getUser()->willReturn($user);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/DataTransformer/ShipmentIdAwareInputCommandDataTransformerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/DataTransformer/ShipmentIdAwareInputCommandDataTransformerSpec.php
index d84a04154d9..727dd1bb0d6 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/DataTransformer/ShipmentIdAwareInputCommandDataTransformerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/DataTransformer/ShipmentIdAwareInputCommandDataTransformerSpec.php
@@ -22,7 +22,7 @@ final class ShipmentIdAwareInputCommandDataTransformerSpec extends ObjectBehavio
{
function it_supports_only_shipment_id_aware_interface(
LocaleCodeAwareInterface $localeCodeAware,
- ShipmentIdAwareInterface $shipmentIdAware
+ ShipmentIdAwareInterface $shipmentIdAware,
): void {
$this->supportsTransformation($localeCodeAware)->shouldReturn(false);
$this->supportsTransformation($shipmentIdAware)->shouldReturn(true);
@@ -30,7 +30,7 @@ function it_supports_only_shipment_id_aware_interface(
function it_adds_shipment_id_to_object(
ShipmentIdAwareInterface $command,
- ShipmentInterface $shipment
+ ShipmentInterface $shipment,
): void {
$context = ['object_to_populate' => $shipment];
$shipment->getId()->willReturn(123);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryCollectionExtension/AcceptedProductReviewsExtensionSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryCollectionExtension/AcceptedProductReviewsExtensionSpec.php
index f08cec8b8d0..c3e30f4726d 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryCollectionExtension/AcceptedProductReviewsExtensionSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryCollectionExtension/AcceptedProductReviewsExtensionSpec.php
@@ -29,7 +29,7 @@ function let(): void
function it_does_nothing_if_current_resource_is_not_a_product_review(
QueryBuilder $queryBuilder,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$queryBuilder->getRootAliases()->shouldNotBeCalled();
@@ -41,7 +41,7 @@ function it_does_nothing_if_current_resource_is_not_a_product_review(
function it_does_nothing_if_operation_name_is_not_shop_get(
QueryBuilder $queryBuilder,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$queryBuilder->getRootAliases()->shouldNotBeCalled();
@@ -53,7 +53,7 @@ function it_does_nothing_if_operation_name_is_not_shop_get(
function it_filters_accepted_product_reviews(
QueryBuilder $queryBuilder,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$queryBuilder->getRootAliases()->willReturn(['o']);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryCollectionExtension/AddressesExtensionSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryCollectionExtension/AddressesExtensionSpec.php
index 4ae0b82c7b3..3a7e0db205a 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryCollectionExtension/AddressesExtensionSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryCollectionExtension/AddressesExtensionSpec.php
@@ -37,7 +37,7 @@ function it_applies_conditions_to_get_addresses_for_logged_in_shop_user(
QueryBuilder $queryBuilder,
QueryNameGeneratorInterface $queryNameGenerator,
ShopUserInterface $shopUser,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$userContext->getUser()->willReturn($shopUser);
$shopUser->getCustomer()->willReturn($customer);
@@ -53,7 +53,7 @@ function it_applies_conditions_to_get_addresses_for_logged_in_shop_user(
$queryNameGenerator,
AddressInterface::class,
Request::METHOD_GET,
- []
+ [],
);
}
@@ -61,7 +61,7 @@ function it_does_not_apply_conditions_to_get_addresses_for_logged_in_admin_user(
UserContextInterface $userContext,
QueryBuilder $queryBuilder,
QueryNameGeneratorInterface $queryNameGenerator,
- AdminUserInterface $adminUser
+ AdminUserInterface $adminUser,
): void {
$userContext->getUser()->willReturn($adminUser);
$adminUser->getRoles()->willReturn(['ROLE_API_ACCESS']);
@@ -73,14 +73,14 @@ function it_does_not_apply_conditions_to_get_addresses_for_logged_in_admin_user(
$queryNameGenerator,
AddressInterface::class,
Request::METHOD_GET,
- []
+ [],
);
}
function it_throws_an_exception_if_there_is_not_logged_in_user(
UserContextInterface $userContext,
QueryBuilder $queryBuilder,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$userContext->getUser()->willReturn(null);
@@ -96,7 +96,7 @@ function it_throws_an_exception_if_there_is_not_logged_in_user(
AddressInterface::class,
Request::METHOD_GET,
[],
- ]
+ ],
)
;
}
@@ -105,7 +105,7 @@ function it_throws_an_exception_if_there_is_logged_in_admin_user_without_proper_
UserContextInterface $userContext,
QueryBuilder $queryBuilder,
QueryNameGeneratorInterface $queryNameGenerator,
- AdminUserInterface $adminUser
+ AdminUserInterface $adminUser,
): void {
$userContext->getUser()->willReturn($adminUser);
$adminUser->getRoles()->willReturn([]);
@@ -122,7 +122,7 @@ function it_throws_an_exception_if_there_is_logged_in_admin_user_without_proper_
AddressInterface::class,
Request::METHOD_GET,
[],
- ]
+ ],
)
;
}
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryCollectionExtension/OrdersByLoggedInUserExtensionSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryCollectionExtension/OrdersByLoggedInUserExtensionSpec.php
index 6d4fc80b5d2..d226e28c08c 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryCollectionExtension/OrdersByLoggedInUserExtensionSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryCollectionExtension/OrdersByLoggedInUserExtensionSpec.php
@@ -35,7 +35,7 @@ function let(UserContextInterface $userContext): void
function it_does_nothing_if_current_resource_is_not_an_order(
UserContextInterface $userContext,
QueryBuilder $queryBuilder,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$userContext->getUser()->shouldNotBeCalled();
$queryBuilder->getRootAliases()->shouldNotBeCalled();
@@ -47,7 +47,7 @@ function it_filters_out_carts_for_all_users(
UserContextInterface $userContext,
AdminUserInterface $user,
QueryBuilder $queryBuilder,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$userContext->getUser()->willReturn($user);
@@ -63,7 +63,7 @@ function it_filters_orders_for_shop_user(
ShopUserInterface $user,
CustomerInterface $customer,
QueryBuilder $queryBuilder,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$userContext->getUser()->willReturn($user);
$user->getCustomer()->willReturn($customer);
@@ -81,7 +81,7 @@ function it_throws_an_access_denied_exception_if_user_is_not_recognised(
UserContextInterface $userContext,
UserInterface $user,
QueryBuilder $queryBuilder,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$userContext->getUser()->willReturn($user);
@@ -99,7 +99,7 @@ function it_throws_an_access_denied_exception_if_user_is_not_recognised(
OrderInterface::class,
'get',
[],
- ]
+ ],
)
;
}
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryCollectionExtension/ProductsByChannelAndLocaleCodeExtensionSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryCollectionExtension/ProductsByChannelAndLocaleCodeExtensionSpec.php
index badd95bde54..b2ca0b9690b 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryCollectionExtension/ProductsByChannelAndLocaleCodeExtensionSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryCollectionExtension/ProductsByChannelAndLocaleCodeExtensionSpec.php
@@ -33,7 +33,7 @@ function let(UserContextInterface $userContext): void
function it_does_nothing_if_current_resource_is_not_a_product(
UserContextInterface $userContext,
QueryBuilder $queryBuilder,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$userContext->getUser()->shouldNotBeCalled();
$queryBuilder->getRootAliases()->shouldNotBeCalled();
@@ -46,7 +46,7 @@ function it_throws_an_exception_if_context_has_no_channel_for_shop_user(
UserContextInterface $userContext,
UserInterface $user,
QueryBuilder $queryBuilder,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$userContext->getUser()->willReturn($user);
$user->getRoles()->willReturn([]);
@@ -62,7 +62,7 @@ function it_throws_an_exception_if_context_has_no_locale_for_shop_user(
UserInterface $user,
QueryBuilder $queryBuilder,
QueryNameGeneratorInterface $queryNameGenerator,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$userContext->getUser()->willReturn($user);
$user->getRoles()->willReturn([]);
@@ -77,7 +77,7 @@ function it_does_nothing_if_current_user_is_an_admin_user(
UserContextInterface $userContext,
UserInterface $user,
QueryBuilder $queryBuilder,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$userContext->getUser()->willReturn($user);
$user->getRoles()->willReturn(['ROLE_API_ACCESS']);
@@ -93,7 +93,7 @@ function it_filters_products_by_channel_and_locale_code_for_shop_user(
UserInterface $user,
QueryBuilder $queryBuilder,
QueryNameGeneratorInterface $queryNameGenerator,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$userContext->getUser()->willReturn($user);
$user->getRoles()->willReturn([]);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryCollectionExtension/ProductsWithEnableFlagExtensionSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryCollectionExtension/ProductsWithEnableFlagExtensionSpec.php
index ee261be5e88..fdabf24053a 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryCollectionExtension/ProductsWithEnableFlagExtensionSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryCollectionExtension/ProductsWithEnableFlagExtensionSpec.php
@@ -33,7 +33,7 @@ function let(UserContextInterface $userContext)
function it_does_nothing_if_current_resource_is_not_a_product(
UserContextInterface $userContext,
QueryBuilder $queryBuilder,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$userContext->getUser()->shouldNotBeCalled();
$queryBuilder->getRootAliases()->shouldNotBeCalled();
@@ -45,7 +45,7 @@ function it_does_nothing_if_current_user_is_an_admin_user(
UserContextInterface $userContext,
UserInterface $user,
QueryBuilder $queryBuilder,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$userContext->getUser()->willReturn($user);
$user->getRoles()->willReturn(['ROLE_API_ACCESS']);
@@ -60,7 +60,7 @@ function it_filters_products_by_enabled_flag_for_shop_user(
UserInterface $user,
QueryBuilder $queryBuilder,
QueryNameGeneratorInterface $queryNameGenerator,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$userContext->getUser()->willReturn($user);
$user->getRoles()->willReturn([]);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryItemExtension/OrderGetMethodItemExtensionSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryItemExtension/OrderGetMethodItemExtensionSpec.php
index 9cafff194c9..39950c6460f 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryItemExtension/OrderGetMethodItemExtensionSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryItemExtension/OrderGetMethodItemExtensionSpec.php
@@ -36,7 +36,7 @@ function it_applies_conditions_to_get_order_with_state_cart_and_without_user_if_
UserContextInterface $userContext,
QueryBuilder $queryBuilder,
QueryNameGeneratorInterface $queryNameGenerator,
- Expr $expr
+ Expr $expr,
): void {
$queryBuilder->getRootAliases()->willReturn(['o']);
@@ -57,7 +57,8 @@ function it_applies_conditions_to_get_order_with_state_cart_and_without_user_if_
$queryBuilder
->expr()
->shouldBeCalled()
- ->willReturn($expr);
+ ->willReturn($expr)
+ ;
$expr
->orX('user IS NULL', sprintf('%s.customer IS NULL', 'o'))
@@ -86,7 +87,7 @@ function it_applies_conditions_to_get_order_with_state_cart_by_authorized_shop_u
QueryBuilder $queryBuilder,
ShopUserInterface $shopUser,
CustomerInterface $customer,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$queryBuilder->getRootAliases()->willReturn(['o']);
@@ -122,7 +123,7 @@ function it_throws_an_exception_when_unauthorized_shop_user_try_to_get_order_wit
QueryBuilder $queryBuilder,
ShopUserInterface $shopUser,
CustomerInterface $customer,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$queryBuilder->getRootAliases()->willReturn(['o']);
@@ -142,7 +143,7 @@ function it_throws_an_exception_when_unauthorized_shop_user_try_to_get_order_wit
['tokenValue' => 'xaza-tt_fee'],
Request::METHOD_GET,
[ContextKeys::HTTP_REQUEST_METHOD_TYPE => Request::METHOD_GET],
- ]
+ ],
)
;
}
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryItemExtension/OrderMethodsItemExtensionSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryItemExtension/OrderMethodsItemExtensionSpec.php
index 19b9bae081a..3e46a775868 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryItemExtension/OrderMethodsItemExtensionSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/QueryItemExtension/OrderMethodsItemExtensionSpec.php
@@ -37,7 +37,7 @@ function it_applies_conditions_to_delete_order_with_state_cart_and_with_null_use
UserContextInterface $userContext,
QueryBuilder $queryBuilder,
QueryNameGeneratorInterface $queryNameGenerator,
- Expr $expr
+ Expr $expr,
): void {
$queryBuilder->getRootAliases()->willReturn(['o']);
@@ -58,7 +58,8 @@ function it_applies_conditions_to_delete_order_with_state_cart_and_with_null_use
$queryBuilder
->expr()
->shouldBeCalled()
- ->willReturn($expr);
+ ->willReturn($expr)
+ ;
$expr
->orX('user IS NULL', sprintf('%s.customer IS NULL', 'o'))
@@ -98,7 +99,7 @@ function it_applies_conditions_to_patch_order_with_state_cart_and_with_null_user
UserContextInterface $userContext,
QueryBuilder $queryBuilder,
QueryNameGeneratorInterface $queryNameGenerator,
- Expr $expr
+ Expr $expr,
): void {
$queryBuilder->getRootAliases()->willReturn(['o']);
@@ -119,7 +120,8 @@ function it_applies_conditions_to_patch_order_with_state_cart_and_with_null_user
$queryBuilder
->expr()
->shouldBeCalled()
- ->willReturn($expr);
+ ->willReturn($expr)
+ ;
$expr
->orX('user IS NULL', sprintf('%s.customer IS NULL', 'o'))
@@ -159,7 +161,7 @@ function it_applies_conditions_to_put_order_with_state_cart_and_with_null_user_a
UserContextInterface $userContext,
QueryBuilder $queryBuilder,
QueryNameGeneratorInterface $queryNameGenerator,
- Expr $expr
+ Expr $expr,
): void {
$queryBuilder->getRootAliases()->willReturn(['o']);
@@ -180,7 +182,8 @@ function it_applies_conditions_to_put_order_with_state_cart_and_with_null_user_a
$queryBuilder
->expr()
->shouldBeCalled()
- ->willReturn($expr);
+ ->willReturn($expr)
+ ;
$expr
->orX('user IS NULL', sprintf('%s.customer IS NULL', 'o'))
@@ -221,7 +224,7 @@ function it_applies_conditions_to_put_order_with_state_cart_and_with_null_user_a
QueryBuilder $queryBuilder,
ShopUserInterface $shopUser,
CustomerInterface $customer,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$queryBuilder->getRootAliases()->willReturn(['o']);
@@ -270,7 +273,7 @@ function it_applies_conditions_to_shop_select_payment_method_operation_with_give
QueryBuilder $queryBuilder,
ShopUserInterface $shopUser,
CustomerInterface $customer,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$queryBuilder->getRootAliases()->willReturn(['o']);
@@ -307,7 +310,7 @@ function it_applies_conditions_to_shop_account_change_payment_method_operation_w
QueryBuilder $queryBuilder,
ShopUserInterface $shopUser,
CustomerInterface $customer,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$queryBuilder->getRootAliases()->willReturn(['o']);
@@ -343,7 +346,7 @@ function it_applies_conditions_to_shop_select_payment_method_operation_with_user
UserContextInterface $userContext,
QueryBuilder $queryBuilder,
QueryNameGeneratorInterface $queryNameGenerator,
- Expr $expr
+ Expr $expr,
): void {
$queryBuilder->getRootAliases()->willReturn(['o']);
@@ -389,7 +392,7 @@ function it_applies_conditions_to_patch_order_with_state_cart_and_with_null_user
QueryBuilder $queryBuilder,
ShopUserInterface $shopUser,
CustomerInterface $customer,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$queryBuilder->getRootAliases()->willReturn(['o']);
@@ -437,7 +440,7 @@ function it_applies_conditions_to_delete_order_with_state_cart_and_with_null_use
QueryBuilder $queryBuilder,
ShopUserInterface $shopUser,
CustomerInterface $customer,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$queryBuilder->getRootAliases()->willReturn(['o']);
@@ -486,7 +489,7 @@ function it_applies_conditions_to_delete_order_with_state_cart_by_authorized_sho
QueryBuilder $queryBuilder,
ShopUserInterface $shopUser,
CustomerInterface $customer,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$queryBuilder->getRootAliases()->willReturn(['o']);
@@ -535,7 +538,7 @@ function it_applies_conditions_to_patch_order_with_state_cart_by_authorized_shop
QueryBuilder $queryBuilder,
ShopUserInterface $shopUser,
CustomerInterface $customer,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$queryBuilder->getRootAliases()->willReturn(['o']);
@@ -584,7 +587,7 @@ function it_applies_conditions_to_put_order_with_state_cart_by_authorized_shop_u
QueryBuilder $queryBuilder,
ShopUserInterface $shopUser,
CustomerInterface $customer,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$queryBuilder->getRootAliases()->willReturn(['o']);
@@ -633,7 +636,7 @@ function it_throws_an_exception_when_unauthorized_shop_user_try_to_delete_order_
QueryBuilder $queryBuilder,
ShopUserInterface $shopUser,
CustomerInterface $customer,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$queryBuilder->getRootAliases()->willReturn(['o']);
@@ -654,7 +657,7 @@ function it_throws_an_exception_when_unauthorized_shop_user_try_to_delete_order_
['tokenValue' => 'xaza-tt_fee'],
Request::METHOD_DELETE,
[ContextKeys::HTTP_REQUEST_METHOD_TYPE => Request::METHOD_POST],
- ]
+ ],
)
;
}
@@ -663,7 +666,7 @@ function it_applies_conditions_to_delete_order_with_state_cart_by_authorized_adm
UserContextInterface $userContext,
QueryBuilder $queryBuilder,
AdminUserInterface $adminUser,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$queryBuilder->getRootAliases()->willReturn(['o']);
@@ -697,7 +700,7 @@ function it_applies_conditions_to_patch_order_with_state_cart_by_authorized_admi
UserContextInterface $userContext,
QueryBuilder $queryBuilder,
AdminUserInterface $adminUser,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$queryBuilder->getRootAliases()->willReturn(['o']);
@@ -719,7 +722,7 @@ function it_applies_conditions_to_put_order_with_state_cart_by_authorized_admin_
UserContextInterface $userContext,
QueryBuilder $queryBuilder,
AdminUserInterface $adminUser,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$queryBuilder->getRootAliases()->willReturn(['o']);
@@ -741,7 +744,7 @@ function it_throws_an_exception_when_unauthorized_admin_user_try_to_delete_order
UserContextInterface $userContext,
QueryBuilder $queryBuilder,
AdminUserInterface $adminUser,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$queryBuilder->getRootAliases()->willReturn(['o']);
@@ -759,7 +762,7 @@ function it_throws_an_exception_when_unauthorized_admin_user_try_to_delete_order
['tokenValue' => 'xaza-tt_fee'],
Request::METHOD_DELETE,
[ContextKeys::HTTP_REQUEST_METHOD_TYPE => Request::METHOD_DELETE],
- ]
+ ],
)
;
}
diff --git a/src/Sylius/Bundle/ApiBundle/spec/EventListener/ApiCartBlamerListenerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/EventListener/ApiCartBlamerListenerSpec.php
index 2038a68eaea..95e12e1ec7a 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/EventListener/ApiCartBlamerListenerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/EventListener/ApiCartBlamerListenerSpec.php
@@ -38,7 +38,7 @@ final class ApiCartBlamerListenerSpec extends ObjectBehavior
function let(
CartContextInterface $cartContext,
SectionProviderInterface $sectionResolver,
- MessageBusInterface $commandBus
+ MessageBusInterface $commandBus,
): void {
$this->beConstructedWith($cartContext, $sectionResolver, $commandBus);
}
@@ -50,7 +50,7 @@ function it_throws_an_exception_when_cart_does_not_implement_core_order_interfac
ShopUserInterface $user,
Request $request,
TokenInterface $token,
- ShopApiOrdersSubSection $shopApiOrdersSubSectionSection
+ ShopApiOrdersSubSection $shopApiOrdersSubSectionSection,
): void {
$sectionResolver->getSection()->willReturn($shopApiOrdersSubSectionSection);
$cartContext->getCart()->willReturn($order);
@@ -71,7 +71,7 @@ function it_blames_cart_on_user_on_interactive_login(
ShopUserInterface $user,
CustomerInterface $customer,
ShopApiOrdersSubSection $shopApiOrdersSubSectionSection,
- MessageBusInterface $commandBus
+ MessageBusInterface $commandBus,
): void {
$sectionResolver->getSection()->willReturn($shopApiOrdersSubSectionSection);
$cartContext->getCart()->willReturn($cart);
@@ -100,7 +100,7 @@ function it_does_nothing_if_given_cart_has_been_blamed_in_past(
Request $request,
TokenInterface $token,
CustomerInterface $customer,
- ShopApiOrdersSubSection $shopApiOrdersSubSectionSection
+ ShopApiOrdersSubSection $shopApiOrdersSubSectionSection,
): void {
$sectionResolver->getSection()->willReturn($shopApiOrdersSubSectionSection);
$cartContext->getCart()->willReturn($cart);
@@ -117,7 +117,7 @@ function it_does_nothing_if_given_user_is_invalid_on_interactive_login(
OrderInterface $cart,
Request $request,
TokenInterface $token,
- ShopApiOrdersSubSection $shopApiOrdersSubSectionSection
+ ShopApiOrdersSubSection $shopApiOrdersSubSectionSection,
): void {
$sectionResolver->getSection()->willReturn($shopApiOrdersSubSectionSection);
$cartContext->getCart()->willReturn($cart);
@@ -134,7 +134,7 @@ function it_does_nothing_if_there_is_no_existing_cart_on_interactive_login(
Request $request,
TokenInterface $token,
ShopUserInterface $user,
- ShopApiOrdersSubSection $shopApiOrdersSubSection
+ ShopApiOrdersSubSection $shopApiOrdersSubSection,
): void {
$sectionResolver->getSection()->willReturn($shopApiOrdersSubSection);
$cartContext->getCart()->willThrow(CartNotFoundException::class);
@@ -148,7 +148,7 @@ function it_does_nothing_if_the_current_section_is_not_shop_on_interactive_login
SectionProviderInterface $sectionResolver,
Request $request,
TokenInterface $token,
- SectionInterface $section
+ SectionInterface $section,
): void {
$sectionResolver->getSection()->willReturn($section);
@@ -163,7 +163,7 @@ function it_does_nothing_if_the_current_section_is_not_orders_subsection(
SectionProviderInterface $sectionResolver,
Request $request,
TokenInterface $token,
- AdminApiSection $section
+ AdminApiSection $section,
): void {
$sectionResolver->getSection()->willReturn($section);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/EventListener/AuthenticationSuccessListenerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/EventListener/AuthenticationSuccessListenerSpec.php
index 52ae4b5a9dd..6d7dd400981 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/EventListener/AuthenticationSuccessListenerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/EventListener/AuthenticationSuccessListenerSpec.php
@@ -31,7 +31,7 @@ function let(IriConverterInterface $iriConverter): void
function it_adds_customers_id_to_shop_authentication_token_response(
IriConverterInterface $iriConverter,
ShopUserInterface $shopUser,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$event = new AuthenticationSuccessEvent([], $shopUser->getWrappedObject(), new Response());
@@ -45,7 +45,7 @@ function it_adds_customers_id_to_shop_authentication_token_response(
function it_does_not_add_anything_to_admin_authentication_token_response(
IriConverterInterface $iriConverter,
AdminUserInterface $adminUser,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$event = new AuthenticationSuccessEvent([], $adminUser->getWrappedObject(), new Response());
diff --git a/src/Sylius/Bundle/ApiBundle/spec/EventSubscriber/KernelRequestEventSubscriberSpec.php b/src/Sylius/Bundle/ApiBundle/spec/EventSubscriber/KernelRequestEventSubscriberSpec.php
index b45ad675b76..e7455b340af 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;
@@ -30,7 +29,7 @@ function let(): void
function it_does_nothing_if_api_is_enabled(
RequestEvent $event,
Request $request,
- HttpKernelInterface $kernel
+ HttpKernelInterface $kernel,
): void {
$event->getRequest()->willReturn($request);
@@ -39,14 +38,14 @@ function it_does_nothing_if_api_is_enabled(
$this->validateApi(new RequestEvent(
$kernel->getWrappedObject(),
$request->getWrappedObject(),
- HttpKernelInterface::MASTER_REQUEST
+ HttpKernelInterface::MASTER_REQUEST,
));
}
function it_throws_not_found_exception_if_api_is_disabled(
RequestEvent $event,
Request $request,
- HttpKernelInterface $kernel
+ HttpKernelInterface $kernel,
): void {
$this->beConstructedWith(false, '/api/v2');
@@ -62,16 +61,17 @@ function it_throws_not_found_exception_if_api_is_disabled(
new RequestEvent(
$kernel->getWrappedObject(),
$request->getWrappedObject(),
- HttpKernelInterface::MASTER_REQUEST
- )
- ]
- );
+ HttpKernelInterface::MASTER_REQUEST,
+ ),
+ ],
+ )
+ ;
}
function it_does_nothing_for_non_api_endpoints_when_api_is_disabled(
RequestEvent $event,
Request $request,
- HttpKernelInterface $kernel
+ HttpKernelInterface $kernel,
): void {
$this->beConstructedWith(false, '/api/v2');
@@ -82,7 +82,7 @@ function it_does_nothing_for_non_api_endpoints_when_api_is_disabled(
$this->validateApi(new RequestEvent(
$kernel->getWrappedObject(),
$request->getWrappedObject(),
- HttpKernelInterface::MASTER_REQUEST
+ HttpKernelInterface::MASTER_REQUEST,
));
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/spec/EventSubscriber/ProductSlugEventSubscriberSpec.php b/src/Sylius/Bundle/ApiBundle/spec/EventSubscriber/ProductSlugEventSubscriberSpec.php
index 9dd17fed078..481e8eeb93c 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/EventSubscriber/ProductSlugEventSubscriberSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/EventSubscriber/ProductSlugEventSubscriberSpec.php
@@ -35,7 +35,7 @@ function it_generates_slug_for_product_with_name_and_empty_slug(
ProductInterface $product,
ProductTranslationInterface $productTranslation,
HttpKernelInterface $kernel,
- Request $request
+ Request $request,
): void {
$request->getMethod()->willReturn(Request::METHOD_POST);
@@ -51,7 +51,7 @@ function it_generates_slug_for_product_with_name_and_empty_slug(
$kernel->getWrappedObject(),
$request->getWrappedObject(),
HttpKernelInterface::MASTER_REQUEST,
- $product->getWrappedObject()
+ $product->getWrappedObject(),
));
}
@@ -60,7 +60,7 @@ function it_does_nothing_if_the_product_has_slug(
ProductInterface $product,
ProductTranslationInterface $productTranslation,
HttpKernelInterface $kernel,
- Request $request
+ Request $request,
): void {
$request->getMethod()->willReturn(Request::METHOD_POST);
@@ -75,7 +75,7 @@ function it_does_nothing_if_the_product_has_slug(
$kernel->getWrappedObject(),
$request->getWrappedObject(),
HttpKernelInterface::MASTER_REQUEST,
- $product->getWrappedObject()
+ $product->getWrappedObject(),
));
}
@@ -84,7 +84,7 @@ function it_does_nothing_if_the_product_has_no_name(
ProductInterface $product,
ProductTranslationInterface $productTranslation,
HttpKernelInterface $kernel,
- Request $request
+ Request $request,
): void {
$request->getMethod()->willReturn(Request::METHOD_POST);
@@ -99,7 +99,7 @@ function it_does_nothing_if_the_product_has_no_name(
$kernel->getWrappedObject(),
$request->getWrappedObject(),
HttpKernelInterface::MASTER_REQUEST,
- $product->getWrappedObject()
+ $product->getWrappedObject(),
));
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Filter/TaxonFilterSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Filter/TaxonFilterSpec.php
index 5217f14893c..2e3b7b6135d 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Filter/TaxonFilterSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Filter/TaxonFilterSpec.php
@@ -32,7 +32,7 @@ function it_adds_taxon_filter_if_property_is_taxon(
TaxonInterface $taxon,
TaxonInterface $taxonRoot,
QueryBuilder $queryBuilder,
- QueryNameGeneratorInterface $queryNameGenerator
+ QueryNameGeneratorInterface $queryNameGenerator,
): void {
$iriConverter->getItemFromIri('api/taxon')->willReturn($taxon);
$queryBuilder->getRootAliases()->willReturn(['o']);
@@ -61,7 +61,7 @@ function it_adds_taxon_filter_if_property_is_taxon(
'api/taxon',
$queryBuilder,
$queryNameGenerator,
- 'resourceClass'
+ 'resourceClass',
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Provider/CompositePaymentConfigurationProviderSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Provider/CompositePaymentConfigurationProviderSpec.php
index b65fb26621f..9f08f9aec14 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Provider/CompositePaymentConfigurationProviderSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Provider/CompositePaymentConfigurationProviderSpec.php
@@ -28,7 +28,7 @@ function let(PaymentConfigurationProviderInterface $apiPaymentMethod): void
function it_provides_payment_data_if_payment_is_supported(
PaymentInterface $payment,
PaymentMethodInterface $paymentMethod,
- PaymentConfigurationProviderInterface $apiPaymentMethod
+ PaymentConfigurationProviderInterface $apiPaymentMethod,
): void {
$payment->getMethod()->willReturn($paymentMethod);
@@ -42,7 +42,7 @@ function it_provides_payment_data_if_payment_is_supported(
function it_returns_empty_array_if_payment_is_not_supported(
PaymentInterface $payment,
PaymentMethodInterface $paymentMethod,
- PaymentConfigurationProviderInterface $apiPaymentMethod
+ PaymentConfigurationProviderInterface $apiPaymentMethod,
): void {
$payment->getMethod()->willReturn($paymentMethod);
@@ -57,7 +57,7 @@ function it_supports_more_than_one_payment_method(
PaymentInterface $payment,
PaymentMethodInterface $paymentMethod,
PaymentConfigurationProviderInterface $apiPaymentMethodOne,
- PaymentConfigurationProviderInterface $apiPaymentMethodTwo
+ PaymentConfigurationProviderInterface $apiPaymentMethodTwo,
): void {
$this->beConstructedWith([$apiPaymentMethodOne, $apiPaymentMethodTwo]);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Provider/CustomerProviderSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Provider/CustomerProviderSpec.php
index ac61f87cdbf..9f2cc72e52b 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Provider/CustomerProviderSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Provider/CustomerProviderSpec.php
@@ -25,7 +25,7 @@ class CustomerProviderSpec extends ObjectBehavior
function let(
CanonicalizerInterface $canonicalizer,
FactoryInterface $customerFactory,
- CustomerRepositoryInterface $customerRepository
+ CustomerRepositoryInterface $customerRepository,
): void {
$this->beConstructedWith($canonicalizer, $customerFactory, $customerRepository);
}
@@ -39,7 +39,7 @@ function it_creates_a_customer_if_there_is_no_existing_one_with_given_email(
CanonicalizerInterface $canonicalizer,
FactoryInterface $customerFactory,
CustomerRepositoryInterface $customerRepository,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$canonicalizer->canonicalize('WILL.SMITH@example.com')->willReturn('will.smith@example.com');
$customerRepository->findOneBy(['emailCanonical' => 'will.smith@example.com'])->willReturn(null);
@@ -54,7 +54,7 @@ function it_doesn_not_create_a_customer_if_customer_with_given_email_already_exi
CanonicalizerInterface $canonicalizer,
FactoryInterface $customerFactory,
CustomerRepositoryInterface $customerRepository,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$canonicalizer->canonicalize('WILL.SMITH@example.com')->willReturn('will.smith@example.com');
$customerRepository->findOneBy(['emailCanonical' => 'will.smith@example.com'])->willReturn($customer);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Provider/PathPrefixProviderSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Provider/PathPrefixProviderSpec.php
index 8d5860a51b7..fe32fe61401 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Provider/PathPrefixProviderSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Provider/PathPrefixProviderSpec.php
@@ -59,7 +59,7 @@ function it_returns_prefix_from_api_route_with_slashes(UserContextInterface $use
function it_returns_admin_prefix_if_currently_logged_in_is_admin_user(
UserContextInterface $userContext,
- AdminUserInterface $user
+ AdminUserInterface $user,
): void {
$userContext->getUser()->willReturn($user);
@@ -68,7 +68,7 @@ function it_returns_admin_prefix_if_currently_logged_in_is_admin_user(
function it_returns_shop_prefix_if_currently_logged_in_is_shop_user(
UserContextInterface $userContext,
- ShopUserInterface $user
+ ShopUserInterface $user,
): void {
$userContext->getUser()->willReturn($user);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Serializer/CommandDenormalizerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Serializer/CommandDenormalizerSpec.php
index 88ded1f3cdf..c51da8cb2f1 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Serializer/CommandDenormalizerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Serializer/CommandDenormalizerSpec.php
@@ -30,13 +30,13 @@ function let(DenormalizerInterface $baseNormalizer): void
}
function it_throws_exception_if_not_all_required_parameters_are_present_in_the_context(
- DenormalizerInterface $baseNormalizer
+ DenormalizerInterface $baseNormalizer,
): void {
$baseNormalizer->denormalize(Argument::any())->shouldNotBeCalled();
$this
->shouldThrow(new MissingConstructorArgumentsException(
- 'Request does not have the following required fields specified: firstName, lastName.'
+ 'Request does not have the following required fields specified: firstName, lastName.',
))
->during(
'denormalize',
@@ -44,21 +44,21 @@ 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]],
+ ],
)
;
}
function it_denormalizes_data_if_all_required_parameters_are_specified(
- DenormalizerInterface $baseNormalizer
+ DenormalizerInterface $baseNormalizer,
): void {
$baseNormalizer
->denormalize(
['firstName' => 'John', 'lastName' => 'Doe', 'email' => 'test@example.com', 'password' => 'pa$$word'],
Customer::class,
null,
- ['input' => ['class' => RegisterShopUser::class]]
+ ['input' => ['class' => RegisterShopUser::class]],
)
->willReturn(['key' => 'value'])
;
@@ -67,12 +67,12 @@ function it_denormalizes_data_if_all_required_parameters_are_specified(
['firstName' => 'John', 'lastName' => 'Doe', 'email' => 'test@example.com', 'password' => 'pa$$word'],
Customer::class,
null,
- ['input' => ['class' => RegisterShopUser::class]]
+ ['input' => ['class' => RegisterShopUser::class]],
)->shouldReturn(['key' => 'value']);
}
function it_does_not_check_parameters_if_there_is_an_object_to_populate(
- DenormalizerInterface $baseNormalizer
+ DenormalizerInterface $baseNormalizer,
): void {
$baseNormalizer
->denormalize(
@@ -81,8 +81,8 @@ 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,22 +94,22 @@ 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'])
;
}
function it_does_not_check_parameters_if_there_is_no_constructor(
- DenormalizerInterface $baseNormalizer
+ DenormalizerInterface $baseNormalizer,
): void {
$baseNormalizer
->denormalize(
[],
Customer::class,
null,
- ['input' => ['class' => \stdClass::class]]
+ ['input' => ['class' => \stdClass::class]],
)
->willReturn(['key' => 'value'])
;
@@ -119,7 +119,7 @@ function it_does_not_check_parameters_if_there_is_no_constructor(
[],
Customer::class,
null,
- ['input' => ['class' => \stdClass::class]]
+ ['input' => ['class' => \stdClass::class]],
)
->shouldReturn(['key' => 'value'])
;
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Serializer/CommandFieldItemIriToIdentifierDenormalizerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Serializer/CommandFieldItemIriToIdentifierDenormalizerSpec.php
index 331716007cf..6537be15677 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Serializer/CommandFieldItemIriToIdentifierDenormalizerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Serializer/CommandFieldItemIriToIdentifierDenormalizerSpec.php
@@ -29,24 +29,24 @@ function let(
DenormalizerInterface $objectNormalizer,
ItemIriToIdentifierConverterInterface $itemIriToIdentifierConverter,
CommandItemIriArgumentToIdentifierMapInterface $commandItemIriArgumentToIdentifierMap,
- UserContextInterface $userContext
+ UserContextInterface $userContext,
): void {
$commandAwareInputDataTransformer = new CommandAwareInputDataTransformer(
new LoggedInShopUserEmailAwareCommandDataTransformer(
- $userContext->getWrappedObject()
- )
+ $userContext->getWrappedObject(),
+ ),
);
$this->beConstructedWith(
$objectNormalizer,
$itemIriToIdentifierConverter,
$commandAwareInputDataTransformer,
- $commandItemIriArgumentToIdentifierMap
+ $commandItemIriArgumentToIdentifierMap,
);
}
function it_supports_denormalization_add_product_review(
- CommandItemIriArgumentToIdentifierMapInterface $commandItemIriArgumentToIdentifierMap
+ CommandItemIriArgumentToIdentifierMapInterface $commandItemIriArgumentToIdentifierMap,
): void {
$context['input']['class'] = AddProductReview::class;
@@ -57,14 +57,14 @@ function it_supports_denormalization_add_product_review(
new AddProductReview('Cap', 5, 'ok', 'cap_code', 'john@example.com'),
AddProductReview::class,
null,
- $context
+ $context,
)
->shouldReturn(true)
;
}
function it_does_not_support_denormalization_for_not_supported_class(
- CommandItemIriArgumentToIdentifierMapInterface $commandItemIriArgumentToIdentifierMap
+ CommandItemIriArgumentToIdentifierMapInterface $commandItemIriArgumentToIdentifierMap,
): void {
$context['input']['class'] = Order::class;
@@ -75,7 +75,7 @@ function it_does_not_support_denormalization_for_not_supported_class(
new Order(),
AddProductReview::class,
null,
- $context
+ $context,
)
->shouldReturn(false)
;
@@ -85,7 +85,7 @@ function it_denormalizes_add_product_review_and_transforms_product_field_from_ir
DenormalizerInterface $objectNormalizer,
ItemIriToIdentifierConverterInterface $itemIriToIdentifierConverter,
CommandItemIriArgumentToIdentifierMapInterface $commandItemIriArgumentToIdentifierMap,
- UserContextInterface $userContext
+ UserContextInterface $userContext,
): void {
$context['input']['class'] = AddProductReview::class;
@@ -107,7 +107,7 @@ function it_denormalizes_add_product_review_and_transforms_product_field_from_ir
],
AddProductReview::class,
null,
- $context
+ $context,
)
->willReturn($addProductReview)
;
@@ -123,7 +123,7 @@ function it_denormalizes_add_product_review_and_transforms_product_field_from_ir
],
AddProductReview::class,
null,
- $context
+ $context,
)
->shouldReturn($addProductReview)
;
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Serializer/CommandNormalizerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Serializer/CommandNormalizerSpec.php
index 075ab75e622..be6b7b31a35 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,9 +64,14 @@ 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]
+ ['command_normalizer_already_called' => true],
)
->shouldReturn(false)
;
@@ -69,7 +84,7 @@ function it_does_not_support_normalization_if_data_is_not_an_object(): void
function it_normalizes_response_for_missing_constructor_arguments_exception(
NormalizerInterface $baseNormalizer,
- \stdClass $object
+ \stdClass $object,
): void {
$baseNormalizer
->normalize($object, null, ['command_normalizer_already_called' => true])
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Serializer/ProductNormalizerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Serializer/ProductNormalizerSpec.php
index 01ff1fdcfbf..3567410f7ec 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Serializer/ProductNormalizerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Serializer/ProductNormalizerSpec.php
@@ -26,7 +26,7 @@ final class ProductNormalizerSpec extends ObjectBehavior
{
function let(
ProductVariantResolverInterface $defaultProductVariantResolver,
- IriConverterInterface $iriConverter
+ IriConverterInterface $iriConverter,
): void {
$this->beConstructedWith($defaultProductVariantResolver, $iriConverter);
}
@@ -50,7 +50,7 @@ function it_adds_default_variant_iri_to_serialized_product(
IriConverterInterface $iriConverter,
NormalizerInterface $normalizer,
ProductInterface $product,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$this->setNormalizer($normalizer);
@@ -65,7 +65,7 @@ function it_adds_default_variant_field_with_null_value_to_serialized_product_if_
ProductVariantResolverInterface $defaultProductVariantResolver,
IriConverterInterface $iriConverter,
NormalizerInterface $normalizer,
- ProductInterface $product
+ ProductInterface $product,
): void {
$this->setNormalizer($normalizer);
@@ -78,7 +78,7 @@ function it_adds_default_variant_field_with_null_value_to_serialized_product_if_
function it_throws_an_exception_if_the_normalizer_has_been_already_called(
NormalizerInterface $normalizer,
- ProductInterface $product
+ ProductInterface $product,
): void {
$this->setNormalizer($normalizer);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Serializer/ProductVariantNormalizerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Serializer/ProductVariantNormalizerSpec.php
index b94ab8ad388..97e270d09da 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Serializer/ProductVariantNormalizerSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Serializer/ProductVariantNormalizerSpec.php
@@ -27,7 +27,7 @@ final class ProductVariantNormalizerSpec extends ObjectBehavior
function let(
ProductVariantPricesCalculatorInterface $pricesCalculator,
ChannelContextInterface $channelContext,
- AvailabilityCheckerInterface $availabilityChecker
+ AvailabilityCheckerInterface $availabilityChecker,
): void {
$this->beConstructedWith($pricesCalculator, $channelContext, $availabilityChecker);
}
@@ -57,7 +57,7 @@ function it_serializes_product_variant_if_item_operation_name_is_different_that_
AvailabilityCheckerInterface $availabilityChecker,
NormalizerInterface $normalizer,
ChannelInterface $channel,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$this->setNormalizer($normalizer);
@@ -72,7 +72,7 @@ function it_serializes_product_variant_if_item_operation_name_is_different_that_
function it_throws_an_exception_if_the_normalizer_has_been_already_called(
NormalizerInterface $normalizer,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$this->setNormalizer($normalizer);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/SerializerContextBuilder/ChannelContextBuilderSpec.php b/src/Sylius/Bundle/ApiBundle/spec/SerializerContextBuilder/ChannelContextBuilderSpec.php
index 95530af3c88..0fb18b88f61 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/SerializerContextBuilder/ChannelContextBuilderSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/SerializerContextBuilder/ChannelContextBuilderSpec.php
@@ -23,7 +23,7 @@ final class ChannelContextBuilderSpec extends ObjectBehavior
{
function let(
SerializerContextBuilderInterface $decoratedContextBuilder,
- ChannelContextInterface $channelContext
+ ChannelContextInterface $channelContext,
): void {
$this->beConstructedWith($decoratedContextBuilder, $channelContext);
}
@@ -32,7 +32,7 @@ function it_updates_an_context_when_channel_context_has_channel(
SerializerContextBuilderInterface $decoratedContextBuilder,
Request $request,
ChannelContextInterface $channelContext,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$decoratedContextBuilder->createFromRequest($request, true, [])->shouldBeCalled();
$channelContext->getChannel()->willReturn($channel);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/SerializerContextBuilder/LocaleContextBuilderSpec.php b/src/Sylius/Bundle/ApiBundle/spec/SerializerContextBuilder/LocaleContextBuilderSpec.php
index 20020355bb9..2b510131a08 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/SerializerContextBuilder/LocaleContextBuilderSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/SerializerContextBuilder/LocaleContextBuilderSpec.php
@@ -22,7 +22,7 @@ final class LocaleContextBuilderSpec extends ObjectBehavior
{
function let(
SerializerContextBuilderInterface $decoratedSerializerContextBuilder,
- LocaleContextInterface $localeContext
+ LocaleContextInterface $localeContext,
): void {
$this->beConstructedWith($decoratedSerializerContextBuilder, $localeContext);
}
@@ -30,7 +30,7 @@ function let(
function it_updates_an_context_when_locale_context_has_locale(
Request $request,
SerializerContextBuilderInterface $decoratedSerializerContextBuilder,
- LocaleContextInterface $localeContext
+ LocaleContextInterface $localeContext,
): void {
$decoratedSerializerContextBuilder->createFromRequest($request, true, [])->shouldBeCalled();
$localeContext->getLocaleCode()->willReturn('en_US');
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/AccountVerificationTokenEligibilityValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/AccountVerificationTokenEligibilityValidatorSpec.php
index 0e588b0e3b1..a23edad1a95 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/AccountVerificationTokenEligibilityValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/AccountVerificationTokenEligibilityValidatorSpec.php
@@ -57,7 +57,7 @@ function it_throws_an_exception_if_constraint_is_not_type_of_account_verificatio
function it_adds_violation_if_account_is_null(
RepositoryInterface $shopUserRepository,
- ExecutionContextInterface $executionContext
+ ExecutionContextInterface $executionContext,
): void {
$constraint = new AccountVerificationTokenEligibility();
$value = new VerifyCustomerAccount('TOKEN');
@@ -69,7 +69,7 @@ function it_adds_violation_if_account_is_null(
$executionContext
->addViolation(
'sylius.account.invalid_verification_token',
- ['%verificationToken%' => 'TOKEN']
+ ['%verificationToken%' => 'TOKEN'],
)
->shouldBeCalled()
;
@@ -80,7 +80,7 @@ function it_adds_violation_if_account_is_null(
function it_does_nothing_if_account_has_been_found(
RepositoryInterface $shopUserRepository,
ExecutionContextInterface $executionContext,
- ShopUserInterface $user
+ ShopUserInterface $user,
): void {
$constraint = new AccountVerificationTokenEligibility();
$value = new VerifyCustomerAccount('TOKEN');
@@ -92,7 +92,7 @@ function it_does_nothing_if_account_has_been_found(
$executionContext
->addViolation(
'sylius.account.invalid_verification_token',
- ['%verificationToken%' => 'TOKEN']
+ ['%verificationToken%' => 'TOKEN'],
)
->shouldNotBeCalled()
;
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/AddingEligibleProductVariantToCartValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/AddingEligibleProductVariantToCartValidatorSpec.php
index 564c7a25a05..95252f6afe7 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/AddingEligibleProductVariantToCartValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/AddingEligibleProductVariantToCartValidatorSpec.php
@@ -35,7 +35,7 @@ final class AddingEligibleProductVariantToCartValidatorSpec extends ObjectBehavi
function let(
ProductVariantRepositoryInterface $productVariantRepository,
OrderRepositoryInterface $orderRepository,
- AvailabilityCheckerInterface $availabilityChecker
+ AvailabilityCheckerInterface $availabilityChecker,
): void {
$this->beConstructedWith($productVariantRepository, $orderRepository, $availabilityChecker);
}
@@ -49,7 +49,8 @@ function it_throws_an_exception_if_value_is_not_an_instance_of_add_item_to_cart_
{
$this
->shouldThrow(\InvalidArgumentException::class)
- ->during('validate', [new CompleteOrder(), new AddingEligibleProductVariantToCart()]);
+ ->during('validate', [new CompleteOrder(), new AddingEligibleProductVariantToCart()])
+ ;
}
function it_throws_an_exception_if_constraint_is_not_an_instance_of_adding_eligible_product_variant_to_cart(): void
@@ -59,14 +60,14 @@ function it_throws_an_exception_if_constraint_is_not_an_instance_of_adding_eligi
->during('validate', [
new AddItemToCart('productVariantCode', 1),
new class() extends Constraint {
- }
+ },
])
;
}
function it_adds_violation_if_product_variant_does_not_exist(
ProductVariantRepositoryInterface $productVariantRepository,
- ExecutionContextInterface $executionContext
+ ExecutionContextInterface $executionContext,
): void {
$this->initialize($executionContext);
@@ -79,7 +80,7 @@ function it_adds_violation_if_product_variant_does_not_exist(
$this->validate(
new AddItemToCart('productVariantCode', 1),
- new AddingEligibleProductVariantToCart()
+ new AddingEligibleProductVariantToCart(),
);
}
@@ -87,7 +88,7 @@ function it_adds_violation_if_product_is_disabled(
ProductVariantRepositoryInterface $productVariantRepository,
ExecutionContextInterface $executionContext,
ProductVariantInterface $productVariant,
- ProductInterface $product
+ ProductInterface $product,
): void {
$this->initialize($executionContext);
@@ -104,7 +105,7 @@ function it_adds_violation_if_product_is_disabled(
$this->validate(
new AddItemToCart('productVariantCode', 1),
- new AddingEligibleProductVariantToCart()
+ new AddingEligibleProductVariantToCart(),
);
}
@@ -112,7 +113,7 @@ function it_adds_violation_if_product_variant_is_disabled(
ProductVariantRepositoryInterface $productVariantRepository,
ExecutionContextInterface $executionContext,
ProductVariantInterface $productVariant,
- ProductInterface $product
+ ProductInterface $product,
): void {
$this->initialize($executionContext);
@@ -130,7 +131,7 @@ function it_adds_violation_if_product_variant_is_disabled(
$this->validate(
new AddItemToCart('productVariantCode', 1),
- new AddingEligibleProductVariantToCart()
+ new AddingEligibleProductVariantToCart(),
);
}
@@ -144,7 +145,7 @@ function it_adds_violation_if_product_variant_stock_is_not_sufficient_and_cart_h
OrderInterface $cart,
Collection $items,
OrderItemInterface $orderItem,
- ProductVariantInterface $itemProductVariant
+ ProductVariantInterface $itemProductVariant,
): void {
$this->initialize($executionContext);
@@ -179,7 +180,7 @@ function it_adds_violation_if_product_variant_stock_is_not_sufficient_and_cart_h
$this->validate(
$command,
- new AddingEligibleProductVariantToCart()
+ new AddingEligibleProductVariantToCart(),
);
}
@@ -193,7 +194,7 @@ function it_adds_violation_if_product_variant_stock_is_not_sufficient_and_cart_h
OrderInterface $cart,
Collection $items,
OrderItemInterface $orderItem,
- ProductVariantInterface $orderItemVariant
+ ProductVariantInterface $orderItemVariant,
): void {
$this->initialize($executionContext);
@@ -228,7 +229,7 @@ function it_adds_violation_if_product_variant_stock_is_not_sufficient_and_cart_h
$this->validate(
$command,
- new AddingEligibleProductVariantToCart()
+ new AddingEligibleProductVariantToCart(),
);
}
@@ -243,7 +244,7 @@ function it_adds_violation_if_product_is_not_available_in_channel(
Collection $items,
OrderItemInterface $orderItem,
AvailabilityCheckerInterface $availabilityChecker,
- ProductVariantInterface $itemProductVariant
+ ProductVariantInterface $itemProductVariant,
): void {
$this->initialize($executionContext);
@@ -294,7 +295,7 @@ function it_does_nothing_if_product_and_variant_are_enabled_and_available_in_cha
Collection $items,
OrderItemInterface $orderItem,
ProductVariantInterface $itemProductVariant,
- AvailabilityCheckerInterface $availabilityChecker
+ AvailabilityCheckerInterface $availabilityChecker,
): void {
$this->initialize($executionContext);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ChangedItemQuantityInCartValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ChangedItemQuantityInCartValidatorSpec.php
index a3f9ed2a82c..60ad8f70cdf 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ChangedItemQuantityInCartValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ChangedItemQuantityInCartValidatorSpec.php
@@ -35,7 +35,7 @@ final class ChangedItemQuantityInCartValidatorSpec extends ObjectBehavior
function let(
RepositoryInterface $orderItemRepository,
OrderRepositoryInterface $orderRepository,
- AvailabilityCheckerInterface $availabilityChecker
+ AvailabilityCheckerInterface $availabilityChecker,
): void {
$this->beConstructedWith($orderItemRepository, $orderRepository, $availabilityChecker);
}
@@ -49,7 +49,8 @@ function it_throws_an_exception_if_value_is_not_an_instance_of_change_item_quant
{
$this
->shouldThrow(\InvalidArgumentException::class)
- ->during('validate', [new CompleteOrder(), new AddingEligibleProductVariantToCart()]);
+ ->during('validate', [new CompleteOrder(), new AddingEligibleProductVariantToCart()])
+ ;
}
function it_throws_an_exception_if_constraint_is_not_an_instance_of_changed_item_quantity_in_cart(): void
@@ -59,7 +60,7 @@ function it_throws_an_exception_if_constraint_is_not_an_instance_of_changed_item
->during('validate', [
new ChangeItemQuantityInCart(2),
new class() extends Constraint {
- }
+ },
])
;
}
@@ -67,7 +68,7 @@ function it_throws_an_exception_if_constraint_is_not_an_instance_of_changed_item
function it_adds_violation_if_product_variant_does_not_exist(
RepositoryInterface $orderItemRepository,
ExecutionContextInterface $executionContext,
- OrderItemInterface $orderItem
+ OrderItemInterface $orderItem,
): void {
$this->initialize($executionContext);
@@ -82,7 +83,7 @@ function it_adds_violation_if_product_variant_does_not_exist(
$this->validate(
ChangeItemQuantityInCart::createFromData('token', '11', 2),
- new ChangedItemQuantityInCart()
+ new ChangedItemQuantityInCart(),
);
}
@@ -91,7 +92,7 @@ function it_adds_violation_if_product_is_disabled(
ExecutionContextInterface $executionContext,
OrderItemInterface $orderItem,
ProductVariantInterface $productVariant,
- ProductInterface $product
+ ProductInterface $product,
): void {
$this->initialize($executionContext);
@@ -112,7 +113,7 @@ function it_adds_violation_if_product_is_disabled(
$this->validate(
ChangeItemQuantityInCart::createFromData('token', '11', 2),
- new ChangedItemQuantityInCart()
+ new ChangedItemQuantityInCart(),
);
}
@@ -121,7 +122,7 @@ function it_adds_violation_if_product_variant_is_disabled(
ExecutionContextInterface $executionContext,
OrderItemInterface $orderItem,
ProductVariantInterface $productVariant,
- ProductInterface $product
+ ProductInterface $product,
): void {
$this->initialize($executionContext);
@@ -144,7 +145,7 @@ function it_adds_violation_if_product_variant_is_disabled(
$this->validate(
ChangeItemQuantityInCart::createFromData('token', '11', 2),
- new ChangedItemQuantityInCart()
+ new ChangedItemQuantityInCart(),
);
}
@@ -154,7 +155,7 @@ function it_adds_violation_if_product_variant_stock_is_not_sufficient(
OrderItemInterface $orderItem,
ProductVariantInterface $productVariant,
AvailabilityCheckerInterface $availabilityChecker,
- ProductInterface $product
+ ProductInterface $product,
): void {
$this->initialize($executionContext);
@@ -179,7 +180,7 @@ function it_adds_violation_if_product_variant_stock_is_not_sufficient(
$this->validate(
ChangeItemQuantityInCart::createFromData('token', '11', 2),
- new ChangedItemQuantityInCart()
+ new ChangedItemQuantityInCart(),
);
}
@@ -192,7 +193,7 @@ function it_adds_violation_if_product_is_not_available_in_channel(
AvailabilityCheckerInterface $availabilityChecker,
ProductInterface $product,
ChannelInterface $channel,
- OrderInterface $cart
+ OrderInterface $cart,
): void {
$this->initialize($executionContext);
@@ -224,7 +225,7 @@ function it_adds_violation_if_product_is_not_available_in_channel(
$this->validate(
ChangeItemQuantityInCart::createFromData('TOKEN', '11', 2),
- new ChangedItemQuantityInCart()
+ new ChangedItemQuantityInCart(),
);
}
@@ -237,7 +238,7 @@ function it_does_nothing_if_product_and_variant_are_enabled_and_available_in_cha
AvailabilityCheckerInterface $availabilityChecker,
ProductInterface $product,
ChannelInterface $channel,
- OrderInterface $cart
+ OrderInterface $cart,
): void {
$this->initialize($executionContext);
@@ -277,7 +278,7 @@ function it_does_nothing_if_product_and_variant_are_enabled_and_available_in_cha
$this->validate(
ChangeItemQuantityInCart::createFromData('TOKEN', '11', 2),
- new ChangedItemQuantityInCart()
+ new ChangedItemQuantityInCart(),
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ChosenPaymentMethodEligibilityValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ChosenPaymentMethodEligibilityValidatorSpec.php
index 4de09de6e24..84775d42dbb 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ChosenPaymentMethodEligibilityValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ChosenPaymentMethodEligibilityValidatorSpec.php
@@ -31,7 +31,7 @@ function let(
PaymentRepositoryInterface $paymentRepository,
PaymentMethodRepositoryInterface $paymentMethodRepository,
PaymentMethodsResolverInterface $paymentMethodsResolver,
- ExecutionContextInterface $executionContext
+ ExecutionContextInterface $executionContext,
): void {
$this->beConstructedWith($paymentRepository, $paymentMethodRepository, $paymentMethodsResolver);
@@ -47,7 +47,8 @@ function it_throws_an_exception_if_value_does_not_extend_payment_method_code_awa
{
$this
->shouldThrow(\InvalidArgumentException::class)
- ->during('validate', ['', new ChosenPaymentMethodEligibility()]);
+ ->during('validate', ['', new ChosenPaymentMethodEligibility()])
+ ;
}
function it_throws_an_exception_if_constraint_is_not_an_instance_of_chosen_payment_method_eligibility(): void
@@ -67,7 +68,7 @@ function it_adds_violation_if_chosen_payment_method_does_not_match_supported_met
PaymentMethodInterface $firstPaymentMethod,
PaymentMethodInterface $secondPaymentMethod,
PaymentMethodInterface $thirdPaymentMethod,
- PaymentInterface $payment
+ PaymentInterface $payment,
): void {
$command = new ChoosePaymentMethod('PAYMENT_METHOD_CODE');
$command->setOrderTokenValue('ORDER_TOKEN');
@@ -90,7 +91,7 @@ function it_adds_violation_if_chosen_payment_method_does_not_match_supported_met
function it_adds_violation_if_payment_method_does_not_exist(
PaymentMethodRepositoryInterface $paymentMethodRepository,
- ExecutionContextInterface $executionContext
+ ExecutionContextInterface $executionContext,
): void {
$command = new ChoosePaymentMethod('PAYMENT_METHOD_CODE');
$command->setOrderTokenValue('ORDER_TOKEN');
@@ -113,7 +114,7 @@ function it_does_nothing_if_payment_method_is_eligible(
ExecutionContextInterface $executionContext,
PaymentMethodInterface $firstPaymentMethod,
PaymentMethodInterface $secondPaymentMethod,
- PaymentInterface $payment
+ PaymentInterface $payment,
): void {
$command = new ChoosePaymentMethod('PAYMENT_METHOD_CODE');
$command->setOrderTokenValue('ORDER_TOKEN');
@@ -129,11 +130,12 @@ function it_does_nothing_if_payment_method_is_eligible(
$executionContext
->addViolation('sylius.payment_method.not_exist', ['%code%' => 'PAYMENT_METHOD_CODE'])
- ->shouldNotBeCalled();
+ ->shouldNotBeCalled()
+ ;
$this->validate(
$command,
- new ChosenPaymentMethodEligibility()
+ new ChosenPaymentMethodEligibility(),
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ChosenShippingMethodEligibilityValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ChosenShippingMethodEligibilityValidatorSpec.php
index 927c8508ee1..0e84a789727 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ChosenShippingMethodEligibilityValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ChosenShippingMethodEligibilityValidatorSpec.php
@@ -33,7 +33,7 @@ function let(
ShipmentRepositoryInterface $shipmentRepository,
ShippingMethodRepositoryInterface $shippingMethodRepository,
ShippingMethodsResolverInterface $shippingMethodsResolver,
- ExecutionContextInterface $executionContext
+ ExecutionContextInterface $executionContext,
): void {
$this->beConstructedWith($shipmentRepository, $shippingMethodRepository, $shippingMethodsResolver);
@@ -69,7 +69,7 @@ function it_adds_violation_if_chosen_shipping_method_does_not_match_supported_me
ExecutionContextInterface $executionContext,
ShippingMethodInterface $shippingMethod,
ShippingMethodInterface $differentShippingMethod,
- ShipmentInterface $shipment
+ ShipmentInterface $shipment,
): void {
$command = new ChooseShippingMethod('SHIPPING_METHOD_CODE');
$command->setOrderTokenValue('ORDER_TOKEN');
@@ -96,7 +96,7 @@ function it_does_not_add_violation_if_chosen_shipping_method_matches_supported_m
ShippingMethodsResolverInterface $shippingMethodsResolver,
ExecutionContextInterface $executionContext,
ShippingMethodInterface $shippingMethod,
- ShipmentInterface $shipment
+ ShipmentInterface $shipment,
): void {
$command = new ChooseShippingMethod('SHIPPING_METHOD_CODE');
$command->setOrderTokenValue('ORDER_TOKEN');
@@ -119,7 +119,7 @@ function it_does_not_add_violation_if_chosen_shipping_method_matches_supported_m
function it_adds_a_violation_if_given_shipping_method_is_null(
ShipmentRepositoryInterface $shipmentRepository,
ShippingMethodRepositoryInterface $shippingMethodRepository,
- ExecutionContextInterface $executionContext
+ ExecutionContextInterface $executionContext,
): void {
$command = new ChooseShippingMethod('SHIPPING_METHOD_CODE');
$command->setOrderTokenValue('ORDER_TOKEN');
@@ -144,7 +144,7 @@ function it_throws_an_exception_if_given_shipmnent_is_null(
ShipmentRepositoryInterface $shipmentRepository,
ShippingMethodRepositoryInterface $shippingMethodRepository,
ExecutionContextInterface $executionContext,
- ShippingMethodInterface $shippingMethod
+ ShippingMethodInterface $shippingMethod,
): void {
$command = new ChooseShippingMethod('SHIPPING_METHOD_CODE');
$command->setOrderTokenValue('ORDER_TOKEN');
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ConfirmResetPasswordValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ConfirmResetPasswordValidatorSpec.php
index d264490b712..3767fcd7ff6 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ConfirmResetPasswordValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ConfirmResetPasswordValidatorSpec.php
@@ -43,7 +43,7 @@ function it_does_not_add_violation_if_passwords_are_same(ExecutionContextInterfa
function it_adds_violation_if_passwords_are_different(
ExecutionContextInterface $executionContext,
- ConstraintViolationBuilderInterface $constraintViolationBuilder
+ ConstraintViolationBuilderInterface $constraintViolationBuilder,
): void {
$constraint = new ConfirmResetPassword();
$this->initialize($executionContext);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/CorrectChangeShopUserConfirmPasswordValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/CorrectChangeShopUserConfirmPasswordValidatorSpec.php
index 57ba99e7075..e5d864a8446 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/CorrectChangeShopUserConfirmPasswordValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/CorrectChangeShopUserConfirmPasswordValidatorSpec.php
@@ -41,7 +41,7 @@ function it_does_not_add_violation_if_passwords_are_same(ExecutionContextInterfa
function it_adds_violation_if_passwords_are_different(
ExecutionContextInterface $executionContext,
- ConstraintViolationBuilderInterface $constraintViolationBuilder
+ ConstraintViolationBuilderInterface $constraintViolationBuilder,
): void {
$constraint = new CorrectChangeShopUserConfirmPassword();
$this->initialize($executionContext);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/CorrectOrderAddressValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/CorrectOrderAddressValidatorSpec.php
index 6001f141d6c..f46aa283c2d 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/CorrectOrderAddressValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/CorrectOrderAddressValidatorSpec.php
@@ -46,21 +46,21 @@ function it_throws_an_exception_if_value_is_not_an_instance_of_address_order_com
function it_throws_an_exception_if_constraint_is_not_an_instance_of_adding_eligible_product_variant_to_cart(
AddressInterface $billingAddress,
- AddressInterface $shippingAddress
+ AddressInterface $shippingAddress,
): void {
$this
->shouldThrow(\InvalidArgumentException::class)
->during('validate', [
new AddressOrder('john@doe.com', $billingAddress->getWrappedObject(), $shippingAddress->getWrappedObject()),
new class() extends Constraint {
- }
+ },
])
;
}
function it_adds_violation_if_billing_address_has_incorrect_country_code(
ExecutionContextInterface $executionContext,
- AddressInterface $billingAddress
+ AddressInterface $billingAddress,
): void {
$this->initialize($executionContext);
@@ -73,13 +73,13 @@ function it_adds_violation_if_billing_address_has_incorrect_country_code(
$this->validate(
new AddressOrder('john@doe.com', $billingAddress->getWrappedObject()),
- new CorrectOrderAddress()
+ new CorrectOrderAddress(),
);
}
function it_adds_violation_if_billing_address_has_not_country_code(
ExecutionContextInterface $executionContext,
- AddressInterface $billingAddress
+ AddressInterface $billingAddress,
): void {
$this->initialize($executionContext);
@@ -92,7 +92,7 @@ function it_adds_violation_if_billing_address_has_not_country_code(
$this->validate(
new AddressOrder('john@doe.com', $billingAddress->getWrappedObject()),
- new CorrectOrderAddress()
+ new CorrectOrderAddress(),
);
}
@@ -101,7 +101,7 @@ function it_adds_violation_if_shipping_address_has_incorrect_country_code(
ExecutionContextInterface $executionContext,
AddressInterface $billingAddress,
AddressInterface $shippingAddress,
- CountryInterface $usa
+ CountryInterface $usa,
): void {
$this->initialize($executionContext);
@@ -118,7 +118,7 @@ function it_adds_violation_if_shipping_address_has_incorrect_country_code(
$this->validate(
new AddressOrder('john@doe.com', $billingAddress->getWrappedObject(), $shippingAddress->getWrappedObject()),
- new CorrectOrderAddress()
+ new CorrectOrderAddress(),
);
}
@@ -126,7 +126,7 @@ function it_adds_violation_if_shipping_address_and_billing_address_have_incorrec
RepositoryInterface $countryRepository,
ExecutionContextInterface $executionContext,
AddressInterface $billingAddress,
- AddressInterface $shippingAddress
+ AddressInterface $shippingAddress,
): void {
$this->initialize($executionContext);
@@ -148,7 +148,7 @@ function it_adds_violation_if_shipping_address_and_billing_address_have_incorrec
$this->validate(
new AddressOrder('john@doe.com', $billingAddress->getWrappedObject(), $shippingAddress->getWrappedObject()),
- new CorrectOrderAddress()
+ new CorrectOrderAddress(),
);
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/OrderItemAvailabilityValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/OrderItemAvailabilityValidatorSpec.php
index 50434e81290..95492434462 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/OrderItemAvailabilityValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/OrderItemAvailabilityValidatorSpec.php
@@ -32,7 +32,7 @@ final class OrderItemAvailabilityValidatorSpec extends ObjectBehavior
function let(
OrderRepositoryInterface $orderRepository,
AvailabilityCheckerInterface $availabilityChecker,
- ExecutionContextInterface $executionContext
+ ExecutionContextInterface $executionContext,
): void {
$this->beConstructedWith($orderRepository, $availabilityChecker);
$this->initialize($executionContext);
@@ -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 {
- }
+ },
])
;
}
@@ -62,7 +62,7 @@ function it_adds_violation_if_product_variant_does_not_have_sufficient_stock(
OrderInterface $order,
OrderItemInterface $orderItem,
ProductVariantInterface $productVariant,
- Collection $orderItems
+ Collection $orderItems,
): void {
$command = new CompleteOrder();
$command->setOrderTokenValue('cartToken');
@@ -94,7 +94,7 @@ function it_does_nothing_if_product_variant_has_sufficient_stock(
OrderInterface $order,
OrderItemInterface $orderItem,
ProductVariantInterface $productVariant,
- Collection $orderItems
+ Collection $orderItems,
): void {
$command = new CompleteOrder();
$command->setOrderTokenValue('cartToken');
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/OrderNotEmptyValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/OrderNotEmptyValidatorSpec.php
index 472a7e404f0..5f8573279e0 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/OrderNotEmptyValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/OrderNotEmptyValidatorSpec.php
@@ -70,7 +70,7 @@ function it_throws_an_exception_if_order_is_null(OrderRepositoryInterface $order
function it_adds_violation_if_the_order_has_no_items(
OrderRepositoryInterface $orderRepository,
OrderInterface $order,
- ExecutionContextInterface $executionContext
+ ExecutionContextInterface $executionContext,
): void {
$this->initialize($executionContext);
@@ -89,7 +89,7 @@ function it_does_not_add_violation_if_the_order_has_items(
OrderRepositoryInterface $orderRepository,
OrderInterface $order,
OrderItemInterface $orderItem,
- ExecutionContextInterface $executionContext
+ ExecutionContextInterface $executionContext,
): void {
$this->initialize($executionContext);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/OrderPaymentMethodEligibilityValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/OrderPaymentMethodEligibilityValidatorSpec.php
index 1ff4ed1534a..03e35c58b11 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/OrderPaymentMethodEligibilityValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/OrderPaymentMethodEligibilityValidatorSpec.php
@@ -89,7 +89,7 @@ function it_adds_violation_if_payment_is_not_available_anymore(
OrderInterface $order,
PaymentInterface $payment,
PaymentMethodInterface $paymentMethod,
- ExecutionContextInterface $executionContext
+ ExecutionContextInterface $executionContext,
): void {
$this->initialize($executionContext);
@@ -111,7 +111,7 @@ function it_adds_violation_if_payment_is_not_available_anymore(
$executionContext
->addViolation(
'sylius.order.payment_method_eligibility',
- ['%paymentMethodName%' => 'bank transfer']
+ ['%paymentMethodName%' => 'bank transfer'],
)
->shouldBeCalled()
;
@@ -124,7 +124,7 @@ function it_does_not_add_violation_if_payment_is_available(
OrderInterface $order,
PaymentInterface $payment,
PaymentMethodInterface $paymentMethod,
- ExecutionContextInterface $executionContext
+ ExecutionContextInterface $executionContext,
): void {
$this->initialize($executionContext);
@@ -145,7 +145,7 @@ function it_does_not_add_violation_if_payment_is_available(
$executionContext
->addViolation(
'sylius.order.payment_method_eligibility',
- ['%paymentMethodName%' => 'bank transfer']
+ ['%paymentMethodName%' => 'bank transfer'],
)
->shouldNotBeCalled()
;
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/OrderShippingMethodEligibilityValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/OrderShippingMethodEligibilityValidatorSpec.php
index 708a427a723..fe9d06ef2e0 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/OrderShippingMethodEligibilityValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/OrderShippingMethodEligibilityValidatorSpec.php
@@ -31,7 +31,7 @@ final class OrderShippingMethodEligibilityValidatorSpec extends ObjectBehavior
{
function let(
OrderRepositoryInterface $orderRepository,
- ShippingMethodEligibilityCheckerInterface $eligibilityChecker
+ ShippingMethodEligibilityCheckerInterface $eligibilityChecker,
): void {
$this->beConstructedWith($orderRepository, $eligibilityChecker);
}
@@ -93,7 +93,7 @@ function it_adds_violation_if_shipment_does_not_match_with_shipping_method(
OrderInterface $order,
ShipmentInterface $shipment,
ShippingMethodInterface $shippingMethod,
- ExecutionContextInterface $executionContext
+ ExecutionContextInterface $executionContext,
): void {
$this->initialize($executionContext);
@@ -115,7 +115,7 @@ function it_adds_violation_if_shipment_does_not_match_with_shipping_method(
$executionContext
->addViolation(
'sylius.order.shipping_method_eligibility',
- ['%shippingMethodName%' => 'InPost']
+ ['%shippingMethodName%' => 'InPost'],
)
->shouldBeCalled()
;
@@ -129,7 +129,7 @@ function it_does_not_add_a_violation_if_shipment_matches_with_shipping_method(
OrderInterface $order,
ShipmentInterface $shipment,
ShippingMethodInterface $shippingMethod,
- ExecutionContextInterface $executionContext
+ ExecutionContextInterface $executionContext,
): void {
$this->initialize($executionContext);
@@ -151,7 +151,7 @@ function it_does_not_add_a_violation_if_shipment_matches_with_shipping_method(
$executionContext
->addViolation(
'sylius.order.shipping_method_eligibility',
- ['%shippingMethodName%' => 'InPost']
+ ['%shippingMethodName%' => 'InPost'],
)
->shouldNotBeCalled()
;
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/PickupCartLocaleValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/PickupCartLocaleValidatorSpec.php
index 9cb191a7db5..c7ebabc5b26 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/PickupCartLocaleValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/PickupCartLocaleValidatorSpec.php
@@ -20,7 +20,6 @@
use Sylius\Component\Channel\Repository\ChannelRepositoryInterface;
use Sylius\Component\Core\Model\ChannelInterface;
use Sylius\Component\Locale\Model\LocaleInterface;
-use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidatorInterface;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
@@ -40,7 +39,7 @@ function it_does_not_add_violation_if_locale_code_exists(
ExecutionContextInterface $executionContext,
ChannelRepositoryInterface $channelRepository,
ChannelInterface $channel,
- LocaleInterface $locale
+ LocaleInterface $locale,
): void {
$constraint = new PickupCartLocale();
$this->initialize($executionContext);
@@ -53,14 +52,14 @@ function it_does_not_add_violation_if_locale_code_exists(
$locale->getCode()->willReturn('en_US');
$channel->getLocales()->willReturn(new ArrayCollection([$locale->getWrappedObject()]));
- $executionContext->addViolation('sylius.locale.not_exist', ["%localeCode%" => "en_US"])->shouldNotBeCalled();
+ $executionContext->addViolation('sylius.locale.not_exist', ['%localeCode%' => 'en_US'])->shouldNotBeCalled();
$this->validate($value, $constraint);
}
function it_does_not_add_violation_if_locale_code_is_not_set(
ExecutionContextInterface $executionContext,
- ChannelRepositoryInterface $channelRepository
+ ChannelRepositoryInterface $channelRepository,
): void {
$constraint = new PickupCartLocale();
$this->initialize($executionContext);
@@ -70,7 +69,7 @@ function it_does_not_add_violation_if_locale_code_is_not_set(
$channelRepository->findOneByCode('code')->shouldNotBeCalled();
- $executionContext->addViolation('sylius.locale.not_exist', ["%localeCode%" => "en_US"])->shouldNotBeCalled();
+ $executionContext->addViolation('sylius.locale.not_exist', ['%localeCode%' => 'en_US'])->shouldNotBeCalled();
$this->validate($value, $constraint);
}
@@ -79,7 +78,7 @@ function it_adds_violation_if_locale_code_does_not_exist(
ExecutionContextInterface $executionContext,
ChannelRepositoryInterface $channelRepository,
ChannelInterface $channel,
- LocaleInterface $locale
+ LocaleInterface $locale,
): void {
$constraint = new PickupCartLocale();
$this->initialize($executionContext);
@@ -92,7 +91,7 @@ function it_adds_violation_if_locale_code_does_not_exist(
$locale->getCode()->willReturn('en_US');
$channel->getLocales()->willReturn(new ArrayCollection([$locale->getWrappedObject()]));
- $executionContext->addViolation('sylius.locale.not_exist', ["%localeCode%" => "en"])->shouldBeCalled();
+ $executionContext->addViolation('sylius.locale.not_exist', ['%localeCode%' => 'en'])->shouldBeCalled();
$this->validate($value, $constraint);
}
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/PromotionCouponEligibilityValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/PromotionCouponEligibilityValidatorSpec.php
index 4eb82729fdb..6dee9dfa540 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/PromotionCouponEligibilityValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/PromotionCouponEligibilityValidatorSpec.php
@@ -34,13 +34,13 @@ function let(
PromotionCouponRepositoryInterface $promotionCouponRepository,
OrderRepositoryInterface $orderRepository,
PromotionEligibilityCheckerInterface $promotionChecker,
- PromotionCouponEligibilityCheckerInterface $promotionCouponChecker
+ PromotionCouponEligibilityCheckerInterface $promotionCouponChecker,
): void {
$this->beConstructedWith(
$promotionCouponRepository,
$orderRepository,
$promotionChecker,
- $promotionCouponChecker
+ $promotionCouponChecker,
);
}
@@ -63,7 +63,7 @@ function it_does_not_add_violation_if_promotion_coupon_is_eligible(
PromotionInterface $promotion,
OrderRepositoryInterface $orderRepository,
OrderInterface $cart,
- ExecutionContextInterface $executionContext
+ ExecutionContextInterface $executionContext,
): void {
$this->initialize($executionContext);
$constraint = new PromotionCouponEligibility();
@@ -96,7 +96,7 @@ function it_does_add_violation_if_promotion_coupon_is_not_eligible(
OrderRepositoryInterface $orderRepository,
OrderInterface $cart,
ExecutionContextInterface $executionContext,
- ConstraintViolationBuilderInterface $constraintViolationBuilder
+ ConstraintViolationBuilderInterface $constraintViolationBuilder,
): void {
$this->initialize($executionContext);
$constraint = new PromotionCouponEligibility();
@@ -128,7 +128,7 @@ function it_does_add_violation_if_promotion_is_not_eligible(
OrderRepositoryInterface $orderRepository,
OrderInterface $cart,
ExecutionContextInterface $executionContext,
- ConstraintViolationBuilderInterface $constraintViolationBuilder
+ ConstraintViolationBuilderInterface $constraintViolationBuilder,
): void {
$this->initialize($executionContext);
$constraint = new PromotionCouponEligibility();
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ShipmentAlreadyShippedValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ShipmentAlreadyShippedValidatorSpec.php
index ba371c490aa..217db19c144 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ShipmentAlreadyShippedValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ShipmentAlreadyShippedValidatorSpec.php
@@ -39,7 +39,7 @@ function it_is_a_constraint_validator(): void
function it_adds_violation_if_shipment_status_is_shipped(
ShipmentRepositoryInterface $shipmentRepository,
ShipmentInterface $shipment,
- ExecutionContextInterface $executionContext
+ ExecutionContextInterface $executionContext,
): void {
$constraint = new ShipmentAlreadyShipped();
$shipShipment = new ShipShipment();
@@ -57,7 +57,7 @@ function it_adds_violation_if_shipment_status_is_shipped(
function it_does_nothing_if_shipment_status_is_different_than_shipped(
ShipmentRepositoryInterface $shipmentRepository,
ShipmentInterface $shipment,
- ExecutionContextInterface $executionContext
+ ExecutionContextInterface $executionContext,
): void {
$constraint = new ShipmentAlreadyShipped();
$shipShipment = new ShipShipment();
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ShopUserExistsValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ShopUserExistsValidatorSpec.php
index dc08a377d43..3d74880bed4 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ShopUserExistsValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ShopUserExistsValidatorSpec.php
@@ -55,7 +55,7 @@ function it_throws_an_exception_if_constraint_is_not_an_instance_of_shop_user_ex
function it_adds_violation_if_shop_user_does_not_exist(
UserRepositoryInterface $userRepository,
- ExecutionContextInterface $executionContext
+ ExecutionContextInterface $executionContext,
): void {
$this->initialize($executionContext);
@@ -65,7 +65,8 @@ function it_adds_violation_if_shop_user_does_not_exist(
$executionContext
->addViolation('sylius.account.invalid_email', ['%email%' => 'test@sylius.com'])
- ->shouldBeCalled();
+ ->shouldBeCalled()
+ ;
$this->validate($value, new ShopUserExists());
}
@@ -73,7 +74,7 @@ function it_adds_violation_if_shop_user_does_not_exist(
function it_does_not_add_violation_if_shop_user_exists(
UserRepositoryInterface $userRepository,
ExecutionContextInterface $executionContext,
- ShopUserInterface $shopUser
+ ShopUserInterface $shopUser,
): void {
$this->initialize($executionContext);
@@ -83,7 +84,8 @@ function it_does_not_add_violation_if_shop_user_exists(
$executionContext
->addViolation('sylius.account.invalid_email', ['%email%' => 'test@sylius.com'])
- ->shouldNotBeCalled();
+ ->shouldNotBeCalled()
+ ;
$this->validate($value, new ShopUserExists());
}
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ShopUserNotVerifiedValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ShopUserNotVerifiedValidatorSpec.php
index 528199e03eb..d20c18cc0a0 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ShopUserNotVerifiedValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ShopUserNotVerifiedValidatorSpec.php
@@ -68,7 +68,7 @@ function it_throws_an_exception_if_shop_user_does_not_exist(UserRepositoryInterf
function it_adds_violation_if_user_has_been_verified(
UserRepositoryInterface $userRepository,
ExecutionContextInterface $executionContext,
- ShopUserInterface $shopUser
+ ShopUserInterface $shopUser,
): void {
$this->initialize($executionContext);
@@ -80,7 +80,8 @@ function it_adds_violation_if_user_has_been_verified(
$executionContext
->addViolation('sylius.account.is_verified', ['%email%' => 'test@sylius.com'])
- ->shouldBeCalled();
+ ->shouldBeCalled()
+ ;
$this->validate($value, new ShopUserNotVerified());
}
@@ -88,7 +89,7 @@ function it_adds_violation_if_user_has_been_verified(
function it_does_not_add_violation_if_shop_user_exists(
UserRepositoryInterface $userRepository,
ExecutionContextInterface $executionContext,
- ShopUserInterface $shopUser
+ ShopUserInterface $shopUser,
): void {
$this->initialize($executionContext);
@@ -100,7 +101,8 @@ function it_does_not_add_violation_if_shop_user_exists(
$executionContext
->addViolation('sylius.account.is_verified', ['%email%' => 'test@sylius.com'])
- ->shouldNotBeCalled();
+ ->shouldNotBeCalled()
+ ;
$this->validate($value, new ShopUserNotVerified());
}
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/UniqueReviewerEmailValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/UniqueReviewerEmailValidatorSpec.php
index 0c18deda3b8..7f90a01157f 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/UniqueReviewerEmailValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/UniqueReviewerEmailValidatorSpec.php
@@ -28,7 +28,7 @@ final class UniqueReviewerEmailValidatorSpec extends ObjectBehavior
function let(
UserRepositoryInterface $shopUserRepository,
UserContextInterface $userContext,
- ExecutionContextInterface $executionContext
+ ExecutionContextInterface $executionContext,
): void {
$this->beConstructedWith($shopUserRepository, $userContext);
$this->initialize($executionContext);
@@ -43,7 +43,7 @@ function it_adds_violation_if_user_with_given_email_is_already_registered(
UserRepositoryInterface $shopUserRepository,
UserContextInterface $userContext,
ExecutionContextInterface $executionContext,
- ShopUserInterface $shopUser
+ ShopUserInterface $shopUser,
): void {
$userContext->getUser()->willReturn(null);
@@ -73,7 +73,7 @@ function it_throws_an_exception_if_constraint_is_not_of_expected_type(): void
function it_does_not_add_violation_if_the_given_email_is_the_same_as_logged_in_shop_user(
UserContextInterface $userContext,
ExecutionContextInterface $executionContext,
- ShopUserInterface $shopUser
+ ShopUserInterface $shopUser,
): void {
$userContext->getUser()->willReturn($shopUser);
$shopUser->getEmail()->willReturn('email@example.com');
diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/UniqueShopUserEmailValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/UniqueShopUserEmailValidatorSpec.php
index 1ad2e9db1ff..7ba55f9075a 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/UniqueShopUserEmailValidatorSpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/UniqueShopUserEmailValidatorSpec.php
@@ -28,7 +28,7 @@ final class UniqueShopUserEmailValidatorSpec extends ObjectBehavior
function let(
CanonicalizerInterface $canonicalizer,
UserRepositoryInterface $shopUserRepository,
- ExecutionContextInterface $executionContext
+ ExecutionContextInterface $executionContext,
): void {
$this->beConstructedWith($canonicalizer, $shopUserRepository);
$this->initialize($executionContext);
@@ -55,7 +55,7 @@ function it_throws_an_exception_if_constraint_is_not_of_expected_type(): void
function it_does_not_add_violation_if_a_user_with_given_email_is_not_found(
CanonicalizerInterface $canonicalizer,
UserRepositoryInterface $shopUserRepository,
- ExecutionContextInterface $executionContext
+ ExecutionContextInterface $executionContext,
): void {
$canonicalizer->canonicalize('eMaIl@example.com')->willReturn('email@example.com');
$shopUserRepository->findOneByEmail('email@example.com')->willReturn(null);
@@ -69,7 +69,7 @@ function it_adds_violation_if_a_user_with_given_email_is_found(
CanonicalizerInterface $canonicalizer,
UserRepositoryInterface $shopUserRepository,
ExecutionContextInterface $executionContext,
- ShopUserInterface $shopUser
+ ShopUserInterface $shopUser,
): void {
$canonicalizer->canonicalize('eMaIl@example.com')->willReturn('email@example.com');
$shopUserRepository->findOneByEmail('email@example.com')->willReturn($shopUser);
diff --git a/src/Sylius/Bundle/ApiBundle/spec/View/Factory/CartShippingMethodFactorySpec.php b/src/Sylius/Bundle/ApiBundle/spec/View/Factory/CartShippingMethodFactorySpec.php
index 12da0ac8365..a55988d39d6 100644
--- a/src/Sylius/Bundle/ApiBundle/spec/View/Factory/CartShippingMethodFactorySpec.php
+++ b/src/Sylius/Bundle/ApiBundle/spec/View/Factory/CartShippingMethodFactorySpec.php
@@ -29,7 +29,7 @@ function it_creates_a_cart_shipping_method(ShippingMethodInterface $shippingMeth
{
$this->create($shippingMethod->getWrappedObject(), 10)->shouldBeLike(new CartShippingMethod(
$shippingMethod->getWrappedObject(),
- 10
+ 10,
));
}
}
diff --git a/src/Sylius/Bundle/ApiBundle/test/src/Tests/DisablingApiTest.php b/src/Sylius/Bundle/ApiBundle/test/src/Tests/DisablingApiTest.php
index fa1bd3d735f..31d746658dc 100644
--- a/src/Sylius/Bundle/ApiBundle/test/src/Tests/DisablingApiTest.php
+++ b/src/Sylius/Bundle/ApiBundle/test/src/Tests/DisablingApiTest.php
@@ -32,7 +32,7 @@ public function it_gets_collection_if_api_is_enabled(): void
static::createClient()->request(
'GET',
'api/v2/admin/orders',
- ['auth_bearer' => $this->JWTAdminUserToken]
+ ['auth_bearer' => $this->JWTAdminUserToken],
);
$this->assertResponseIsSuccessful();
@@ -47,7 +47,7 @@ public function it_returns_route_not_found_if_api_is_disabled(): void
static::createClient()->request(
'GET',
'api/v2/admin/orders',
- ['auth_bearer' => $this->JWTAdminUserToken]
+ ['auth_bearer' => $this->JWTAdminUserToken],
);
$this->assertResponseStatusCodeSame(404);
@@ -57,7 +57,7 @@ public function it_returns_route_not_found_if_api_is_disabled(): void
static::createClient()->request(
'GET',
'api/v2/admin/orders',
- ['auth_bearer' => $this->JWTAdminUserToken]
+ ['auth_bearer' => $this->JWTAdminUserToken],
);
$this->assertResponseIsSuccessful();
diff --git a/src/Sylius/Bundle/ApiBundle/test/src/Tests/DisablingDocumentationTest.php b/src/Sylius/Bundle/ApiBundle/test/src/Tests/DisablingDocumentationTest.php
index c17310f3eb1..30392c16059 100644
--- a/src/Sylius/Bundle/ApiBundle/test/src/Tests/DisablingDocumentationTest.php
+++ b/src/Sylius/Bundle/ApiBundle/test/src/Tests/DisablingDocumentationTest.php
@@ -32,7 +32,7 @@ public function it_disables_documentation(): void
{
static::createClient()->request(
'GET',
- 'api/v2/docs'
+ 'api/v2/docs',
);
self::assertResponseStatusCodeSame(Response::HTTP_NOT_FOUND);
diff --git a/src/Sylius/Bundle/ApiBundle/test/src/Tests/FooApiCommandTest.php b/src/Sylius/Bundle/ApiBundle/test/src/Tests/FooApiCommandTest.php
index bedc4dde11b..f59eb614853 100644
--- a/src/Sylius/Bundle/ApiBundle/test/src/Tests/FooApiCommandTest.php
+++ b/src/Sylius/Bundle/ApiBundle/test/src/Tests/FooApiCommandTest.php
@@ -32,14 +32,14 @@ public function it_returns_information_about_missing_arguments_for_command(): vo
static::createClient()->request(
'POST',
'api/v2/foo-api-command',
- ['json' => ['name' => 'FooCommandPost']]
+ ['json' => ['name' => 'FooCommandPost']],
);
$this->assertResponseHeaderSame('content-type', 'application/ld+json; charset=utf-8');
$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.',
]);
}
@@ -49,7 +49,7 @@ public function it_allows_using_command_if_every_required_parameter_is_provided(
static::createClient()->request(
'POST',
'api/v2/foo-api-command',
- ['json' => ['bar' => 'FooCommandPost']]
+ ['json' => ['bar' => 'FooCommandPost']],
);
$this->assertResponseIsSuccessful();
}
diff --git a/src/Sylius/Bundle/ApiBundle/test/src/Tests/FooSyliusResourceTest.php b/src/Sylius/Bundle/ApiBundle/test/src/Tests/FooSyliusResourceTest.php
index b01e290b0c8..6148864bce4 100644
--- a/src/Sylius/Bundle/ApiBundle/test/src/Tests/FooSyliusResourceTest.php
+++ b/src/Sylius/Bundle/ApiBundle/test/src/Tests/FooSyliusResourceTest.php
@@ -34,7 +34,7 @@ public function it_gets_a_collection_as_a_logged_in_administrator(): void
static::createClient()->request(
'GET',
'api/v2/foo-sylius-resources',
- ['auth_bearer' => $this->JWTAdminUserToken]
+ ['auth_bearer' => $this->JWTAdminUserToken],
);
$this->assertResponseIsSuccessful();
@@ -86,7 +86,7 @@ public function it_creates_a_new_entity_as_a_visitor(): void
static::createClient()->request(
'POST',
'api/v2/foo-sylius-resources',
- ['json' => ['name' => 'FooSyliusResourcePost']]
+ ['json' => ['name' => 'FooSyliusResourcePost']],
);
$this->assertResponseIsSuccessful();
@@ -109,7 +109,7 @@ public function it_gets_an_item_as_a_logged_in_administrator(): void
static::createClient()->request(
'GET',
$fooSyliusResourceIri,
- ['auth_bearer' => $this->JWTAdminUserToken]
+ ['auth_bearer' => $this->JWTAdminUserToken],
);
$this->assertResponseIsSuccessful();
diff --git a/src/Sylius/Bundle/ApiBundle/test/src/Tests/FooTest.php b/src/Sylius/Bundle/ApiBundle/test/src/Tests/FooTest.php
index 7a96d7d8440..d01882ed2d6 100644
--- a/src/Sylius/Bundle/ApiBundle/test/src/Tests/FooTest.php
+++ b/src/Sylius/Bundle/ApiBundle/test/src/Tests/FooTest.php
@@ -36,7 +36,7 @@ public function it_gets_collection_as_a_logged_in_administrator(): void
static::createClient()->request(
'GET',
'api/v2/foos',
- ['auth_bearer' => $this->JWTAdminUserToken]
+ ['auth_bearer' => $this->JWTAdminUserToken],
);
$this->assertResponseIsSuccessful();
@@ -123,7 +123,7 @@ public function it_gets_an_item_as_a_logged_in_administrator_by_admin_endpoint()
static::createClient()->request(
'GET',
'api/v2/admin/foos/' . $foo->getId(),
- ['auth_bearer' => $this->JWTAdminUserToken]
+ ['auth_bearer' => $this->JWTAdminUserToken],
);
$this->assertResponseIsSuccessful();
diff --git a/src/Sylius/Bundle/ApiBundle/test/src/Tests/PromotionTest.php b/src/Sylius/Bundle/ApiBundle/test/src/Tests/PromotionTest.php
index b0353e5329a..8ea3dd2e27e 100644
--- a/src/Sylius/Bundle/ApiBundle/test/src/Tests/PromotionTest.php
+++ b/src/Sylius/Bundle/ApiBundle/test/src/Tests/PromotionTest.php
@@ -57,7 +57,7 @@ public function it_gets_resource_collection_as_a_admin_by_custom_path(): void
static::createClient()->request(
'GET',
'/api/v2/custom/promotions',
- ['auth_bearer' => $this->JWTAdminUserToken]
+ ['auth_bearer' => $this->JWTAdminUserToken],
);
$this->assertResponseIsSuccessful();
diff --git a/src/Sylius/Bundle/ApiBundle/test/src/Tests/SetUpTestsTrait.php b/src/Sylius/Bundle/ApiBundle/test/src/Tests/SetUpTestsTrait.php
index 2bd692250dd..7a077571a76 100644
--- a/src/Sylius/Bundle/ApiBundle/test/src/Tests/SetUpTestsTrait.php
+++ b/src/Sylius/Bundle/ApiBundle/test/src/Tests/SetUpTestsTrait.php
@@ -32,7 +32,7 @@ public function setFixturesFiles(array $fixturesFiles): void
{
$this->fixturesFiles = array_merge(
$fixturesFiles,
- ['test/config/fixtures/administrator.yaml', 'test/config/fixtures/channel.yaml']
+ ['test/config/fixtures/administrator.yaml', 'test/config/fixtures/channel.yaml'],
);
}
diff --git a/src/Sylius/Bundle/ApiBundle/test/src/Tests/TaxonTest.php b/src/Sylius/Bundle/ApiBundle/test/src/Tests/TaxonTest.php
index 313715ecac4..bee407d0e1c 100644
--- a/src/Sylius/Bundle/ApiBundle/test/src/Tests/TaxonTest.php
+++ b/src/Sylius/Bundle/ApiBundle/test/src/Tests/TaxonTest.php
@@ -63,7 +63,7 @@ public function it_gets_collection_with_admin_iris_as_a_logged_in_administrator(
static::createClient()->request(
'GET',
'/api/v2/admin/taxons',
- ['auth_bearer' => $this->JWTAdminUserToken]
+ ['auth_bearer' => $this->JWTAdminUserToken],
);
$this->assertResponseIsSuccessful();
diff --git a/src/Sylius/Bundle/AttributeBundle/Doctrine/ORM/Subscriber/LoadMetadataSubscriber.php b/src/Sylius/Bundle/AttributeBundle/Doctrine/ORM/Subscriber/LoadMetadataSubscriber.php
index fd08b5c7095..c1242e50648 100644
--- a/src/Sylius/Bundle/AttributeBundle/Doctrine/ORM/Subscriber/LoadMetadataSubscriber.php
+++ b/src/Sylius/Bundle/AttributeBundle/Doctrine/ORM/Subscriber/LoadMetadataSubscriber.php
@@ -51,7 +51,7 @@ private function mapSubjectOnAttributeValue(
string $subject,
string $subjectClass,
ClassMetadataInfo $metadata,
- ClassMetadataFactory $metadataFactory
+ ClassMetadataFactory $metadataFactory,
): void {
/** @var ClassMetadataInfo $targetEntityMetadata */
$targetEntityMetadata = $metadataFactory->getMetadataFor($subjectClass);
@@ -73,7 +73,7 @@ private function mapSubjectOnAttributeValue(
private function mapAttributeOnAttributeValue(
string $attributeClass,
ClassMetadataInfo $metadata,
- ClassMetadataFactory $metadataFactory
+ ClassMetadataFactory $metadataFactory,
): void {
/** @var ClassMetadataInfo $attributeMetadata */
$attributeMetadata = $metadataFactory->getMetadataFor($attributeClass);
diff --git a/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeType.php b/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeType.php
index 8846580debe..eaced36ee72 100644
--- a/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeType.php
+++ b/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeType.php
@@ -35,7 +35,7 @@ public function __construct(
string $dataClass,
array $validationGroups,
string $attributeTranslationType,
- FormTypeRegistryInterface $formTypeRegistry
+ FormTypeRegistryInterface $formTypeRegistry,
) {
parent::__construct($dataClass, $validationGroups);
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 6158c5f32b6..46dc538d775 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/Form/Type/AttributeType/SelectAttributeType.php b/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeType/SelectAttributeType.php
index 578015f515c..35b26204add 100644
--- a/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeType/SelectAttributeType.php
+++ b/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeType/SelectAttributeType.php
@@ -37,9 +37,9 @@ public function getParent(): string
public function buildForm(FormBuilderInterface $builder, array $options): void
{
- if (is_array($options['configuration'])
- && isset($options['configuration']['multiple'])
- && !$options['configuration']['multiple']) {
+ if (is_array($options['configuration']) &&
+ isset($options['configuration']['multiple']) &&
+ !$options['configuration']['multiple']) {
$builder->addModelTransformer(new CallbackTransformer(
/**
* @param mixed $array
@@ -60,7 +60,7 @@ function ($string): array {
}
return [];
- }
+ },
));
}
}
@@ -72,9 +72,9 @@ public function configureOptions(OptionsResolver $resolver): void
->setDefault('placeholder', 'sylius.form.attribute_type_configuration.select.choose')
->setDefault('locale_code', $this->defaultLocaleCode)
->setNormalizer('choices', function (Options $options) {
- if (is_array($options['configuration'])
- && isset($options['configuration']['choices'])
- && is_array($options['configuration']['choices'])) {
+ if (is_array($options['configuration']) &&
+ isset($options['configuration']['choices']) &&
+ is_array($options['configuration']['choices'])) {
$choices = [];
$localeCode = $options['locale_code'] ?? $this->defaultLocaleCode;
diff --git a/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeValueType.php b/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeValueType.php
index 2fcb35a2429..ba8410e35a8 100644
--- a/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeValueType.php
+++ b/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeValueType.php
@@ -46,7 +46,7 @@ public function __construct(
string $attributeChoiceType,
RepositoryInterface $attributeRepository,
RepositoryInterface $localeRepository,
- FormTypeRegistryInterface $formTypeTypeRegistry
+ FormTypeRegistryInterface $formTypeTypeRegistry,
) {
parent::__construct($dataClass, $validationGroups);
@@ -94,14 +94,14 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
;
$builder->get('localeCode')->addModelTransformer(
- new ReversedTransformer(new ResourceToIdentifierTransformer($this->localeRepository, 'code'))
+ new ReversedTransformer(new ResourceToIdentifierTransformer($this->localeRepository, 'code')),
);
}
protected function addValueField(
FormInterface $form,
AttributeInterface $attribute,
- ?string $localeCode = null
+ ?string $localeCode = null,
): void {
$form->add('value', $this->formTypeRegistry->get($attribute->getType(), 'default'), [
'auto_initialize' => false,
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 8b76b04d688..a723e562f74 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;
@@ -64,10 +63,10 @@ private function assertChoicesLabels(array $expectedLabels, array $formConfigura
$form = $this->factory->create(
SelectAttributeType::class,
null,
- $formConfiguration
+ $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/AttributeBundle/spec/Doctrine/ORM/Subscriber/LoadMetadataSubscriberSpec.php b/src/Sylius/Bundle/AttributeBundle/spec/Doctrine/ORM/Subscriber/LoadMetadataSubscriberSpec.php
index 33fabb30b21..87471eff029 100644
--- a/src/Sylius/Bundle/AttributeBundle/spec/Doctrine/ORM/Subscriber/LoadMetadataSubscriberSpec.php
+++ b/src/Sylius/Bundle/AttributeBundle/spec/Doctrine/ORM/Subscriber/LoadMetadataSubscriberSpec.php
@@ -62,7 +62,7 @@ function it_does_not_add_a_many_to_one_mapping_if_the_class_is_not_a_configured_
LoadClassMetadataEventArgs $eventArgs,
ClassMetadataInfo $metadata,
EntityManager $entityManager,
- ClassMetadataFactory $classMetadataFactory
+ ClassMetadataFactory $classMetadataFactory,
): void {
$eventArgs->getEntityManager()->willReturn($entityManager);
$entityManager->getMetadataFactory()->willReturn($classMetadataFactory);
@@ -80,7 +80,7 @@ function it_maps_many_to_one_associations_from_the_attribute_value_model_to_the_
ClassMetadataInfo $metadata,
EntityManager $entityManager,
ClassMetadataFactory $classMetadataFactory,
- ClassMetadataInfo $classMetadataInfo
+ ClassMetadataInfo $classMetadataInfo,
): void {
$eventArgs->getEntityManager()->willReturn($entityManager);
$entityManager->getMetadataFactory()->willReturn($classMetadataFactory);
@@ -129,7 +129,7 @@ function it_does_not_add_values_one_to_many_mapping_if_the_class_is_not_a_config
LoadClassMetadataEventArgs $eventArgs,
ClassMetadataInfo $metadata,
EntityManager $entityManager,
- ClassMetadataFactory $classMetadataFactory
+ ClassMetadataFactory $classMetadataFactory,
): void {
$eventArgs->getEntityManager()->willReturn($entityManager);
$entityManager->getMetadataFactory()->willReturn($classMetadataFactory);
diff --git a/src/Sylius/Bundle/AttributeBundle/spec/Validator/Constraints/ValidAttributeValueValidatorSpec.php b/src/Sylius/Bundle/AttributeBundle/spec/Validator/Constraints/ValidAttributeValueValidatorSpec.php
index 8b8e0380e25..da0af232cd7 100644
--- a/src/Sylius/Bundle/AttributeBundle/spec/Validator/Constraints/ValidAttributeValueValidatorSpec.php
+++ b/src/Sylius/Bundle/AttributeBundle/spec/Validator/Constraints/ValidAttributeValueValidatorSpec.php
@@ -49,7 +49,7 @@ function it_validates_attribute_value_based_on_their_type(
AttributeTypeInterface $attributeType,
AttributeValueInterface $attributeValue,
ServiceRegistryInterface $attributeTypesRegistry,
- ValidAttributeValue $attributeValueConstraint
+ ValidAttributeValue $attributeValueConstraint,
): void {
$attributeValue->getType()->willReturn(TextAttributeType::TYPE);
$attributeTypesRegistry->get('text')->willReturn($attributeType);
@@ -63,7 +63,7 @@ function it_validates_attribute_value_based_on_their_type(
function it_throws_exception_if_validated_value_is_not_attribute_value(
\DateTime $badObject,
- ValidAttributeValue $attributeValueConstraint
+ ValidAttributeValue $attributeValueConstraint,
): void {
$this
->shouldThrow(new UnexpectedTypeException('\DateTimeInterface', AttributeValueInterface::class))
diff --git a/src/Sylius/Bundle/AttributeBundle/spec/Validator/Constraints/ValidSelectAttributeConfigurationValidatorSpec.php b/src/Sylius/Bundle/AttributeBundle/spec/Validator/Constraints/ValidSelectAttributeConfigurationValidatorSpec.php
index 0f30ad5005b..6d3f95f1d0e 100644
--- a/src/Sylius/Bundle/AttributeBundle/spec/Validator/Constraints/ValidSelectAttributeConfigurationValidatorSpec.php
+++ b/src/Sylius/Bundle/AttributeBundle/spec/Validator/Constraints/ValidSelectAttributeConfigurationValidatorSpec.php
@@ -37,7 +37,7 @@ function it_is_a_constraint_validator(): void
function it_adds_a_violation_if_max_entries_value_is_lower_than_min_entries_value(
ExecutionContextInterface $context,
- AttributeInterface $attribute
+ AttributeInterface $attribute,
): void {
$constraint = new ValidSelectAttributeConfiguration();
@@ -51,7 +51,7 @@ function it_adds_a_violation_if_max_entries_value_is_lower_than_min_entries_valu
function it_adds_a_violation_if_min_entries_value_is_greater_than_the_number_of_added_choices(
ExecutionContextInterface $context,
- AttributeInterface $attribute
+ AttributeInterface $attribute,
): void {
$constraint = new ValidSelectAttributeConfiguration();
@@ -73,7 +73,7 @@ function it_adds_a_violation_if_min_entries_value_is_greater_than_the_number_of_
function it_adds_a_violation_if_multiple_is_not_true_when_min_or_max_entries_values_are_specified(
ExecutionContextInterface $context,
- AttributeInterface $attribute
+ AttributeInterface $attribute,
): void {
$constraint = new ValidSelectAttributeConfiguration();
@@ -87,7 +87,7 @@ function it_adds_a_violation_if_multiple_is_not_true_when_min_or_max_entries_val
function it_does_nothing_if_an_attribute_is_not_a_select_type(
ExecutionContextInterface $context,
- AttributeInterface $attribute
+ AttributeInterface $attribute,
): void {
$constraint = new ValidSelectAttributeConfiguration();
@@ -109,7 +109,7 @@ function it_throws_an_exception_if_validated_value_is_not_an_attribute(): void
}
function it_throws_an_exception_if_constraint_is_not_a_valid_select_attribute_configuration_constraint(
- AttributeInterface $attribute
+ AttributeInterface $attribute,
): void {
$constraint = new ValidTextAttributeConfiguration();
diff --git a/src/Sylius/Bundle/AttributeBundle/spec/Validator/Constraints/ValidTextAttributeConfigurationValidatorSpec.php b/src/Sylius/Bundle/AttributeBundle/spec/Validator/Constraints/ValidTextAttributeConfigurationValidatorSpec.php
index d72c0520b7e..3bf758321bb 100644
--- a/src/Sylius/Bundle/AttributeBundle/spec/Validator/Constraints/ValidTextAttributeConfigurationValidatorSpec.php
+++ b/src/Sylius/Bundle/AttributeBundle/spec/Validator/Constraints/ValidTextAttributeConfigurationValidatorSpec.php
@@ -37,7 +37,7 @@ function it_is_a_constraint_validator(): void
function it_adds_a_violation_if_max_entries_value_is_lower_than_min_entries_value(
ExecutionContextInterface $context,
- AttributeInterface $attribute
+ AttributeInterface $attribute,
): void {
$constraint = new ValidTextAttributeConfiguration();
@@ -51,7 +51,7 @@ function it_adds_a_violation_if_max_entries_value_is_lower_than_min_entries_valu
function it_does_nothing_if_an_attribute_is_not_a_text_type(
ExecutionContextInterface $context,
- AttributeInterface $attribute
+ AttributeInterface $attribute,
): void {
$constraint = new ValidTextAttributeConfiguration();
@@ -73,7 +73,7 @@ function it_throws_an_exception_if_validated_value_is_not_an_attribute(): void
}
function it_throws_an_exception_if_constraint_is_not_a_valid_text_attribute_configuration_constraint(
- AttributeInterface $attribute
+ AttributeInterface $attribute,
): void {
$constraint = new ValidSelectAttributeConfiguration();
diff --git a/src/Sylius/Bundle/AttributeBundle/test/src/Tests/SyliusAttributeBundleTest.php b/src/Sylius/Bundle/AttributeBundle/test/src/Tests/SyliusAttributeBundleTest.php
index cbd1f9a1164..bded96693e7 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/Collector/ChannelCollector.php b/src/Sylius/Bundle/ChannelBundle/Collector/ChannelCollector.php
index 268b5a92e8d..1b65f587f2e 100644
--- a/src/Sylius/Bundle/ChannelBundle/Collector/ChannelCollector.php
+++ b/src/Sylius/Bundle/ChannelBundle/Collector/ChannelCollector.php
@@ -28,7 +28,7 @@ final class ChannelCollector extends DataCollector
public function __construct(
ChannelRepositoryInterface $channelRepository,
ChannelContextInterface $channelContext,
- bool $channelChangeSupport = false
+ bool $channelChangeSupport = false,
) {
$this->channelContext = $channelContext;
diff --git a/src/Sylius/Bundle/ChannelBundle/Context/FakeChannel/FakeChannelContext.php b/src/Sylius/Bundle/ChannelBundle/Context/FakeChannel/FakeChannelContext.php
index fa95a8896df..a87546c5a67 100644
--- a/src/Sylius/Bundle/ChannelBundle/Context/FakeChannel/FakeChannelContext.php
+++ b/src/Sylius/Bundle/ChannelBundle/Context/FakeChannel/FakeChannelContext.php
@@ -31,7 +31,7 @@ final class FakeChannelContext implements ChannelContextInterface
public function __construct(
FakeChannelCodeProviderInterface $fakeChannelCodeProvider,
ChannelRepositoryInterface $channelRepository,
- RequestStack $requestStack
+ RequestStack $requestStack,
) {
$this->fakeChannelCodeProvider = $fakeChannelCodeProvider;
$this->channelRepository = $channelRepository;
diff --git a/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Compiler/CompositeChannelContextPass.php b/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Compiler/CompositeChannelContextPass.php
index 6d65052bd09..70c66826dfd 100644
--- a/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Compiler/CompositeChannelContextPass.php
+++ b/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Compiler/CompositeChannelContextPass.php
@@ -23,7 +23,7 @@ public function __construct()
'sylius.context.channel',
'sylius.context.channel.composite',
'sylius.context.channel',
- 'addContext'
+ 'addContext',
);
}
}
diff --git a/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Compiler/CompositeRequestResolverPass.php b/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Compiler/CompositeRequestResolverPass.php
index f7e7891eb5c..12e89d5a70a 100644
--- a/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Compiler/CompositeRequestResolverPass.php
+++ b/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Compiler/CompositeRequestResolverPass.php
@@ -23,7 +23,7 @@ public function __construct()
'sylius.context.channel.request_based.resolver',
'sylius.context.channel.request_based.resolver.composite',
'sylius.context.channel.request_based.resolver',
- 'addResolver'
+ 'addResolver',
);
}
}
diff --git a/src/Sylius/Bundle/ChannelBundle/Form/Type/ChannelChoiceType.php b/src/Sylius/Bundle/ChannelBundle/Form/Type/ChannelChoiceType.php
index 58355f1b410..7d4338b87c6 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/Tests/DependencyInjection/Compiler/CompositeChannelContextPassTest.php b/src/Sylius/Bundle/ChannelBundle/Tests/DependencyInjection/Compiler/CompositeChannelContextPassTest.php
index bbfe18f35c7..b5ccf184189 100644
--- a/src/Sylius/Bundle/ChannelBundle/Tests/DependencyInjection/Compiler/CompositeChannelContextPassTest.php
+++ b/src/Sylius/Bundle/ChannelBundle/Tests/DependencyInjection/Compiler/CompositeChannelContextPassTest.php
@@ -31,7 +31,7 @@ public function it_collects_tagged_channel_contexts(): void
$this->setDefinition('sylius.context.channel.composite', new Definition());
$this->setDefinition(
'sylius.context.channel.tagged_one',
- (new Definition())->addTag('sylius.context.channel')
+ (new Definition())->addTag('sylius.context.channel'),
);
$this->compile();
@@ -40,7 +40,7 @@ public function it_collects_tagged_channel_contexts(): void
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.context.channel',
'addContext',
- [new Reference('sylius.context.channel.tagged_one'), 0]
+ [new Reference('sylius.context.channel.tagged_one'), 0],
);
}
@@ -52,7 +52,7 @@ public function it_collects_tagged_channel_contexts_with_priority(): void
$this->setDefinition('sylius.context.channel.composite', new Definition());
$this->setDefinition(
'sylius.context.channel.tagged_one',
- (new Definition())->addTag('sylius.context.channel', ['priority' => 42])
+ (new Definition())->addTag('sylius.context.channel', ['priority' => 42]),
);
$this->compile();
@@ -61,7 +61,7 @@ public function it_collects_tagged_channel_contexts_with_priority(): void
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.context.channel',
'addContext',
- [new Reference('sylius.context.channel.tagged_one'), 42]
+ [new Reference('sylius.context.channel.tagged_one'), 42],
);
}
@@ -74,7 +74,7 @@ public function it_does_not_add_method_calls_to_the_overriding_service_if_the_co
$this->setDefinition('sylius.context.channel.composite', new Definition());
$this->setDefinition(
'sylius.context.channel.tagged_one',
- (new Definition())->addTag('sylius.context.channel')
+ (new Definition())->addTag('sylius.context.channel'),
);
$this->compile();
@@ -82,7 +82,7 @@ public function it_does_not_add_method_calls_to_the_overriding_service_if_the_co
$this->assertContainerBuilderNotHasServiceDefinitionWithMethodCall(
'sylius.context.channel',
'addContext',
- [new Reference('sylius.context.channel.tagged_one'), 0]
+ [new Reference('sylius.context.channel.tagged_one'), 0],
);
}
@@ -95,7 +95,7 @@ public function it_still_adds_method_calls_to_composite_context_even_if_it_was_o
$this->setDefinition('sylius.context.channel.composite', new Definition());
$this->setDefinition(
'sylius.context.channel.tagged_one',
- (new Definition())->addTag('sylius.context.channel')
+ (new Definition())->addTag('sylius.context.channel'),
);
$this->compile();
@@ -103,7 +103,7 @@ public function it_still_adds_method_calls_to_composite_context_even_if_it_was_o
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.context.channel.composite',
'addContext',
- [new Reference('sylius.context.channel.tagged_one'), 0]
+ [new Reference('sylius.context.channel.tagged_one'), 0],
);
}
@@ -115,13 +115,13 @@ protected function registerCompilerPass(ContainerBuilder $container): void
private function assertContainerBuilderNotHasServiceDefinitionWithMethodCall(
string $serviceId,
string $method,
- array $arguments
+ array $arguments,
): void {
$definition = $this->container->findDefinition($serviceId);
self::assertThat(
$definition,
- new LogicalNot(new DefinitionHasMethodCallConstraint($method, $arguments))
+ new LogicalNot(new DefinitionHasMethodCallConstraint($method, $arguments)),
);
}
}
diff --git a/src/Sylius/Bundle/ChannelBundle/Tests/DependencyInjection/Compiler/CompositeRequestResolverPassTest.php b/src/Sylius/Bundle/ChannelBundle/Tests/DependencyInjection/Compiler/CompositeRequestResolverPassTest.php
index 2da0a225d4b..f729d865d1b 100644
--- a/src/Sylius/Bundle/ChannelBundle/Tests/DependencyInjection/Compiler/CompositeRequestResolverPassTest.php
+++ b/src/Sylius/Bundle/ChannelBundle/Tests/DependencyInjection/Compiler/CompositeRequestResolverPassTest.php
@@ -31,7 +31,7 @@ public function it_collects_tagged_request_based_channel_contexts(): void
$this->setDefinition('sylius.context.channel.request_based.resolver.composite', new Definition());
$this->setDefinition(
'sylius.context.channel.request_based.resolver.tagged_one',
- (new Definition())->addTag('sylius.context.channel.request_based.resolver')
+ (new Definition())->addTag('sylius.context.channel.request_based.resolver'),
);
$this->compile();
@@ -39,7 +39,7 @@ public function it_collects_tagged_request_based_channel_contexts(): void
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.context.channel.request_based.resolver',
'addResolver',
- [new Reference('sylius.context.channel.request_based.resolver.tagged_one'), 0]
+ [new Reference('sylius.context.channel.request_based.resolver.tagged_one'), 0],
);
}
@@ -51,7 +51,7 @@ public function it_collects_tagged_request_based_channel_contexts_with_custom_pr
$this->setDefinition('sylius.context.channel.request_based.resolver.composite', new Definition());
$this->setDefinition(
'sylius.context.channel.request_based.resolver.tagged_one',
- (new Definition())->addTag('sylius.context.channel.request_based.resolver', ['priority' => 42])
+ (new Definition())->addTag('sylius.context.channel.request_based.resolver', ['priority' => 42]),
);
$this->compile();
@@ -59,7 +59,7 @@ public function it_collects_tagged_request_based_channel_contexts_with_custom_pr
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.context.channel.request_based.resolver',
'addResolver',
- [new Reference('sylius.context.channel.request_based.resolver.tagged_one'), 42]
+ [new Reference('sylius.context.channel.request_based.resolver.tagged_one'), 42],
);
}
@@ -72,7 +72,7 @@ public function it_does_not_add_method_calls_to_the_overriding_service_if_the_co
$this->setDefinition('sylius.context.channel.request_based.resolver.composite', new Definition());
$this->setDefinition(
'sylius.context.channel.request_based.resolver.tagged_one',
- (new Definition())->addTag('sylius.context.channel.request_based.resolver')
+ (new Definition())->addTag('sylius.context.channel.request_based.resolver'),
);
$this->compile();
@@ -80,7 +80,7 @@ public function it_does_not_add_method_calls_to_the_overriding_service_if_the_co
$this->assertContainerBuilderNotHasServiceDefinitionWithMethodCall(
'sylius.context.channel.request_based.resolver',
'addResolver',
- [new Reference('sylius.context.channel.request_based.resolver.tagged_one'), 0]
+ [new Reference('sylius.context.channel.request_based.resolver.tagged_one'), 0],
);
}
@@ -93,7 +93,7 @@ public function it_still_adds_method_calls_to_composite_context_even_if_it_was_o
$this->setDefinition('sylius.context.channel.request_based.resolver.composite', new Definition());
$this->setDefinition(
'sylius.context.channel.request_based.resolver.tagged_one',
- (new Definition())->addTag('sylius.context.channel.request_based.resolver')
+ (new Definition())->addTag('sylius.context.channel.request_based.resolver'),
);
$this->compile();
@@ -101,7 +101,7 @@ public function it_still_adds_method_calls_to_composite_context_even_if_it_was_o
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.context.channel.request_based.resolver.composite',
'addResolver',
- [new Reference('sylius.context.channel.request_based.resolver.tagged_one'), 0]
+ [new Reference('sylius.context.channel.request_based.resolver.tagged_one'), 0],
);
}
@@ -113,13 +113,13 @@ protected function registerCompilerPass(ContainerBuilder $container): void
private function assertContainerBuilderNotHasServiceDefinitionWithMethodCall(
string $serviceId,
string $method,
- array $arguments
+ array $arguments,
): void {
$definition = $this->container->findDefinition($serviceId);
self::assertThat(
$definition,
- new LogicalNot(new DefinitionHasMethodCallConstraint($method, $arguments))
+ new LogicalNot(new DefinitionHasMethodCallConstraint($method, $arguments)),
);
}
}
diff --git a/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelCodeProviderSpec.php b/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelCodeProviderSpec.php
index 4e34dbefe46..fc77e5ff262 100644
--- a/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelCodeProviderSpec.php
+++ b/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelCodeProviderSpec.php
@@ -36,7 +36,7 @@ function it_returns_fake_channel_code_from_query_string(Request $request, Parame
function it_returns_fake_channel_code_from_cookie_if_there_is_none_in_query_string(
Request $request,
ParameterBag $queryBag,
- ParameterBag $cookiesBag
+ ParameterBag $cookiesBag,
): void {
$queryBag->get('_channel_code')->willReturn(null);
$request->query = $queryBag;
@@ -50,7 +50,7 @@ function it_returns_fake_channel_code_from_cookie_if_there_is_none_in_query_stri
function it_returns_null_channel_code_if_no_fake_channel_code_was_found(
Request $request,
ParameterBag $queryBag,
- ParameterBag $cookiesBag
+ ParameterBag $cookiesBag,
): void {
$queryBag->get('_channel_code')->willReturn(null);
$request->query = $queryBag;
diff --git a/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelContextSpec.php b/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelContextSpec.php
index 47d3fb7b250..41389d0301e 100644
--- a/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelContextSpec.php
+++ b/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelContextSpec.php
@@ -28,7 +28,7 @@ final class FakeChannelContextSpec extends ObjectBehavior
function let(
FakeChannelCodeProviderInterface $fakeChannelCodeProvider,
ChannelRepositoryInterface $channelRepository,
- RequestStack $requestStack
+ RequestStack $requestStack,
): void {
$this->beConstructedWith($fakeChannelCodeProvider, $channelRepository, $requestStack);
}
@@ -43,7 +43,7 @@ function it_returns_a_fake_channel_with_the_given_code(
ChannelRepositoryInterface $channelRepository,
RequestStack $requestStack,
Request $request,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$requestStack->getMasterRequest()->willReturn($request);
@@ -65,7 +65,7 @@ function it_throws_a_channel_not_found_exception_if_provided_code_was_null(
FakeChannelCodeProviderInterface $fakeChannelCodeProvider,
ChannelRepositoryInterface $channelRepository,
RequestStack $requestStack,
- Request $request
+ Request $request,
): void {
$requestStack->getMasterRequest()->willReturn($request);
@@ -80,7 +80,7 @@ function it_throws_a_channel_not_found_exception_if_channel_with_given_code_was_
FakeChannelCodeProviderInterface $fakeChannelCodeProvider,
ChannelRepositoryInterface $channelRepository,
RequestStack $requestStack,
- Request $request
+ Request $request,
): void {
$requestStack->getMasterRequest()->willReturn($request);
diff --git a/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelPersisterSpec.php b/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelPersisterSpec.php
index 8c205540d53..9093a30fe81 100644
--- a/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelPersisterSpec.php
+++ b/src/Sylius/Bundle/ChannelBundle/spec/Context/FakeChannel/FakeChannelPersisterSpec.php
@@ -36,7 +36,7 @@ function it_applies_only_to_master_requests(HttpKernelInterface $kernel, Request
$kernel->getWrappedObject(),
$request->getWrappedObject(),
HttpKernelInterface::SUB_REQUEST,
- $response->getWrappedObject()
+ $response->getWrappedObject(),
));
}
@@ -44,7 +44,7 @@ function it_applies_only_for_request_with_fake_channel_code(
FakeChannelCodeProviderInterface $fakeHostnameProvider,
HttpKernelInterface $kernel,
Request $request,
- Response $response
+ Response $response,
): void {
$fakeHostnameProvider->getCode($request)->willReturn(null);
@@ -52,7 +52,7 @@ function it_applies_only_for_request_with_fake_channel_code(
$kernel->getWrappedObject(),
$request->getWrappedObject(),
HttpKernelInterface::MASTER_REQUEST,
- $response->getWrappedObject()
+ $response->getWrappedObject(),
));
}
@@ -61,13 +61,13 @@ function it_persists_fake_channel_codes_in_a_cookie(
HttpKernelInterface $kernel,
Request $request,
Response $response,
- ResponseHeaderBag $responseHeaderBag
+ ResponseHeaderBag $responseHeaderBag,
): void {
$fakeHostnameProvider->getCode($request)->willReturn('fake_channel_code');
$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()
;
@@ -75,7 +75,7 @@ function it_persists_fake_channel_codes_in_a_cookie(
$kernel->getWrappedObject(),
$request->getWrappedObject(),
HttpKernelInterface::MASTER_REQUEST,
- $response->getWrappedObject()
+ $response->getWrappedObject(),
));
}
}
diff --git a/src/Sylius/Bundle/ChannelBundle/test/src/Tests/SyliusChannelBundleTest.php b/src/Sylius/Bundle/ChannelBundle/test/src/Tests/SyliusChannelBundleTest.php
index 400b5571b9b..e96e08df2ae 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 a09bb040c9c..56b8d821152 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
@@ -55,7 +55,7 @@ public function getContainerExtension(): ?ExtensionInterface
throw new \LogicException(sprintf(
'Users will expect the alias of the default extension of a plugin to be the underscored version of the plugin name ("%s"). You can override "Bundle::getContainerExtension()" if you want to use "%s" or another alias.',
$expectedAlias,
- $extension->getAlias()
+ $extension->getAlias(),
));
}
diff --git a/src/Sylius/Bundle/CoreBundle/Checkout/CheckoutRedirectListener.php b/src/Sylius/Bundle/CoreBundle/Checkout/CheckoutRedirectListener.php
index 25c28a76932..57cee2bf093 100644
--- a/src/Sylius/Bundle/CoreBundle/Checkout/CheckoutRedirectListener.php
+++ b/src/Sylius/Bundle/CoreBundle/Checkout/CheckoutRedirectListener.php
@@ -31,7 +31,7 @@ final class CheckoutRedirectListener
public function __construct(
RequestStack $requestStack,
CheckoutStateUrlGeneratorInterface $checkoutStateUrlGenerator,
- RequestMatcherInterface $requestMatcher
+ RequestMatcherInterface $requestMatcher,
) {
$this->requestStack = $requestStack;
$this->checkoutStateUrlGenerator = $checkoutStateUrlGenerator;
diff --git a/src/Sylius/Bundle/CoreBundle/Checkout/CheckoutResolver.php b/src/Sylius/Bundle/CoreBundle/Checkout/CheckoutResolver.php
index 2a4a072fdfe..87f53b35ca0 100644
--- a/src/Sylius/Bundle/CoreBundle/Checkout/CheckoutResolver.php
+++ b/src/Sylius/Bundle/CoreBundle/Checkout/CheckoutResolver.php
@@ -37,7 +37,7 @@ public function __construct(
CartContextInterface $cartContext,
CheckoutStateUrlGeneratorInterface $urlGenerator,
RequestMatcherInterface $requestMatcher,
- FactoryInterface $stateMachineFactory
+ FactoryInterface $stateMachineFactory,
) {
$this->cartContext = $cartContext;
$this->urlGenerator = $urlGenerator;
diff --git a/src/Sylius/Bundle/CoreBundle/Checkout/CheckoutStateUrlGenerator.php b/src/Sylius/Bundle/CoreBundle/Checkout/CheckoutStateUrlGenerator.php
index af4e24a96b7..f3e6ebfee0a 100644
--- a/src/Sylius/Bundle/CoreBundle/Checkout/CheckoutStateUrlGenerator.php
+++ b/src/Sylius/Bundle/CoreBundle/Checkout/CheckoutStateUrlGenerator.php
@@ -38,7 +38,7 @@ public function generate($name, $parameters = [], $referenceType = self::ABSOLUT
public function generateForOrderCheckoutState(
OrderInterface $order,
array $parameters = [],
- int $referenceType = self::ABSOLUTE_PATH
+ int $referenceType = self::ABSOLUTE_PATH,
): string {
if (!isset($this->routeCollection[$order->getCheckoutState()]['route'])) {
throw new RouteNotFoundException();
diff --git a/src/Sylius/Bundle/CoreBundle/Checkout/CheckoutStateUrlGeneratorInterface.php b/src/Sylius/Bundle/CoreBundle/Checkout/CheckoutStateUrlGeneratorInterface.php
index 8a4c3616960..da4861540f0 100644
--- a/src/Sylius/Bundle/CoreBundle/Checkout/CheckoutStateUrlGeneratorInterface.php
+++ b/src/Sylius/Bundle/CoreBundle/Checkout/CheckoutStateUrlGeneratorInterface.php
@@ -21,7 +21,7 @@ interface CheckoutStateUrlGeneratorInterface extends UrlGeneratorInterface
public function generateForOrderCheckoutState(
OrderInterface $order,
array $parameters = [],
- int $referenceType = self::ABSOLUTE_PATH
+ int $referenceType = self::ABSOLUTE_PATH,
): string;
public function generateForCart(array $parameters = [], int $referenceType = self::ABSOLUTE_PATH): string;
diff --git a/src/Sylius/Bundle/CoreBundle/Collector/SyliusCollector.php b/src/Sylius/Bundle/CoreBundle/Collector/SyliusCollector.php
index 5a7857016d5..13ec0941cb0 100644
--- a/src/Sylius/Bundle/CoreBundle/Collector/SyliusCollector.php
+++ b/src/Sylius/Bundle/CoreBundle/Collector/SyliusCollector.php
@@ -30,7 +30,7 @@ final class SyliusCollector extends DataCollector
public function __construct(
ShopperContextInterface $shopperContext,
array $bundles,
- string $defaultLocaleCode
+ string $defaultLocaleCode,
) {
$this->shopperContext = $shopperContext;
diff --git a/src/Sylius/Bundle/CoreBundle/Command/AbstractInstallCommand.php b/src/Sylius/Bundle/CoreBundle/Command/AbstractInstallCommand.php
index c36c5e45e6f..2440d387d86 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 7cf79b25818..fb0c591b5fb 100644
--- a/src/Sylius/Bundle/CoreBundle/Command/CancelUnpaidOrdersCommand.php
+++ b/src/Sylius/Bundle/CoreBundle/Command/CancelUnpaidOrdersCommand.php
@@ -28,8 +28,9 @@ protected function configure(): void
{
$this
->setDescription(
- 'Removes order that have been unpaid for a configured period. Configuration parameter - sylius_order.order_expiration_period.'
- );
+ 'Removes order that have been unpaid for a configured period. Configuration parameter - sylius_order.order_expiration_period.',
+ )
+ ;
}
protected function execute(InputInterface $input, OutputInterface $output): int
@@ -37,7 +38,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$expirationTime = $this->getContainer()->getParameter('sylius_order.order_expiration_period');
$output->writeln(sprintf(
'Command will cancel orders that have been unpaid for %s.',
- (string) $expirationTime
+ (string) $expirationTime,
));
$unpaidCartsStateUpdater = $this->getContainer()->get('sylius.unpaid_orders_state_updater');
@@ -45,7 +46,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/Command/CheckRequirementsCommand.php b/src/Sylius/Bundle/CoreBundle/Command/CheckRequirementsCommand.php
index 6fa5fe3cf83..5f6c74ec052 100644
--- a/src/Sylius/Bundle/CoreBundle/Command/CheckRequirementsCommand.php
+++ b/src/Sylius/Bundle/CoreBundle/Command/CheckRequirementsCommand.php
@@ -39,7 +39,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
if (!$fulfilled) {
throw new RuntimeException(
- 'Some system requirements are not fulfilled. Please check output messages and fix them.'
+ 'Some system requirements are not fulfilled. Please check output messages and fix them.',
);
}
diff --git a/src/Sylius/Bundle/CoreBundle/Command/InformAboutGUSCommand.php b/src/Sylius/Bundle/CoreBundle/Command/InformAboutGUSCommand.php
index 811589b88d7..5b10811921b 100644
--- a/src/Sylius/Bundle/CoreBundle/Command/InformAboutGUSCommand.php
+++ b/src/Sylius/Bundle/CoreBundle/Command/InformAboutGUSCommand.php
@@ -43,7 +43,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
'If you do not consent please follow this cookbook article:',
'https://docs.sylius.com/en/latest/cookbook/configuration/disabling-admin-notifications.html',
'That being said, every time we get a notification about a new site deployed with Sylius, it brings a huge smile to our face and motivates us to continue our Open Source work.',
- ]
+ ],
);
return 0;
diff --git a/src/Sylius/Bundle/CoreBundle/Command/InstallAssetsCommand.php b/src/Sylius/Bundle/CoreBundle/Command/InstallAssetsCommand.php
index e9c448862aa..1ce4be202f7 100644
--- a/src/Sylius/Bundle/CoreBundle/Command/InstallAssetsCommand.php
+++ b/src/Sylius/Bundle/CoreBundle/Command/InstallAssetsCommand.php
@@ -36,7 +36,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
{
$output->writeln(sprintf(
'Installing Sylius assets for environment %s.',
- $this->getEnvironment()
+ $this->getEnvironment(),
));
try {
diff --git a/src/Sylius/Bundle/CoreBundle/Command/InstallCommand.php b/src/Sylius/Bundle/CoreBundle/Command/InstallCommand.php
index 29b10270787..daa082eb957 100644
--- a/src/Sylius/Bundle/CoreBundle/Command/InstallCommand.php
+++ b/src/Sylius/Bundle/CoreBundle/Command/InstallCommand.php
@@ -77,7 +77,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
'Step %d of %d. %s',
$step + 1,
count($this->commands),
- $command['message']
+ $command['message'],
));
$parameters = [];
diff --git a/src/Sylius/Bundle/CoreBundle/Command/InstallDatabaseCommand.php b/src/Sylius/Bundle/CoreBundle/Command/InstallDatabaseCommand.php
index 6aea451cf02..1af50ef8eaa 100644
--- a/src/Sylius/Bundle/CoreBundle/Command/InstallDatabaseCommand.php
+++ b/src/Sylius/Bundle/CoreBundle/Command/InstallDatabaseCommand.php
@@ -42,7 +42,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$outputStyle = new SymfonyStyle($input, $output);
$outputStyle->writeln(sprintf(
'Creating Sylius database for environment %s.',
- $this->getEnvironment()
+ $this->getEnvironment(),
));
$commands = $this
diff --git a/src/Sylius/Bundle/CoreBundle/Command/InstallSampleDataCommand.php b/src/Sylius/Bundle/CoreBundle/Command/InstallSampleDataCommand.php
index 77611417b4e..4e646c2dcfc 100644
--- a/src/Sylius/Bundle/CoreBundle/Command/InstallSampleDataCommand.php
+++ b/src/Sylius/Bundle/CoreBundle/Command/InstallSampleDataCommand.php
@@ -48,7 +48,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$outputStyle->writeln(sprintf(
'Loading sample data for environment %s from suite %s.',
$this->getEnvironment(),
- $suite ?? 'default'
+ $suite ?? 'default',
));
$outputStyle->writeln('Warning! This action will erase your database.');
diff --git a/src/Sylius/Bundle/CoreBundle/Command/SetupCommand.php b/src/Sylius/Bundle/CoreBundle/Command/SetupCommand.php
index 4e76e2c112b..ca0c52fdd18 100644
--- a/src/Sylius/Bundle/CoreBundle/Command/SetupCommand.php
+++ b/src/Sylius/Bundle/CoreBundle/Command/SetupCommand.php
@@ -78,7 +78,7 @@ protected function setupAdministratorUser(InputInterface $input, OutputInterface
private function configureNewUser(
AdminUserInterface $user,
InputInterface $input,
- OutputInterface $output
+ OutputInterface $output,
): AdminUserInterface {
/** @var UserRepositoryInterface $userRepository */
$userRepository = $this->getAdminUserRepository();
@@ -116,7 +116,7 @@ function ($value): string {
}
return $value;
- }
+ },
)
->setMaxAttempts(3)
;
diff --git a/src/Sylius/Bundle/CoreBundle/Context/CustomerAndChannelBasedCartContext.php b/src/Sylius/Bundle/CoreBundle/Context/CustomerAndChannelBasedCartContext.php
index 5b21cf1ec15..44c250ad036 100644
--- a/src/Sylius/Bundle/CoreBundle/Context/CustomerAndChannelBasedCartContext.php
+++ b/src/Sylius/Bundle/CoreBundle/Context/CustomerAndChannelBasedCartContext.php
@@ -32,7 +32,7 @@ final class CustomerAndChannelBasedCartContext implements CartContextInterface
public function __construct(
CustomerContextInterface $customerContext,
ChannelContextInterface $channelContext,
- OrderRepositoryInterface $orderRepository
+ OrderRepositoryInterface $orderRepository,
) {
$this->customerContext = $customerContext;
$this->channelContext = $channelContext;
diff --git a/src/Sylius/Bundle/CoreBundle/Controller/OrderController.php b/src/Sylius/Bundle/CoreBundle/Controller/OrderController.php
index c5d050322e9..24d6db0bd2a 100644
--- a/src/Sylius/Bundle/CoreBundle/Controller/OrderController.php
+++ b/src/Sylius/Bundle/CoreBundle/Controller/OrderController.php
@@ -46,7 +46,7 @@ public function summaryAction(Request $request): Response
[
'cart' => $cart,
'form' => $form->createView(),
- ]
+ ],
);
}
@@ -62,7 +62,7 @@ public function thankYouAction(Request $request): Response
return $this->redirectHandler->redirectToRoute(
$configuration,
$options['route'] ?? 'sylius_shop_homepage',
- $options['parameters'] ?? []
+ $options['parameters'] ?? [],
);
}
@@ -74,7 +74,7 @@ public function thankYouAction(Request $request): Response
$configuration->getParameters()->get('template'),
[
'order' => $order,
- ]
+ ],
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Controller/PaymentMethodController.php b/src/Sylius/Bundle/CoreBundle/Controller/PaymentMethodController.php
index 0cdea4c1d36..efa3d1c45cf 100644
--- a/src/Sylius/Bundle/CoreBundle/Controller/PaymentMethodController.php
+++ b/src/Sylius/Bundle/CoreBundle/Controller/PaymentMethodController.php
@@ -26,7 +26,7 @@ public function getPaymentGatewaysAction(Request $request, string $template): Re
[
'gatewayFactories' => $this->getParameter('sylius.gateway_factories'),
'metadata' => $this->metadata,
- ]
+ ],
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Controller/ProductTaxonController.php b/src/Sylius/Bundle/CoreBundle/Controller/ProductTaxonController.php
index 5de2e5ae817..709457c1e53 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/Controller/ProductVariantController.php b/src/Sylius/Bundle/CoreBundle/Controller/ProductVariantController.php
index 2e1bd17e763..56af3908486 100644
--- a/src/Sylius/Bundle/CoreBundle/Controller/ProductVariantController.php
+++ b/src/Sylius/Bundle/CoreBundle/Controller/ProductVariantController.php
@@ -42,7 +42,7 @@ public function updatePositionsAction(Request $request): Response
if (!is_numeric($productVariantToUpdate['position'])) {
throw new HttpException(
Response::HTTP_NOT_ACCEPTABLE,
- sprintf('The product variant position "%s" is invalid.', $productVariantToUpdate['position'])
+ sprintf('The product variant position "%s" is invalid.', $productVariantToUpdate['position']),
);
}
diff --git a/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/BackwardsCompatibility/ResolveShopUserTargetEntityPass.php b/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/BackwardsCompatibility/ResolveShopUserTargetEntityPass.php
index 382eb6ef34f..b8ce3e8359e 100644
--- a/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/BackwardsCompatibility/ResolveShopUserTargetEntityPass.php
+++ b/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/BackwardsCompatibility/ResolveShopUserTargetEntityPass.php
@@ -34,7 +34,7 @@ public function process(ContainerBuilder $container): void
$resolveTargetEntityListener->addMethodCall(
'addResolveTargetEntity',
- [UserInterface::class, $shopUserClass, []]
+ [UserInterface::class, $shopUserClass, []],
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/CircularDependencyBreakingErrorListenerPass.php b/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/CircularDependencyBreakingErrorListenerPass.php
index dc8e878448b..5e0e468c3bc 100644
--- a/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/CircularDependencyBreakingErrorListenerPass.php
+++ b/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/CircularDependencyBreakingErrorListenerPass.php
@@ -33,7 +33,7 @@ public function process(ContainerBuilder $container): void
$container->setDefinition(
CircularDependencyBreakingErrorListener::class,
- $definition
+ $definition,
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/CircularDependencyBreakingExceptionListenerPass.php b/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/CircularDependencyBreakingExceptionListenerPass.php
index 2b5ea1e5ebc..eedca146c74 100644
--- a/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/CircularDependencyBreakingExceptionListenerPass.php
+++ b/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/CircularDependencyBreakingExceptionListenerPass.php
@@ -34,7 +34,7 @@ public function process(ContainerBuilder $container): void
$container->setDefinition(
CircularDependencyBreakingExceptionListener::class,
- $definition
+ $definition,
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/RegisterUriBasedSectionResolverPass.php b/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/RegisterUriBasedSectionResolverPass.php
index 74f5335ba17..7c84ea50325 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/DependencyInjection/SyliusCoreExtension.php b/src/Sylius/Bundle/CoreBundle/DependencyInjection/SyliusCoreExtension.php
index 7071cae529a..c0b5ebc7afa 100644
--- a/src/Sylius/Bundle/CoreBundle/DependencyInjection/SyliusCoreExtension.php
+++ b/src/Sylius/Bundle/CoreBundle/DependencyInjection/SyliusCoreExtension.php
@@ -62,7 +62,7 @@ public function load(array $configs, ContainerBuilder $container): void
if ($config['process_shipments_before_recalculating_prices']) {
$this->switchOrderProcessorsPriorities(
$container->getDefinition('sylius.order_processing.order_shipment_processor'),
- $container->getDefinition('sylius.order_processing.order_prices_recalculator')
+ $container->getDefinition('sylius.order_processing.order_prices_recalculator'),
);
}
}
@@ -146,7 +146,7 @@ private function prependJmsSerializerIfAdminApiBundleIsNotPresent(ContainerBuild
private function switchOrderProcessorsPriorities(
Definition $firstServiceDefinition,
- Definition $secondServiceDefinition
+ Definition $secondServiceDefinition,
) {
$firstServicePriority = $firstServiceDefinition->getTag('sylius.order_processor')[0]['priority'];
$secondServicePriority = $secondServiceDefinition->getTag('sylius.order_processor')[0]['priority'];
@@ -156,11 +156,11 @@ private function switchOrderProcessorsPriorities(
$firstServiceDefinition->addTag(
'sylius.order_processor',
- ['priority' => $secondServicePriority]
+ ['priority' => $secondServicePriority],
);
$secondServiceDefinition->addTag(
'sylius.order_processor',
- ['priority' => $firstServicePriority]
+ ['priority' => $firstServicePriority],
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Doctrine/DQL/DateFormat.php b/src/Sylius/Bundle/CoreBundle/Doctrine/DQL/DateFormat.php
index d2bc0b182e7..7000481ae2b 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 8afe3303c96..087e37b332b 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/Handler/ResourceDeleteHandler.php b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceDeleteHandler.php
index fdf3777a704..a155055b046 100644
--- a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceDeleteHandler.php
+++ b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceDeleteHandler.php
@@ -51,7 +51,7 @@ public function handle(ResourceInterface $resource, RepositoryInterface $reposit
'something_went_wrong_error',
500,
0,
- $exception
+ $exception,
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceUpdateHandler.php b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceUpdateHandler.php
index de5e1ca3c7e..176b14e79cd 100644
--- a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceUpdateHandler.php
+++ b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceUpdateHandler.php
@@ -35,7 +35,7 @@ public function __construct(ResourceUpdateHandlerInterface $decoratedHandler)
public function handle(
ResourceInterface $resource,
RequestConfiguration $requestConfiguration,
- ObjectManager $manager
+ ObjectManager $manager,
): void {
try {
$this->decoratedHandler->handle($resource, $requestConfiguration, $manager);
diff --git a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Inventory/Operator/OrderInventoryOperator.php b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Inventory/Operator/OrderInventoryOperator.php
index 495511bd5d4..08e005e6663 100644
--- a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Inventory/Operator/OrderInventoryOperator.php
+++ b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Inventory/Operator/OrderInventoryOperator.php
@@ -28,7 +28,7 @@ final class OrderInventoryOperator implements OrderInventoryOperatorInterface
public function __construct(
OrderInventoryOperatorInterface $decoratedOperator,
- EntityManagerInterface $productVariantManager
+ EntityManagerInterface $productVariantManager,
) {
$this->decoratedOperator = $decoratedOperator;
$this->productVariantManager = $productVariantManager;
diff --git a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/OrderRepository.php b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/OrderRepository.php
index 41a13e22c03..ee54882df88 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;
@@ -106,7 +106,7 @@ public function findOneForPayment($id): ?OrderInterface
public function countByCustomerAndCoupon(
CustomerInterface $customer,
PromotionCouponInterface $coupon,
- bool $includeCancelled = false
+ bool $includeCancelled = false,
): int {
$states = [OrderInterface::STATE_CART];
if ($coupon->isReusableFromCancelledOrders()) {
@@ -183,7 +183,7 @@ public function findLatestCartByChannelAndCustomer(ChannelInterface $channel, Cu
public function findLatestNotEmptyCartByChannelAndCustomer(
ChannelInterface $channel,
- CustomerInterface $customer
+ CustomerInterface $customer,
): ?OrderInterface {
return $this->createQueryBuilder('o')
->andWhere('o.state = :state')
@@ -231,7 +231,7 @@ public function getTotalPaidSalesForChannel(ChannelInterface $channel): int
public function getTotalPaidSalesForChannelInPeriod(
ChannelInterface $channel,
\DateTimeInterface $startDate,
- \DateTimeInterface $endDate
+ \DateTimeInterface $endDate,
): int {
return (int) $this->createQueryBuilder('o')
->select('SUM(o.total)')
@@ -277,7 +277,7 @@ public function countPaidByChannel(ChannelInterface $channel): int
public function countPaidForChannelInPeriod(
ChannelInterface $channel,
\DateTimeInterface $startDate,
- \DateTimeInterface $endDate
+ \DateTimeInterface $endDate,
): int {
return (int) $this->createQueryBuilder('o')
->select('COUNT(o.id)')
diff --git a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/ProductOptionRepository.php b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/ProductOptionRepository.php
index 9bdf626fca6..fec3c3312b4 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/ProductRepository.php b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/ProductRepository.php
index 23c38bb8b05..5700173b57f 100644
--- a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/ProductRepository.php
+++ b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/ProductRepository.php
@@ -58,14 +58,15 @@ public function createShopListQueryBuilder(
TaxonInterface $taxon,
string $locale,
array $sorting = [],
- bool $includeAllDescendants = false
+ bool $includeAllDescendants = false,
): QueryBuilder {
$queryBuilder = $this->createQueryBuilder('o')
->distinct()
->addSelect('translation')
->addSelect('productTaxon')
->innerJoin('o.translations', 'translation', 'WITH', 'translation.locale = :locale')
- ->innerJoin('o.productTaxons', 'productTaxon');
+ ->innerJoin('o.productTaxons', 'productTaxon')
+ ;
if ($includeAllDescendants) {
$queryBuilder
@@ -111,8 +112,8 @@ public function createShopListQueryBuilder(
->andWhere(
$queryBuilder->expr()->in(
'variant.position',
- str_replace(':product_id', 'o.id', $subQuery->getDQL())
- )
+ str_replace(':product_id', 'o.id', $subQuery->getDQL()),
+ ),
)
->setParameter('channelCode', $channel->getCode())
->setParameter('enabled', true)
diff --git a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/PromotionRepository.php b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/PromotionRepository.php
index 2ab1d483a34..f3cf8088148 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/EventListener/ChannelDeletionListener.php b/src/Sylius/Bundle/CoreBundle/EventListener/ChannelDeletionListener.php
index 6ddf01a2998..812aa2191cc 100644
--- a/src/Sylius/Bundle/CoreBundle/EventListener/ChannelDeletionListener.php
+++ b/src/Sylius/Bundle/CoreBundle/EventListener/ChannelDeletionListener.php
@@ -37,7 +37,7 @@ public function onChannelPreDelete(ResourceControllerEvent $event): void
if (!$channel instanceof ChannelInterface) {
throw new UnexpectedTypeException(
$channel,
- ChannelInterface::class
+ ChannelInterface::class,
);
}
diff --git a/src/Sylius/Bundle/CoreBundle/EventListener/MailerListener.php b/src/Sylius/Bundle/CoreBundle/EventListener/MailerListener.php
index f88a4ce6498..70c28a44917 100644
--- a/src/Sylius/Bundle/CoreBundle/EventListener/MailerListener.php
+++ b/src/Sylius/Bundle/CoreBundle/EventListener/MailerListener.php
@@ -35,7 +35,7 @@ final class MailerListener
public function __construct(
SenderInterface $emailSender,
ChannelContextInterface $channelContext,
- LocaleContextInterface $localeContext
+ LocaleContextInterface $localeContext,
) {
$this->emailSender = $emailSender;
$this->channelContext = $channelContext;
@@ -87,7 +87,7 @@ private function sendEmail(UserInterface $user, string $emailCode): void
'user' => $user,
'channel' => $this->channelContext->getChannel(),
'localeCode' => $this->localeContext->getLocaleCode(),
- ]
+ ],
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/EventListener/TaxonDeletionListener.php b/src/Sylius/Bundle/CoreBundle/EventListener/TaxonDeletionListener.php
index 30926f1617d..b63862c32b7 100644
--- a/src/Sylius/Bundle/CoreBundle/EventListener/TaxonDeletionListener.php
+++ b/src/Sylius/Bundle/CoreBundle/EventListener/TaxonDeletionListener.php
@@ -33,7 +33,7 @@ final class TaxonDeletionListener
public function __construct(
SessionInterface $session,
ChannelRepositoryInterface $channelRepository,
- TaxonAwareRuleUpdaterInterface ...$ruleUpdaters
+ TaxonAwareRuleUpdaterInterface ...$ruleUpdaters,
) {
$this->session = $session;
$this->channelRepository = $channelRepository;
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/BookProductFixture.php b/src/Sylius/Bundle/CoreBundle/Fixture/BookProductFixture.php
index f284bb63df5..3379f650abd 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;
@@ -42,7 +42,7 @@ public function __construct(
AbstractResourceFixture $taxonFixture,
AbstractResourceFixture $productAttributeFixture,
AbstractResourceFixture $productFixture,
- string $baseLocaleCode
+ string $baseLocaleCode,
) {
$this->taxonFixture = $taxonFixture;
$this->productAttributeFixture = $productAttributeFixture;
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AddressExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AddressExampleFactory.php
index 6077004f97a..60603c0ff2c 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;
@@ -42,7 +42,7 @@ class AddressExampleFactory extends AbstractExampleFactory
public function __construct(
FactoryInterface $addressFactory,
RepositoryInterface $countryRepository,
- RepositoryInterface $customerRepository
+ RepositoryInterface $customerRepository,
) {
$this->addressFactory = $addressFactory;
$this->countryRepository = $countryRepository;
@@ -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 068c7cda053..96778229a40 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;
@@ -45,7 +45,7 @@ public function __construct(
string $localeCode,
?FileLocatorInterface $fileLocator = null,
?ImageUploaderInterface $imageUploader = null,
- ?FactoryInterface $avatarImageFactory = null
+ ?FactoryInterface $avatarImageFactory = null,
) {
$this->userFactory = $userFactory;
$this->localeCode = $localeCode;
@@ -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 ebb23eec731..c0009ce9c36 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;
@@ -56,7 +56,7 @@ public function __construct(
RepositoryInterface $currencyRepository,
RepositoryInterface $zoneRepository,
?TaxonRepositoryInterface $taxonRepository = null,
- ?FactoryInterface $shopBillingDataFactory = null
+ ?FactoryInterface $shopBillingDataFactory = null,
) {
if (null === $taxonRepository) {
@trigger_error('Passing RouterInterface as the fifth argument is deprecated since 1.8 and will be prohibited in 2.0', \E_USER_DEPRECATED);
@@ -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')
@@ -149,22 +149,22 @@ protected function configureOptions(OptionsResolver $resolver): void
->setAllowedTypes('account_verification_required', 'bool')
->setDefault(
'default_tax_zone',
- LazyOption::randomOneOrNull($this->zoneRepository, 100, ['scope' => [Scope::TAX, AddressingScope::ALL]])
+ LazyOption::randomOneOrNull($this->zoneRepository, 100, ['scope' => [Scope::TAX, AddressingScope::ALL]]),
)
->setAllowedTypes('default_tax_zone', ['null', 'string', ZoneInterface::class])
->setNormalizer(
'default_tax_zone',
- LazyOption::findOneBy($this->zoneRepository, 'code', ['scope' => [Scope::TAX, AddressingScope::ALL]])
+ LazyOption::findOneBy($this->zoneRepository, 'code', ['scope' => [Scope::TAX, AddressingScope::ALL]]),
)
->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 6f43f3b2b48..ef94b7368ab 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 69a22036f20..39e837f8f15 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;
@@ -105,7 +105,7 @@ public function __construct(
FactoryInterface $addressFactory,
StateMachineFactoryInterface $stateMachineFactory,
OrderShippingMethodSelectionRequirementCheckerInterface $orderShippingMethodSelectionRequirementChecker,
- OrderPaymentMethodSelectionRequirementCheckerInterface $orderPaymentMethodSelectionRequirementChecker
+ OrderPaymentMethodSelectionRequirementCheckerInterface $orderPaymentMethodSelectionRequirementChecker,
) {
$this->orderFactory = $orderFactory;
$this->orderItemFactory = $orderItemFactory;
@@ -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)
@@ -197,7 +197,7 @@ protected function generateItems(OrderInterface $order): void
if (0 === count($products)) {
throw new \InvalidArgumentException(sprintf(
'You have no enabled products at the channel "%s", but they are required to create an orders for that channel',
- $channel->getCode()
+ $channel->getCode(),
));
}
@@ -256,7 +256,7 @@ protected function selectShipping(OrderInterface $order, \DateTimeInterface $cre
if (count($shippingMethods) === 0) {
throw new \InvalidArgumentException(sprintf(
'You have no shipping method available for the channel with code "%s", but they are required to proceed an order',
- $channel->getCode()
+ $channel->getCode(),
));
}
@@ -319,7 +319,7 @@ protected function generateInvalidSkipMessage(string $type, string $channelCode)
$type,
$channelCode,
$type,
- $type
+ $type,
);
}
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PaymentMethodExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PaymentMethodExampleFactory.php
index 0640d779323..6c4851fb39a 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;
@@ -42,7 +42,7 @@ class PaymentMethodExampleFactory extends AbstractExampleFactory implements Exam
public function __construct(
PaymentMethodFactoryInterface $paymentMethodFactory,
RepositoryInterface $localeRepository,
- ChannelRepositoryInterface $channelRepository
+ ChannelRepositoryInterface $channelRepository,
) {
$this->paymentMethodFactory = $paymentMethodFactory;
$this->localeRepository = $localeRepository;
@@ -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/ProductAssociationExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationExampleFactory.php
index 06b39cba345..fb179c918fc 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationExampleFactory.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationExampleFactory.php
@@ -35,7 +35,7 @@ class ProductAssociationExampleFactory extends AbstractExampleFactory implements
public function __construct(
FactoryInterface $productAssociationFactory,
ProductAssociationTypeRepositoryInterface $productAssociationTypeRepository,
- ProductRepositoryInterface $productRepository
+ ProductRepositoryInterface $productRepository,
) {
$this->productAssociationFactory = $productAssociationFactory;
$this->productAssociationTypeRepository = $productAssociationTypeRepository;
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationTypeExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationTypeExampleFactory.php
index fe7abb5868a..181e2ccd07e 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;
@@ -35,7 +35,7 @@ class ProductAssociationTypeExampleFactory extends AbstractExampleFactory implem
public function __construct(
FactoryInterface $productAssociationTypeFactory,
- RepositoryInterface $localeRepository
+ RepositoryInterface $localeRepository,
) {
$this->productAssociationTypeFactory = $productAssociationTypeFactory;
$this->localeRepository = $localeRepository;
@@ -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 8073ce3dca8..1e011861ae6 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;
@@ -38,7 +38,7 @@ class ProductAttributeExampleFactory extends AbstractExampleFactory implements E
public function __construct(
AttributeFactoryInterface $productAttributeFactory,
RepositoryInterface $localeRepository,
- array $attributeTypes
+ array $attributeTypes,
) {
$this->productAttributeFactory = $productAttributeFactory;
$this->localeRepository = $localeRepository;
@@ -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 2cfadf799db..4d7cded075c 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;
@@ -94,7 +94,7 @@ public function __construct(
RepositoryInterface $channelRepository,
RepositoryInterface $localeRepository,
?RepositoryInterface $taxCategoryRepository = null,
- ?FileLocatorInterface $fileLocator = null
+ ?FileLocatorInterface $fileLocator = null,
) {
$this->productFactory = $productFactory;
$this->productVariantFactory = $productVariantFactory;
@@ -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')
@@ -287,7 +287,7 @@ private function createImages(ProductInterface $product, array $options): void
@trigger_error(
'It is deprecated since Sylius 1.3 to pass indexed array as an image definition. ' .
'Please use associative array with "path" and "type" keys instead.',
- \E_USER_DEPRECATED
+ \E_USER_DEPRECATED,
);
$imagePath = array_shift($image);
@@ -393,7 +393,7 @@ private function getRandomValueForProductAttribute(ProductAttributeInterface $pr
if ($productAttribute->getConfiguration()['multiple']) {
return $this->faker->randomElements(
array_keys($productAttribute->getConfiguration()['choices']),
- $this->faker->numberBetween(1, count($productAttribute->getConfiguration()['choices']))
+ $this->faker->numberBetween(1, count($productAttribute->getConfiguration()['choices'])),
);
}
@@ -409,8 +409,8 @@ 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 b7b991acf23..65830802a87 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;
@@ -39,7 +39,7 @@ class ProductOptionExampleFactory extends AbstractExampleFactory implements Exam
public function __construct(
FactoryInterface $productOptionFactory,
FactoryInterface $productOptionValueFactory,
- RepositoryInterface $localeRepository
+ RepositoryInterface $localeRepository,
) {
$this->productOptionFactory = $productOptionFactory;
$this->productOptionValueFactory = $productOptionValueFactory;
@@ -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 03539aedf67..80ceb5a76d3 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;
@@ -43,7 +43,7 @@ public function __construct(
ReviewFactoryInterface $productReviewFactory,
ProductRepositoryInterface $productRepository,
CustomerRepositoryInterface $customerRepository,
- FactoryInterface $stateMachineFactory
+ FactoryInterface $stateMachineFactory,
) {
$this->productReviewFactory = $productReviewFactory;
$this->productRepository = $productRepository;
@@ -63,7 +63,7 @@ public function create(array $options = []): ReviewInterface
/** @var ReviewInterface $productReview */
$productReview = $this->productReviewFactory->createForSubjectWithReviewer(
$options['product'],
- $options['author']
+ $options['author'],
);
$productReview->setTitle($options['title']);
$productReview->setComment($options['comment']);
@@ -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 cf05846287f..e7ea434ac61 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 a29643db902..95bbb96e1db 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;
@@ -48,7 +48,7 @@ public function __construct(
ExampleFactoryInterface $promotionRuleExampleFactory,
ExampleFactoryInterface $promotionActionExampleFactory,
ChannelRepositoryInterface $channelRepository,
- ?FactoryInterface $couponFactory = null
+ ?FactoryInterface $couponFactory = null,
) {
$this->promotionFactory = $promotionFactory;
$this->promotionRuleExampleFactory = $promotionRuleExampleFactory;
@@ -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 b53e7d87bcc..e0280f734e7 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 4265e6a6c2c..b799d370bcb 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 9875590cd5c..ba8fa96c1fc 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;
@@ -54,7 +54,7 @@ public function __construct(
RepositoryInterface $shippingCategoryRepository,
RepositoryInterface $localeRepository,
ChannelRepositoryInterface $channelRepository,
- ?RepositoryInterface $taxCategoryRepository = null
+ ?RepositoryInterface $taxCategoryRepository = null,
) {
$this->shippingMethodFactory = $shippingMethodFactory;
$this->zoneRepository = $zoneRepository;
@@ -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 331e58a599f..ae549aa950c 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;
@@ -40,7 +40,7 @@ class ShopUserExampleFactory extends AbstractExampleFactory implements ExampleFa
public function __construct(
FactoryInterface $shopUserFactory,
FactoryInterface $customerFactory,
- RepositoryInterface $customerGroupRepository
+ RepositoryInterface $customerGroupRepository,
) {
$this->shopUserFactory = $shopUserFactory;
$this->customerFactory = $customerFactory;
@@ -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')
@@ -91,10 +91,10 @@ protected function configureOptions(OptionsResolver $resolver): void
->setDefault('gender', CustomerComponent::UNKNOWN_GENDER)
->setAllowedValues(
'gender',
- [CustomerComponent::UNKNOWN_GENDER, CustomerComponent::MALE_GENDER, CustomerComponent::FEMALE_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',
@@ -105,7 +105,7 @@ function (Options $options, $value) {
}
return $value;
- }
+ },
)
;
}
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxCategoryExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxCategoryExampleFactory.php
index 866a54ad074..0426dbe448d 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 7715f36c8f8..9ceb394b762 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;
@@ -40,7 +40,7 @@ class TaxRateExampleFactory extends AbstractExampleFactory implements ExampleFac
public function __construct(
FactoryInterface $taxRateFactory,
RepositoryInterface $zoneRepository,
- RepositoryInterface $taxCategoryRepository
+ RepositoryInterface $taxCategoryRepository,
) {
$this->taxRateFactory = $taxRateFactory;
$this->zoneRepository = $zoneRepository;
@@ -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 ec3d7970c80..506ceb3e2d8 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;
@@ -43,7 +43,7 @@ public function __construct(
FactoryInterface $taxonFactory,
TaxonRepositoryInterface $taxonRepository,
RepositoryInterface $localeRepository,
- TaxonSlugGeneratorInterface $taxonSlugGenerator
+ TaxonSlugGeneratorInterface $taxonSlugGenerator,
) {
$this->taxonFactory = $taxonFactory;
$this->taxonRepository = $taxonRepository;
@@ -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/GeographicalFixture.php b/src/Sylius/Bundle/CoreBundle/Fixture/GeographicalFixture.php
index 5fd6746bb7d..623c0b28bf8 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/GeographicalFixture.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/GeographicalFixture.php
@@ -44,7 +44,7 @@ public function __construct(
FactoryInterface $provinceFactory,
ObjectManager $provinceManager,
ZoneFactoryInterface $zoneFactory,
- ObjectManager $zoneManager
+ ObjectManager $zoneManager,
) {
$this->countryFactory = $countryFactory;
$this->countryManager = $countryManager;
@@ -174,7 +174,7 @@ private function loadZones(array $zones, \Closure $zoneValidator): void
throw new \InvalidArgumentException(sprintf(
'An exception was thrown during loading zone "%s" with code "%s"!',
$zoneName,
- $zoneCode
+ $zoneCode,
), 0, $exception);
}
}
@@ -241,7 +241,7 @@ private function provideZoneValidator(array $options): \Closure
throw new \InvalidArgumentException(sprintf(
'Could not find country "%s", defined ones are: %s!',
$countryCode,
- implode(', ', $options['countries'])
+ implode(', ', $options['countries']),
));
},
ZoneInterface::TYPE_PROVINCE => function (string $provinceCode) use ($options): void {
@@ -257,7 +257,7 @@ private function provideZoneValidator(array $options): \Closure
throw new \InvalidArgumentException(sprintf(
'Could not find province "%s", defined ones are: %s!',
$provinceCode,
- implode(', ', $options['provinces'])
+ implode(', ', $options['provinces']),
));
},
ZoneInterface::TYPE_ZONE => function (string $zoneCode) use ($options): void {
@@ -268,7 +268,7 @@ private function provideZoneValidator(array $options): \Closure
throw new \InvalidArgumentException(sprintf(
'Could not find zone "%s", defined ones are: %s!',
$zoneCode,
- implode(', ', array_keys($options['zones']))
+ implode(', ', array_keys($options['zones'])),
));
},
];
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/MugProductFixture.php b/src/Sylius/Bundle/CoreBundle/Fixture/MugProductFixture.php
index 0f55386737e..6d4552bfd6d 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;
@@ -43,7 +44,7 @@ public function __construct(
AbstractResourceFixture $productAttributeFixture,
AbstractResourceFixture $productOptionFixture,
AbstractResourceFixture $productFixture,
- string $baseLocaleCode
+ string $baseLocaleCode,
) {
$this->taxonFixture = $taxonFixture;
$this->productAttributeFixture = $productAttributeFixture;
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/OptionsResolver/LazyOption.php b/src/Sylius/Bundle/CoreBundle/Fixture/OptionsResolver/LazyOption.php
index dbc70c06d36..aadfb53987d 100644
--- a/src/Sylius/Bundle/CoreBundle/Fixture/OptionsResolver/LazyOption.php
+++ b/src/Sylius/Bundle/CoreBundle/Fixture/OptionsResolver/LazyOption.php
@@ -54,7 +54,7 @@ public static function randomOne(RepositoryInterface $repository, array $criteri
public static function randomOneOrNull(
RepositoryInterface $repository,
int $chanceOfRandomOne = 100,
- array $criteria = []
+ array $criteria = [],
): \Closure {
return function (Options $options) use ($repository, $chanceOfRandomOne, $criteria): ?object {
if (random_int(1, 100) > $chanceOfRandomOne) {
@@ -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
@@ -157,8 +157,8 @@ function (Options $options, $previousValue) use ($repository, $field, $criteria)
'The %s resource for field %s with value %s was not found',
$repository->getClassName(),
$field,
- $previousValue
- )
+ $previousValue,
+ ),
);
}
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/OrderFixture.php b/src/Sylius/Bundle/CoreBundle/Fixture/OrderFixture.php
index 8a09133557b..64ded9c3b7f 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;
@@ -53,7 +53,7 @@ public function __construct(
StateMachineFactoryInterface $stateMachineFactory,
OrderShippingMethodSelectionRequirementCheckerInterface $orderShippingMethodSelectionRequirementChecker,
OrderPaymentMethodSelectionRequirementCheckerInterface $orderPaymentMethodSelectionRequirementChecker,
- OrderExampleFactory $orderExampleFactory = null
+ OrderExampleFactory $orderExampleFactory = null,
) {
if ($orderExampleFactory === null) {
$orderExampleFactory = new OrderExampleFactory(
@@ -70,7 +70,7 @@ public function __construct(
$addressFactory,
$stateMachineFactory,
$orderShippingMethodSelectionRequirementChecker,
- $orderPaymentMethodSelectionRequirementChecker
+ $orderPaymentMethodSelectionRequirementChecker,
);
@trigger_error('Use orderExampleFactory. OrderFixture is deprecated since 1.6 and will be prohibited since 2.0.', \E_USER_DEPRECATED);
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/SimilarProductAssociationFixture.php b/src/Sylius/Bundle/CoreBundle/Fixture/SimilarProductAssociationFixture.php
index 597dae022b7..5a61503b7df 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;
@@ -36,7 +36,7 @@ class SimilarProductAssociationFixture extends AbstractFixture
public function __construct(
AbstractResourceFixture $productAssociationTypeFixture,
AbstractResourceFixture $productAssociationFixture,
- ProductRepositoryInterface $productRepository
+ ProductRepositoryInterface $productRepository,
) {
$this->productAssociationTypeFixture = $productAssociationTypeFixture;
$this->productAssociationFixture = $productAssociationFixture;
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/StickerProductFixture.php b/src/Sylius/Bundle/CoreBundle/Fixture/StickerProductFixture.php
index 295ed20e4df..8b14cda9f60 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;
@@ -41,7 +41,7 @@ public function __construct(
AbstractResourceFixture $taxonFixture,
AbstractResourceFixture $productAttributeFixture,
AbstractResourceFixture $productOptionFixture,
- AbstractResourceFixture $productFixture
+ AbstractResourceFixture $productFixture,
) {
$this->taxonFixture = $taxonFixture;
$this->productAttributeFixture = $productAttributeFixture;
diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/TshirtProductFixture.php b/src/Sylius/Bundle/CoreBundle/Fixture/TshirtProductFixture.php
index 2127caf9ad5..d196cdfb0ab 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;
@@ -40,7 +41,7 @@ public function __construct(
AbstractResourceFixture $taxonFixture,
AbstractResourceFixture $productAttributeFixture,
AbstractResourceFixture $productOptionFixture,
- AbstractResourceFixture $productFixture
+ AbstractResourceFixture $productFixture,
) {
$this->taxonFixture = $taxonFixture;
$this->productAttributeFixture = $productAttributeFixture;
diff --git a/src/Sylius/Bundle/CoreBundle/Form/DataTransformer/ProductTaxonToTaxonTransformer.php b/src/Sylius/Bundle/CoreBundle/Form/DataTransformer/ProductTaxonToTaxonTransformer.php
index 0b14ef271c4..4d52816b5fd 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/DataTransformer/ProductTaxonToTaxonTransformer.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/DataTransformer/ProductTaxonToTaxonTransformer.php
@@ -32,7 +32,7 @@ final class ProductTaxonToTaxonTransformer implements DataTransformerInterface
public function __construct(
FactoryInterface $productTaxonFactory,
RepositoryInterface $productTaxonRepository,
- ProductInterface $product
+ ProductInterface $product,
) {
$this->productTaxonFactory = $productTaxonFactory;
$this->productTaxonRepository = $productTaxonRepository;
@@ -81,8 +81,8 @@ private function assertTransformationValueType($value, string $expectedType): vo
sprintf(
'Expected "%s", but got "%s"',
$expectedType,
- is_object($value) ? get_class($value) : gettype($value)
- )
+ is_object($value) ? get_class($value) : gettype($value),
+ ),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Form/DataTransformer/TaxonsToCodesTransformer.php b/src/Sylius/Bundle/CoreBundle/Form/DataTransformer/TaxonsToCodesTransformer.php
index 4623ace303d..a3cf4a4a8fc 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/EventSubscriber/ChannelFormSubscriber.php b/src/Sylius/Bundle/CoreBundle/Form/EventSubscriber/ChannelFormSubscriber.php
index 265e8b2b8d4..a0e9ceca1ed 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/EventSubscriber/ChannelFormSubscriber.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/EventSubscriber/ChannelFormSubscriber.php
@@ -36,13 +36,13 @@ public function preSubmit(FormEvent $event): void
$data['locales'] = $this->resolveLocales(
$data['locales'] ?? [],
- $data['defaultLocale']
+ $data['defaultLocale'],
)
;
$data['currencies'] = $this->resolveCurrencies(
$data['currencies'] ?? [],
- $data['baseCurrency']
+ $data['baseCurrency'],
)
;
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Extension/AddressTypeExtension.php b/src/Sylius/Bundle/CoreBundle/Form/Extension/AddressTypeExtension.php
index b62986e806e..23958d4fcf5 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Extension/AddressTypeExtension.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Extension/AddressTypeExtension.php
@@ -43,7 +43,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
$countryCodeField = $builder->create(
$oldCountryCodeField->getName(),
get_class($oldCountryCodeField->getType()->getInnerType()),
- array_replace($oldCountryCodeField->getOptions(), ['choices' => $channel->getCountries()->toArray()])
+ array_replace($oldCountryCodeField->getOptions(), ['choices' => $channel->getCountries()->toArray()]),
);
$builder->add($countryCodeField);
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Extension/CartTypeExtension.php b/src/Sylius/Bundle/CoreBundle/Form/Extension/CartTypeExtension.php
index 3742c25fe24..2a1d1189a7e 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 2123e443746..f252be58ae4 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 4a2d10070eb..1eb9d6386f3 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 630f376068f..f270b8e4d9d 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 e8eaab22255..18a98c4c8b5 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 7dcb0eec109..aaf8379aa16 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Type/Checkout/AddressType.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Checkout/AddressType.php
@@ -43,7 +43,7 @@ public function __construct(string $dataClass, array $validationGroups = [], ?Ad
'Not passing an $addressComparator to "%s" constructor is deprecated since Sylius 1.8 and will be impossible in Sylius 2.0.',
__CLASS__,
),
- \E_USER_DEPRECATED
+ \E_USER_DEPRECATED,
);
}
@@ -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/Checkout/ShipmentType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Checkout/ShipmentType.php
index b6ed9f62896..c542e7c86e4 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Type/Checkout/ShipmentType.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Checkout/ShipmentType.php
@@ -42,7 +42,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'subject' => $shipment,
'expanded' => true,
]);
- });
+ })
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerCheckoutGuestType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerCheckoutGuestType.php
index acd9fba7863..3dd73d9f2c7 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerCheckoutGuestType.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerCheckoutGuestType.php
@@ -32,7 +32,7 @@ public function __construct(
string $dataClass,
array $validationGroups,
RepositoryInterface $customerRepository,
- FactoryInterface $customerFactory
+ FactoryInterface $customerFactory,
) {
parent::__construct($dataClass, $validationGroups);
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerGuestType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerGuestType.php
index 881201f65fc..acacb706f47 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerGuestType.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerGuestType.php
@@ -32,7 +32,7 @@ public function __construct(
string $dataClass,
array $validationGroups,
RepositoryInterface $customerRepository,
- FactoryInterface $customerFactory
+ FactoryInterface $customerFactory,
) {
parent::__construct($dataClass, $validationGroups);
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Product/ChannelPricingType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Product/ChannelPricingType.php
index e118ca49dfb..ab59837b61f 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Type/Product/ChannelPricingType.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Product/ChannelPricingType.php
@@ -32,7 +32,7 @@ final class ChannelPricingType extends AbstractResourceType
public function __construct(
string $dataClass,
array $validationGroups,
- ?RepositoryInterface $channelPricingRepository = null
+ ?RepositoryInterface $channelPricingRepository = null,
) {
parent::__construct($dataClass, $validationGroups);
@@ -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 c65a5fb5328..9bdd3da120a 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 e75a29e4744..d3e0d61cf5c 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 8805e1bb1d2..f522020e707 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 933e63b0686..4e1a70f7531 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 56b44ab47e7..7451a2a92b9 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/Promotion/Rule/ContainsProductConfigurationType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/ContainsProductConfigurationType.php
index acbec18b625..932c15834f2 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/ContainsProductConfigurationType.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/ContainsProductConfigurationType.php
@@ -44,7 +44,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
;
$builder->get('product_code')->addModelTransformer(
- new ReversedTransformer(new ResourceToIdentifierTransformer($this->productRepository, 'code'))
+ new ReversedTransformer(new ResourceToIdentifierTransformer($this->productRepository, 'code')),
);
}
diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/TotalOfItemsFromTaxonConfigurationType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/TotalOfItemsFromTaxonConfigurationType.php
index 23cc855ba96..3afec161e97 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/TotalOfItemsFromTaxonConfigurationType.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/TotalOfItemsFromTaxonConfigurationType.php
@@ -44,7 +44,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
;
$builder->get('taxon')->addModelTransformer(
- new ReversedTransformer(new ResourceToIdentifierTransformer($this->taxonRepository, 'code'))
+ new ReversedTransformer(new ResourceToIdentifierTransformer($this->taxonRepository, 'code')),
);
}
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 b26df4db292..7b4610000c6 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 6f904793e78..c659991007d 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 99853ce87f8..2f074c796a1 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 fc622b8ed4f..f27a13ffbe3 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/Form/Type/Taxon/ProductTaxonAutocompleteChoiceType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Taxon/ProductTaxonAutocompleteChoiceType.php
index 4b37c9368ce..cb82af177f4 100644
--- a/src/Sylius/Bundle/CoreBundle/Form/Type/Taxon/ProductTaxonAutocompleteChoiceType.php
+++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Taxon/ProductTaxonAutocompleteChoiceType.php
@@ -43,9 +43,9 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
new ProductTaxonToTaxonTransformer(
$this->productTaxonFactory,
$this->productTaxonRepository,
- $options['product']
- )
- )
+ $options['product'],
+ ),
+ ),
);
}
@@ -54,8 +54,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
new ProductTaxonToTaxonTransformer(
$this->productTaxonFactory,
$this->productTaxonRepository,
- $options['product']
- )
+ $options['product'],
+ ),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Installer/Checker/CommandDirectoryChecker.php b/src/Sylius/Bundle/CoreBundle/Installer/Checker/CommandDirectoryChecker.php
index 3b5511d2816..c35a64bdada 100644
--- a/src/Sylius/Bundle/CoreBundle/Installer/Checker/CommandDirectoryChecker.php
+++ b/src/Sylius/Bundle/CoreBundle/Installer/Checker/CommandDirectoryChecker.php
@@ -46,7 +46,7 @@ public function ensureDirectoryExists($directory, OutputInterface $output): void
throw new \RuntimeException(sprintf(
'Create directory "%s" and run command "%s"',
realpath($directory),
- $this->name
+ $this->name,
));
}
}
@@ -69,7 +69,7 @@ public function ensureDirectoryIsWritable($directory, OutputInterface $output):
throw new \RuntimeException(sprintf(
'Set "%s" writable and run command "%s"',
realpath(dirname($directory)),
- $this->name
+ $this->name,
));
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Installer/Checker/SyliusRequirementsChecker.php b/src/Sylius/Bundle/CoreBundle/Installer/Checker/SyliusRequirementsChecker.php
index 287d8901f4d..a181a7e9f97 100644
--- a/src/Sylius/Bundle/CoreBundle/Installer/Checker/SyliusRequirementsChecker.php
+++ b/src/Sylius/Bundle/CoreBundle/Installer/Checker/SyliusRequirementsChecker.php
@@ -53,7 +53,7 @@ private function checkRequirementsInCollection(
RequirementCollection $collection,
TableRenderer $notFulfilledTable,
TableRenderer $helpTable,
- $verbose
+ $verbose,
): void {
/** @var Requirement $requirement */
foreach ($collection as $requirement) {
diff --git a/src/Sylius/Bundle/CoreBundle/Installer/Executor/CommandExecutor.php b/src/Sylius/Bundle/CoreBundle/Installer/Executor/CommandExecutor.php
index 44f1c5e712e..d19cc5a5057 100644
--- a/src/Sylius/Bundle/CoreBundle/Installer/Executor/CommandExecutor.php
+++ b/src/Sylius/Bundle/CoreBundle/Installer/Executor/CommandExecutor.php
@@ -43,7 +43,7 @@ public function runCommand(string $command, array $parameters = [], ?OutputInter
$parameters = array_merge(
['command' => $command],
$this->getDefaultParameters(),
- $parameters
+ $parameters,
);
$this->application->setAutoExit(false);
diff --git a/src/Sylius/Bundle/CoreBundle/Installer/Requirement/ExtensionsRequirements.php b/src/Sylius/Bundle/CoreBundle/Installer/Requirement/ExtensionsRequirements.php
index 3e5d3730890..e26e9a79915 100644
--- a/src/Sylius/Bundle/CoreBundle/Installer/Requirement/ExtensionsRequirements.php
+++ b/src/Sylius/Bundle/CoreBundle/Installer/Requirement/ExtensionsRequirements.php
@@ -27,97 +27,97 @@ public function __construct(TranslatorInterface $translator)
$translator->trans('sylius.installer.extensions.json_encode', []),
function_exists('json_encode'),
true,
- $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'JSON'])
+ $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'JSON']),
))
->add(new Requirement(
$translator->trans('sylius.installer.extensions.session_start', []),
function_exists('session_start'),
true,
- $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'session'])
+ $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'session']),
))
->add(new Requirement(
$translator->trans('sylius.installer.extensions.ctype', []),
function_exists('ctype_alpha'),
true,
- $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'ctype'])
+ $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'ctype']),
))
->add(new Requirement(
$translator->trans('sylius.installer.extensions.token_get_all', []),
function_exists('token_get_all'),
true,
- $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'JSON'])
+ $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'JSON']),
))
->add(new Requirement(
$translator->trans('sylius.installer.extensions.simplexml_import_dom', []),
function_exists('simplexml_import_dom'),
true,
- $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'SimpleXML'])
+ $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'SimpleXML']),
))
->add(new Requirement(
$translator->trans('sylius.installer.extensions.apc', []),
!(function_exists('apc_store') && ini_get('apc.enabled')) || version_compare(phpversion('apc'), '3.0.17', '>='),
true,
- $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'APC (>=3.0.17)'])
+ $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'APC (>=3.0.17)']),
))
->add(new Requirement(
$translator->trans('sylius.installer.extensions.pcre', []),
defined('PCRE_VERSION') ? ((float) substr(\PCRE_VERSION, 0, (int) strpos(\PCRE_VERSION, ' '))) > 8.0 : false,
true,
- $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'PCRE (>=8.0)'])
+ $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'PCRE (>=8.0)']),
))
->add(new Requirement(
$translator->trans('sylius.installer.extensions.php_xml', []),
class_exists(\DOMDocument::class),
false,
- $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'PHP-XML'])
+ $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'PHP-XML']),
))
->add(new Requirement(
$translator->trans('sylius.installer.extensions.mbstring', []),
function_exists('mb_strlen'),
false,
- $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'mbstring'])
+ $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'mbstring']),
))
->add(new Requirement(
$translator->trans('sylius.installer.extensions.iconv', []),
function_exists('iconv'),
false,
- $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'iconv'])
+ $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'iconv']),
))
->add(new Requirement(
$translator->trans('sylius.installer.extensions.exif', []),
function_exists('exif_read_data'),
true,
- $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'exif'])
+ $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'exif']),
))
->add(new Requirement(
$translator->trans('sylius.installer.extensions.intl', []),
extension_loaded('intl'),
true,
- $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'intl'])
+ $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'intl']),
))
->add(new Requirement(
$translator->trans('sylius.installer.extensions.fileinfo', []),
extension_loaded('fileinfo'),
true,
- $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'fileinfo'])
+ $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'fileinfo']),
))
->add(new Requirement(
$translator->trans('sylius.installer.extensions.accelerator.header', []),
!empty(ini_get('opcache.enable')),
false,
- $translator->trans('sylius.installer.extensions.accelerator.help', [])
+ $translator->trans('sylius.installer.extensions.accelerator.help', []),
))
->add(new Requirement(
$translator->trans('sylius.installer.extensions.pdo', []),
class_exists('PDO'),
false,
- $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'PDO'])
+ $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'PDO']),
))
->add(new Requirement(
$translator->trans('sylius.installer.extensions.gd', []),
defined('GD_VERSION'),
true,
- $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'gd'])
+ $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'gd']),
))
;
@@ -139,7 +139,7 @@ class_exists('PDO'),
$translator->trans('sylius.installer.extensions.icu', []),
version_compare($version, '4.0', '>='),
false,
- $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'ICU (>=4.0)'])
+ $translator->trans('sylius.installer.extensions.help', ['%extension%' => 'ICU (>=4.0)']),
));
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Installer/Requirement/FilesystemRequirements.php b/src/Sylius/Bundle/CoreBundle/Installer/Requirement/FilesystemRequirements.php
index 0073c3f46c3..4e054dc52e9 100644
--- a/src/Sylius/Bundle/CoreBundle/Installer/Requirement/FilesystemRequirements.php
+++ b/src/Sylius/Bundle/CoreBundle/Installer/Requirement/FilesystemRequirements.php
@@ -28,7 +28,7 @@ public function __construct(TranslatorInterface $translator, string $cacheDir, s
@trigger_error(sprintf(
'Passing root directory to "%s" constructor as the second argument is deprecated since 1.2 ' .
'and this argument will be removed in 2.0.',
- self::class
+ self::class,
), \E_USER_DEPRECATED);
[$rootDir, $cacheDir, $logsDir] = [$cacheDir, $logsDir, $rootDir];
@@ -39,13 +39,13 @@ public function __construct(TranslatorInterface $translator, string $cacheDir, s
$translator->trans('sylius.installer.filesystem.cache.header', []),
is_writable($cacheDir),
true,
- $translator->trans('sylius.installer.filesystem.cache.help', ['%path%' => $cacheDir])
+ $translator->trans('sylius.installer.filesystem.cache.help', ['%path%' => $cacheDir]),
))
->add(new Requirement(
$translator->trans('sylius.installer.filesystem.logs.header', []),
is_writable($logsDir),
true,
- $translator->trans('sylius.installer.filesystem.logs.help', ['%path%' => $logsDir])
+ $translator->trans('sylius.installer.filesystem.logs.help', ['%path%' => $logsDir]),
))
;
}
diff --git a/src/Sylius/Bundle/CoreBundle/Installer/Requirement/SettingsRequirements.php b/src/Sylius/Bundle/CoreBundle/Installer/Requirement/SettingsRequirements.php
index d713e84d9f8..bb8b59fa024 100644
--- a/src/Sylius/Bundle/CoreBundle/Installer/Requirement/SettingsRequirements.php
+++ b/src/Sylius/Bundle/CoreBundle/Installer/Requirement/SettingsRequirements.php
@@ -28,7 +28,7 @@ public function __construct(TranslatorInterface $translator)
$translator->trans('sylius.installer.settings.timezone'),
$this->isOn('date.timezone'),
true,
- $translator->trans('sylius.installer.settings.timezone_help')
+ $translator->trans('sylius.installer.settings.timezone_help'),
))
->add(new Requirement(
$translator->trans('sylius.installer.settings.version_recommended'),
@@ -37,19 +37,19 @@ public function __construct(TranslatorInterface $translator)
$translator->trans('sylius.installer.settings.version_help', [
'%current%' => \PHP_VERSION,
'%recommended%' => self::RECOMMENDED_PHP_VERSION,
- ])
+ ]),
))
->add(new Requirement(
$translator->trans('sylius.installer.settings.detect_unicode'),
!$this->isOn('detect_unicode'),
false,
- $translator->trans('sylius.installer.settings.detect_unicode_help')
+ $translator->trans('sylius.installer.settings.detect_unicode_help'),
))
->add(new Requirement(
$translator->trans('sylius.installer.settings.session.auto_start'),
!$this->isOn('session.auto_start'),
false,
- $translator->trans('sylius.installer.settings.session.auto_start_help')
+ $translator->trans('sylius.installer.settings.session.auto_start_help'),
))
;
}
diff --git a/src/Sylius/Bundle/CoreBundle/Installer/Setup/ChannelSetup.php b/src/Sylius/Bundle/CoreBundle/Installer/Setup/ChannelSetup.php
index eb899360234..221374ecab6 100644
--- a/src/Sylius/Bundle/CoreBundle/Installer/Setup/ChannelSetup.php
+++ b/src/Sylius/Bundle/CoreBundle/Installer/Setup/ChannelSetup.php
@@ -31,7 +31,7 @@ final class ChannelSetup implements ChannelSetupInterface
public function __construct(
RepositoryInterface $channelRepository,
FactoryInterface $channelFactory,
- ObjectManager $channelManager
+ ObjectManager $channelManager,
) {
$this->channelRepository = $channelRepository;
$this->channelFactory = $channelFactory;
diff --git a/src/Sylius/Bundle/CoreBundle/Installer/Setup/CurrencySetup.php b/src/Sylius/Bundle/CoreBundle/Installer/Setup/CurrencySetup.php
index 768136ebf3a..299e41c658c 100644
--- a/src/Sylius/Bundle/CoreBundle/Installer/Setup/CurrencySetup.php
+++ b/src/Sylius/Bundle/CoreBundle/Installer/Setup/CurrencySetup.php
@@ -64,7 +64,7 @@ private function getCurrencyCodeFromUser(InputInterface $input, OutputInterface
while (null === $name) {
$output->writeln(
- sprintf('Currency with code %s could not be resolved.', $code)
+ sprintf('Currency with code %s could not be resolved.', $code),
);
$code = $this->getNewCurrencyCode($input, $output, $questionHelper);
diff --git a/src/Sylius/Bundle/CoreBundle/Installer/Setup/LocaleSetup.php b/src/Sylius/Bundle/CoreBundle/Installer/Setup/LocaleSetup.php
index fb1fd74d2c7..4d6221fecf2 100644
--- a/src/Sylius/Bundle/CoreBundle/Installer/Setup/LocaleSetup.php
+++ b/src/Sylius/Bundle/CoreBundle/Installer/Setup/LocaleSetup.php
@@ -70,7 +70,7 @@ private function getLanguageCodeFromUser(InputInterface $input, OutputInterface
while (null === $name) {
$output->writeln(
- sprintf('Language with code %s could not be resolved.', $code)
+ sprintf('Language with code %s could not be resolved.', $code),
);
$code = $this->getNewLanguageCode($input, $output, $questionHelper);
diff --git a/src/Sylius/Bundle/CoreBundle/Mailer/OrderEmailManager.php b/src/Sylius/Bundle/CoreBundle/Mailer/OrderEmailManager.php
index 68e646322cc..20543cbf4e9 100644
--- a/src/Sylius/Bundle/CoreBundle/Mailer/OrderEmailManager.php
+++ b/src/Sylius/Bundle/CoreBundle/Mailer/OrderEmailManager.php
@@ -38,7 +38,7 @@ public function sendConfirmationEmail(OrderInterface $order): void
'order' => $order,
'channel' => $order->getChannel(),
'localeCode' => $order->getLocaleCode(),
- ]
+ ],
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Migrations/Version20161223091334.php b/src/Sylius/Bundle/CoreBundle/Migrations/Version20161223091334.php
index acace1f2007..3df234d296a 100644
--- a/src/Sylius/Bundle/CoreBundle/Migrations/Version20161223091334.php
+++ b/src/Sylius/Bundle/CoreBundle/Migrations/Version20161223091334.php
@@ -28,7 +28,7 @@ public function up(Schema $schema): void
'CREATE TEMPORARY TABLE IF NOT EXISTS variants_count
SELECT sylius_product.id AS product_id, COUNT(sylius_product_variant.id) AS `row_number` FROM sylius_product
INNER JOIN sylius_product_variant ON sylius_product.id = sylius_product_variant.product_id
- GROUP BY sylius_product.id'
+ GROUP BY sylius_product.id',
);
$this->addSql(
'UPDATE sylius_product_variant
@@ -37,7 +37,7 @@ public function up(Schema $schema): void
WHEN variants_count.row_number = 1 THEN (@row_number := -1) + 1
WHEN @row_number + 1 < variants_count.row_number then @row_number := @row_number + 1
ELSE @row_number := 0
- END'
+ END',
);
}
diff --git a/src/Sylius/Bundle/CoreBundle/Migrations/Version20201208105207.php b/src/Sylius/Bundle/CoreBundle/Migrations/Version20201208105207.php
index 42e7ce99665..d5cb4cd8eda 100644
--- a/src/Sylius/Bundle/CoreBundle/Migrations/Version20201208105207.php
+++ b/src/Sylius/Bundle/CoreBundle/Migrations/Version20201208105207.php
@@ -41,7 +41,7 @@ public function up(Schema $schema): void
$this->updateAdjustment(
(int) $adjustment['id'],
$adjustment['shipping_id'] ?? 'NULL',
- $this->getParsedDetails(['taxRateCode' => $adjustment['tax_rate_code'], 'taxRateName' => $adjustment['tax_rate_name'], 'taxRateAmount' => ($adjustment['tax_rate_amount'] ? (float) $adjustment['tax_rate_amount'] : null), 'shippingMethodCode' => $adjustment['shipment_code'], 'shippingMethodName' => $this->getShippingMethodName($adjustment['shipment_code'])])
+ $this->getParsedDetails(['taxRateCode' => $adjustment['tax_rate_code'], 'taxRateName' => $adjustment['tax_rate_name'], 'taxRateAmount' => ($adjustment['tax_rate_amount'] ? (float) $adjustment['tax_rate_amount'] : null), 'shippingMethodCode' => $adjustment['shipment_code'], 'shippingMethodName' => $this->getShippingMethodName($adjustment['shipment_code'])]),
);
}
}
@@ -97,7 +97,7 @@ private function getShipmentAdjustmentsWithData(): array
LEFT JOIN sylius_tax_rate tax_rate on adjustment.label LIKE CONCAT(tax_rate.name, \'%\')
WHERE adjustment.type IN ("shipping", "tax")
ORDER BY adjustment.type
- '
+ ',
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/OAuth/UserProvider.php b/src/Sylius/Bundle/CoreBundle/OAuth/UserProvider.php
index 8e1a72d86fe..d52cc294774 100644
--- a/src/Sylius/Bundle/CoreBundle/OAuth/UserProvider.php
+++ b/src/Sylius/Bundle/CoreBundle/OAuth/UserProvider.php
@@ -56,7 +56,7 @@ public function __construct(
RepositoryInterface $oauthRepository,
ObjectManager $userManager,
CanonicalizerInterface $canonicalizer,
- CustomerRepositoryInterface $customerRepository
+ CustomerRepositoryInterface $customerRepository,
) {
parent::__construct($supportedUserClass, $userRepository, $canonicalizer);
diff --git a/src/Sylius/Bundle/CoreBundle/Order/NumberGenerator/SequentialOrderNumberGenerator.php b/src/Sylius/Bundle/CoreBundle/Order/NumberGenerator/SequentialOrderNumberGenerator.php
index e3e65c6323d..056a6c03d17 100644
--- a/src/Sylius/Bundle/CoreBundle/Order/NumberGenerator/SequentialOrderNumberGenerator.php
+++ b/src/Sylius/Bundle/CoreBundle/Order/NumberGenerator/SequentialOrderNumberGenerator.php
@@ -38,7 +38,7 @@ public function __construct(
FactoryInterface $sequenceFactory,
EntityManagerInterface $sequenceManager,
int $startNumber = 1,
- int $numberLength = 9
+ int $numberLength = 9,
) {
$this->sequenceRepository = $sequenceRepository;
$this->sequenceFactory = $sequenceFactory;
diff --git a/src/Sylius/Bundle/CoreBundle/Remover/ReviewerReviewsRemover.php b/src/Sylius/Bundle/CoreBundle/Remover/ReviewerReviewsRemover.php
index a52dddd28e9..f8af9e35102 100644
--- a/src/Sylius/Bundle/CoreBundle/Remover/ReviewerReviewsRemover.php
+++ b/src/Sylius/Bundle/CoreBundle/Remover/ReviewerReviewsRemover.php
@@ -31,7 +31,7 @@ final class ReviewerReviewsRemover implements ReviewerReviewsRemoverInterface
public function __construct(
EntityRepository $reviewRepository,
ObjectManager $reviewManager,
- ReviewableRatingUpdaterInterface $averageRatingUpdater
+ ReviewableRatingUpdaterInterface $averageRatingUpdater,
) {
$this->reviewRepository = $reviewRepository;
$this->reviewManager = $reviewManager;
diff --git a/src/Sylius/Bundle/CoreBundle/Security/UserImpersonator.php b/src/Sylius/Bundle/CoreBundle/Security/UserImpersonator.php
index 13c2c97f947..2e0cb09455f 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/Storage/CartSessionStorage.php b/src/Sylius/Bundle/CoreBundle/Storage/CartSessionStorage.php
index 9c532e6410b..f773788e0c6 100644
--- a/src/Sylius/Bundle/CoreBundle/Storage/CartSessionStorage.php
+++ b/src/Sylius/Bundle/CoreBundle/Storage/CartSessionStorage.php
@@ -30,7 +30,7 @@ final class CartSessionStorage implements CartStorageInterface
public function __construct(
SessionInterface $session,
string $sessionKeyName,
- OrderRepositoryInterface $orderRepository
+ OrderRepositoryInterface $orderRepository,
) {
$this->session = $session;
$this->sessionKeyName = $sessionKeyName;
diff --git a/src/Sylius/Bundle/CoreBundle/SyliusCoreBundle.php b/src/Sylius/Bundle/CoreBundle/SyliusCoreBundle.php
index 0290d5caf25..64a96ae09bb 100644
--- a/src/Sylius/Bundle/CoreBundle/SyliusCoreBundle.php
+++ b/src/Sylius/Bundle/CoreBundle/SyliusCoreBundle.php
@@ -51,7 +51,7 @@ public function boot(): void
$factory->withPluralRules(new Ruleset(
new Transformations(),
new Patterns(),
- new Substitutions(new Substitution(new Word('taxon'), new Word('taxons')))
+ new Substitutions(new Substitution(new Word('taxon'), new Word('taxons'))),
));
$inflector = $factory->build();
diff --git a/src/Sylius/Bundle/CoreBundle/Taxation/Strategy/TaxCalculationStrategy.php b/src/Sylius/Bundle/CoreBundle/Taxation/Strategy/TaxCalculationStrategy.php
index 62cdd78f58b..95e9caff4df 100644
--- a/src/Sylius/Bundle/CoreBundle/Taxation/Strategy/TaxCalculationStrategy.php
+++ b/src/Sylius/Bundle/CoreBundle/Taxation/Strategy/TaxCalculationStrategy.php
@@ -73,7 +73,7 @@ private function assertApplicatorsHaveCorrectType(array $applicators): void
Assert::allIsInstanceOf(
$applicators,
OrderTaxesApplicatorInterface::class,
- 'Order taxes applicator should have type "%2$s". Got: %s'
+ 'Order taxes applicator should have type "%2$s". Got: %s',
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Templating/Helper/CheckoutStepsHelper.php b/src/Sylius/Bundle/CoreBundle/Templating/Helper/CheckoutStepsHelper.php
index ad4a07d0ee9..82f290c4a29 100644
--- a/src/Sylius/Bundle/CoreBundle/Templating/Helper/CheckoutStepsHelper.php
+++ b/src/Sylius/Bundle/CoreBundle/Templating/Helper/CheckoutStepsHelper.php
@@ -26,7 +26,7 @@ class CheckoutStepsHelper extends Helper
public function __construct(
OrderPaymentMethodSelectionRequirementCheckerInterface $orderPaymentMethodSelectionRequirementChecker,
- OrderShippingMethodSelectionRequirementCheckerInterface $orderShippingMethodSelectionRequirementChecker
+ OrderShippingMethodSelectionRequirementCheckerInterface $orderShippingMethodSelectionRequirementChecker,
) {
$this->orderPaymentMethodSelectionRequirementChecker = $orderPaymentMethodSelectionRequirementChecker;
$this->orderShippingMethodSelectionRequirementChecker = $orderShippingMethodSelectionRequirementChecker;
diff --git a/src/Sylius/Bundle/CoreBundle/Templating/Helper/PriceHelper.php b/src/Sylius/Bundle/CoreBundle/Templating/Helper/PriceHelper.php
index ef84771c51c..b7e8cd1acec 100644
--- a/src/Sylius/Bundle/CoreBundle/Templating/Helper/PriceHelper.php
+++ b/src/Sylius/Bundle/CoreBundle/Templating/Helper/PriceHelper.php
@@ -51,7 +51,8 @@ public function getOriginalPrice(ProductVariantInterface $productVariant, array
return $this
->productVariantPriceCalculator
- ->calculateOriginal($productVariant, $context);
+ ->calculateOriginal($productVariant, $context)
+ ;
}
/**
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/DependencyInjection/Compiler/RegisterTaxCalculationStrategiesPassTest.php b/src/Sylius/Bundle/CoreBundle/Tests/DependencyInjection/Compiler/RegisterTaxCalculationStrategiesPassTest.php
index 46190269086..b1f65b2319b 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/DependencyInjection/Compiler/RegisterTaxCalculationStrategiesPassTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/DependencyInjection/Compiler/RegisterTaxCalculationStrategiesPassTest.php
@@ -29,7 +29,7 @@ public function it_registers_strategies_in_the_registry(): void
'str',
(new Definition())
->addTag('sylius.taxation.calculation_strategy', ['type' => 'str1', 'label' => 'Str 1'])
- ->addTag('sylius.taxation.calculation_strategy', ['type' => 'str2', 'label' => 'Str 2', 'priority' => 5])
+ ->addTag('sylius.taxation.calculation_strategy', ['type' => 'str2', 'label' => 'Str 2', 'priority' => 5]),
);
$this->compile();
@@ -37,12 +37,12 @@ public function it_registers_strategies_in_the_registry(): void
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.registry.tax_calculation_strategy',
'register',
- [new Reference('str'), 0]
+ [new Reference('str'), 0],
);
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.registry.tax_calculation_strategy',
'register',
- [new Reference('str'), 5]
+ [new Reference('str'), 5],
);
}
@@ -54,14 +54,14 @@ public function it_creates_parameter_which_maps_strategies(): void
'str',
(new Definition())
->addTag('sylius.taxation.calculation_strategy', ['type' => 'str1', 'label' => 'Str 1'])
- ->addTag('sylius.taxation.calculation_strategy', ['type' => 'str2', 'label' => 'Str 2'])
+ ->addTag('sylius.taxation.calculation_strategy', ['type' => 'str2', 'label' => 'Str 2']),
);
$this->compile();
$this->assertContainerBuilderHasParameter(
'sylius.tax_calculation_strategies',
- ['str1' => 'Str 1', 'str2' => 'Str 2']
+ ['str1' => 'Str 1', 'str2' => 'Str 2'],
);
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/DependencyInjection/Compiler/RegisterUriBasedSectionResolverPassTest.php b/src/Sylius/Bundle/CoreBundle/Tests/DependencyInjection/Compiler/RegisterUriBasedSectionResolverPassTest.php
index d08e562c2db..838e307fbd1 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/DependencyInjection/Compiler/RegisterUriBasedSectionResolverPassTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/DependencyInjection/Compiler/RegisterUriBasedSectionResolverPassTest.php
@@ -55,7 +55,7 @@ public function it_adds_method_call_to_uri_based_section_resolver_in_order(): vo
new Reference('sylius.section_resolver.admin_uri_based_section_resolver'),
new Reference('sylius.section_resolver.admin_api_uri_based_section_resolver'),
new Reference('sylius.section_resolver.shop_uri_based_section_resolver'),
- ]
+ ],
);
}
@@ -72,12 +72,12 @@ public function it_does_not_add_method_call_if_there_are_no_tagged_processors():
$this->assertContainerBuilderHasServiceDefinitionWithArgument(
'sylius.section_resolver.uri_based_section_resolver',
1,
- []
+ [],
);
}
/**
- * {@inheritdoc}
+ * @inheritdoc
*/
protected function registerCompilerPass(ContainerBuilder $container): void
{
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/DependencyInjection/SyliusCoreConfigurationTest.php b/src/Sylius/Bundle/CoreBundle/Tests/DependencyInjection/SyliusCoreConfigurationTest.php
index 362daa3e0a7..ff1810ebd16 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/DependencyInjection/SyliusCoreConfigurationTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/DependencyInjection/SyliusCoreConfigurationTest.php
@@ -51,7 +51,7 @@ public function it_does_not_allow_to_define_previous_priorities_with_values_othe
(new PartialProcessor())->processConfiguration(
$this->getConfiguration(),
'process_shipments_before_recalculating_prices',
- [['process_shipments_before_recalculating_prices' => 'yolo']]
+ [['process_shipments_before_recalculating_prices' => 'yolo']],
);
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/DependencyInjection/SyliusCoreExtensionTest.php b/src/Sylius/Bundle/CoreBundle/Tests/DependencyInjection/SyliusCoreExtensionTest.php
index 64db9c06b36..6fbd25913ea 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/DependencyInjection/SyliusCoreExtensionTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/DependencyInjection/SyliusCoreExtensionTest.php
@@ -30,22 +30,22 @@ public function it_brings_back_previous_order_processing_priorities(): void
$this->assertThat(
$this->container->findDefinition('sylius.order_processing.order_prices_recalculator'),
- new DefinitionHasTagConstraint('sylius.order_processor', ['priority' => 40])
+ new DefinitionHasTagConstraint('sylius.order_processor', ['priority' => 40]),
);
$this->assertThat(
$this->container->findDefinition('sylius.order_processing.order_prices_recalculator'),
- $this->logicalNot(new DefinitionHasTagConstraint('sylius.order_processor', ['priority' => 50]))
+ $this->logicalNot(new DefinitionHasTagConstraint('sylius.order_processor', ['priority' => 50])),
);
$this->assertThat(
$this->container->findDefinition('sylius.order_processing.order_shipment_processor'),
- new DefinitionHasTagConstraint('sylius.order_processor', ['priority' => 50])
+ new DefinitionHasTagConstraint('sylius.order_processor', ['priority' => 50]),
);
$this->assertThat(
$this->container->findDefinition('sylius.order_processing.order_shipment_processor'),
- $this->logicalNot(new DefinitionHasTagConstraint('sylius.order_processor', ['priority' => 40]))
+ $this->logicalNot(new DefinitionHasTagConstraint('sylius.order_processor', ['priority' => 40])),
);
}
@@ -103,7 +103,7 @@ private function testPrependingDoctrineMigrations(string $env): void
));
$this->assertSame(
'@SyliusCoreBundle/Migrations',
- $doctrineMigrationsExtensionConfig[0]['migrations_paths']['Sylius\Bundle\CoreBundle\Migrations']
+ $doctrineMigrationsExtensionConfig[0]['migrations_paths']['Sylius\Bundle\CoreBundle\Migrations'],
);
$syliusLabsDoctrineMigrationsExtraExtensionConfig = $this
@@ -116,7 +116,7 @@ private function testPrependingDoctrineMigrations(string $env): void
));
$this->assertSame(
[],
- $syliusLabsDoctrineMigrationsExtraExtensionConfig[0]['migrations']['Sylius\Bundle\CoreBundle\Migrations']
+ $syliusLabsDoctrineMigrationsExtraExtensionConfig[0]['migrations']['Sylius\Bundle\CoreBundle\Migrations'],
);
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/AddressFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/AddressFixtureTest.php
index 5c2e9a2cd8a..ae446362289 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/AddressFixtureTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/AddressFixtureTest.php
@@ -135,7 +135,7 @@ protected function getConfiguration(): AddressFixture
{
return new AddressFixture(
$this->getMockBuilder(ObjectManager::class)->getMock(),
- $this->getMockBuilder(ExampleFactoryInterface::class)->getMock()
+ $this->getMockBuilder(ExampleFactoryInterface::class)->getMock(),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/AdminUserFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/AdminUserFixtureTest.php
index cf96e66146c..8ef3f8b9146 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/AdminUserFixtureTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/AdminUserFixtureTest.php
@@ -68,7 +68,7 @@ protected function getConfiguration(): AdminUserFixture
{
return new AdminUserFixture(
$this->getMockBuilder(ObjectManager::class)->getMock(),
- $this->getMockBuilder(ExampleFactoryInterface::class)->getMock()
+ $this->getMockBuilder(ExampleFactoryInterface::class)->getMock(),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ChannelFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ChannelFixtureTest.php
index bb405276f02..d00ec2452b1 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ChannelFixtureTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ChannelFixtureTest.php
@@ -95,7 +95,7 @@ public function channel_contact_email_is_optional(): void
{
$this->assertConfigurationIsValid(
[['custom' => [['contact_email' => 'contact@example.com']]]],
- 'custom.*.contact_email'
+ 'custom.*.contact_email',
);
}
@@ -111,7 +111,7 @@ protected function getConfiguration(): ChannelFixture
{
return new ChannelFixture(
$this->getMockBuilder(ObjectManager::class)->getMock(),
- $this->getMockBuilder(ExampleFactoryInterface::class)->getMock()
+ $this->getMockBuilder(ExampleFactoryInterface::class)->getMock(),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/CurrencyFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/CurrencyFixtureTest.php
index ee72a5b5907..14c39782c1f 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/CurrencyFixtureTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/CurrencyFixtureTest.php
@@ -43,7 +43,7 @@ protected function getConfiguration(): CurrencyFixture
{
return new CurrencyFixture(
$this->getMockBuilder(FactoryInterface::class)->getMock(),
- $this->getMockBuilder(ObjectManager::class)->getMock()
+ $this->getMockBuilder(ObjectManager::class)->getMock(),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/CustomerGroupFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/CustomerGroupFixtureTest.php
index 66ea13e5f00..60a45c5407e 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/CustomerGroupFixtureTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/CustomerGroupFixtureTest.php
@@ -60,7 +60,7 @@ protected function getConfiguration(): CustomerGroupFixture
{
return new CustomerGroupFixture(
$this->getMockBuilder(ObjectManager::class)->getMock(),
- $this->getMockBuilder(ExampleFactoryInterface::class)->getMock()
+ $this->getMockBuilder(ExampleFactoryInterface::class)->getMock(),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/GeographicalFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/GeographicalFixtureTest.php
index fdcd4b9b409..93ee4bef16d 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/GeographicalFixtureTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/GeographicalFixtureTest.php
@@ -41,7 +41,7 @@ public function countries_are_set_to_all_known_countries_by_default(): void
$this->assertProcessedConfigurationEquals(
[[]],
['countries' => array_keys(Countries::getNames())],
- 'countries'
+ 'countries',
);
}
@@ -52,7 +52,7 @@ public function countries_can_be_replaced_with_custom_ones(): void
{
$this->assertConfigurationIsValid(
[['countries' => ['PL', 'DE', 'FR']]],
- 'countries'
+ 'countries',
);
}
@@ -64,7 +64,7 @@ public function provinces_are_empty_by_default(): void
$this->assertProcessedConfigurationEquals(
[[]],
['provinces' => []],
- 'provinces'
+ 'provinces',
);
}
@@ -75,7 +75,7 @@ public function provinces_can_be_set(): void
{
$this->assertConfigurationIsValid(
[['provinces' => ['US' => ['AL' => 'Alabama']]]],
- 'provinces'
+ 'provinces',
);
}
@@ -87,7 +87,7 @@ public function zones_are_empty_by_default(): void
$this->assertProcessedConfigurationEquals(
[[]],
['zones' => []],
- 'zones'
+ 'zones',
);
}
@@ -98,7 +98,7 @@ public function zones_can_be_defined_as_country_based(): void
{
$this->assertConfigurationIsValid(
[['zones' => ['EU' => ['name' => 'Some EU countries', 'countries' => ['PL', 'DE', 'FR']]]]],
- 'zones'
+ 'zones',
);
}
@@ -109,7 +109,7 @@ public function zones_can_have_scopes_based(): void
{
$this->assertConfigurationIsValid(
[['zones' => ['EU' => ['name' => 'Some EU countries', 'countries' => ['PL', 'DE', 'FR'], 'scope' => 'tax']]]],
- 'zones'
+ 'zones',
);
}
@@ -120,7 +120,7 @@ public function zones_can_be_defined_as_province_based(): void
{
$this->assertConfigurationIsValid(
[['zones' => ['WEST-COAST' => ['name' => 'West Coast', 'provinces' => ['US-CA', 'US-OR', 'US-WA']]]]],
- 'zones'
+ 'zones',
);
}
@@ -131,7 +131,7 @@ public function zones_can_be_defined_as_zone_based(): void
{
$this->assertConfigurationIsValid(
[['zones' => ['AMERICA' => ['name' => 'America', 'zones' => ['NORTH-AMERICA', 'SOUTH-AMERICA']]]]],
- 'zones'
+ 'zones',
);
}
@@ -143,25 +143,25 @@ public function zone_can_be_defined_with_exactly_one_kind_of_members(): void
$this->assertPartialConfigurationIsInvalid(
[['zones' => ['ZONE' => ['name' => 'zone']]]],
'zones',
- 'Zone must have only one type of members'
+ 'Zone must have only one type of members',
);
$this->assertPartialConfigurationIsInvalid(
[['zones' => ['ZONE' => ['name' => 'zone', 'countries' => ['PL'], 'zones' => ['AMERICA']]]]],
'zones',
- 'Zone must have only one type of members'
+ 'Zone must have only one type of members',
);
$this->assertPartialConfigurationIsInvalid(
[['zones' => ['ZONE' => ['name' => 'zone', 'countries' => ['PL'], 'provinces' => ['US-CA']]]]],
'zones',
- 'Zone must have only one type of members'
+ 'Zone must have only one type of members',
);
$this->assertPartialConfigurationIsInvalid(
[['zones' => ['ZONE' => ['name' => 'zone', 'zones' => ['AMERICA'], 'provinces' => ['US-CA']]]]],
'zones',
- 'Zone must have only one type of members'
+ 'Zone must have only one type of members',
);
}
@@ -173,7 +173,7 @@ protected function getConfiguration(): GeographicalFixture
$this->getMockBuilder(FactoryInterface::class)->getMock(),
$this->getMockBuilder(ObjectManager::class)->getMock(),
$this->getMockBuilder(ZoneFactoryInterface::class)->getMock(),
- $this->getMockBuilder(ObjectManager::class)->getMock()
+ $this->getMockBuilder(ObjectManager::class)->getMock(),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/LocaleFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/LocaleFixtureTest.php
index 2df364b6d27..7dc451efc86 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/LocaleFixtureTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/LocaleFixtureTest.php
@@ -47,7 +47,7 @@ public function default_locale_may_not_be_loaded(): void
$this->assertProcessedConfigurationEquals(
[['load_default_locale' => false]],
['load_default_locale' => false],
- 'load_default_locale'
+ 'load_default_locale',
);
}
@@ -59,7 +59,7 @@ public function default_locale_is_added_by_default(): void
$this->assertProcessedConfigurationEquals(
[[]],
['load_default_locale' => true],
- 'load_default_locale'
+ 'load_default_locale',
);
}
@@ -68,7 +68,7 @@ protected function getConfiguration(): LocaleFixture
return new LocaleFixture(
$this->getMockBuilder(FactoryInterface::class)->getMock(),
$this->getMockBuilder(ObjectManager::class)->getMock(),
- 'default_LOCALE'
+ 'default_LOCALE',
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/PaymentMethodFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/PaymentMethodFixtureTest.php
index 55a8b981ecd..44d7f5a62b6 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/PaymentMethodFixtureTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/PaymentMethodFixtureTest.php
@@ -97,7 +97,7 @@ public function payment_method_instructions_configuration_default_null(): void
$this->assertProcessedConfigurationEquals(
[['custom' => [[]]]],
['custom' => [[]]],
- 'custom.*.instructions'
+ 'custom.*.instructions',
);
}
@@ -130,7 +130,7 @@ protected function getConfiguration(): PaymentMethodFixture
{
return new PaymentMethodFixture(
$this->getMockBuilder(ObjectManager::class)->getMock(),
- $this->getMockBuilder(ExampleFactoryInterface::class)->getMock()
+ $this->getMockBuilder(ExampleFactoryInterface::class)->getMock(),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductAssociationFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductAssociationFixtureTest.php
index 0a052d6bd72..316d59b430e 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductAssociationFixtureTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductAssociationFixtureTest.php
@@ -65,7 +65,7 @@ public function product_association_associated_products_are_optional(): void
[[
'custom' => [['associated_products' => ['product-1', 'product-2']]],
]],
- 'custom.*.associated_products'
+ 'custom.*.associated_products',
)
;
}
@@ -74,7 +74,7 @@ protected function getConfiguration(): ProductAssociationFixture
{
return new ProductAssociationFixture(
$this->getMockBuilder(ObjectManager::class)->getMock(),
- $this->getMockBuilder(ExampleFactoryInterface::class)->getMock()
+ $this->getMockBuilder(ExampleFactoryInterface::class)->getMock(),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductAssociationTypeFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductAssociationTypeFixtureTest.php
index ee3f5725c49..da1d630373e 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductAssociationTypeFixtureTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductAssociationTypeFixtureTest.php
@@ -60,7 +60,7 @@ protected function getConfiguration(): ProductAssociationTypeFixture
{
return new ProductAssociationTypeFixture(
$this->getMockBuilder(ObjectManager::class)->getMock(),
- $this->getMockBuilder(ExampleFactoryInterface::class)->getMock()
+ $this->getMockBuilder(ExampleFactoryInterface::class)->getMock(),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductAttributeFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductAttributeFixtureTest.php
index f839a30accf..c1442167de6 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductAttributeFixtureTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductAttributeFixtureTest.php
@@ -70,7 +70,7 @@ protected function getConfiguration(): ProductAttributeFixture
return new ProductAttributeFixture(
$this->getMockBuilder(ObjectManager::class)->getMock(),
$this->getMockBuilder(ExampleFactoryInterface::class)->getMock(),
- ['text' => 'Text attribute', 'bool' => 'Boolean attribute']
+ ['text' => 'Text attribute', 'bool' => 'Boolean attribute'],
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductFixtureTest.php
index e8ee6b0b95e..190f5bcb248 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductFixtureTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductFixtureTest.php
@@ -141,7 +141,7 @@ protected function getConfiguration(): ProductFixture
{
return new ProductFixture(
$this->getMockBuilder(ObjectManager::class)->getMock(),
- $this->getMockBuilder(ExampleFactoryInterface::class)->getMock()
+ $this->getMockBuilder(ExampleFactoryInterface::class)->getMock(),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductOptionFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductOptionFixtureTest.php
index 58b2d8683fd..c36582348e2 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductOptionFixtureTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductOptionFixtureTest.php
@@ -60,7 +60,7 @@ protected function getConfiguration(): ProductOptionFixture
{
return new ProductOptionFixture(
$this->getMockBuilder(ObjectManager::class)->getMock(),
- $this->getMockBuilder(ExampleFactoryInterface::class)->getMock()
+ $this->getMockBuilder(ExampleFactoryInterface::class)->getMock(),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductReviewFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductReviewFixtureTest.php
index bb5376178f2..60309afadc2 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductReviewFixtureTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ProductReviewFixtureTest.php
@@ -92,7 +92,7 @@ protected function getConfiguration(): ProductReviewFixture
{
return new ProductReviewFixture(
$this->getMockBuilder(ObjectManager::class)->getMock(),
- $this->getMockBuilder(ExampleFactoryInterface::class)->getMock()
+ $this->getMockBuilder(ExampleFactoryInterface::class)->getMock(),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/PromotionFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/PromotionFixtureTest.php
index fc31f31e924..5aa3324f19b 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/PromotionFixtureTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/PromotionFixtureTest.php
@@ -150,7 +150,7 @@ protected function getConfiguration(): PromotionFixture
{
return new PromotionFixture(
$this->getMockBuilder(ObjectManager::class)->getMock(),
- $this->getMockBuilder(ExampleFactoryInterface::class)->getMock()
+ $this->getMockBuilder(ExampleFactoryInterface::class)->getMock(),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ShippingCategoryFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ShippingCategoryFixtureTest.php
index 112125c1dfa..86f0784b8fa 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ShippingCategoryFixtureTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ShippingCategoryFixtureTest.php
@@ -60,7 +60,7 @@ protected function getConfiguration(): ShippingCategoryFixture
{
return new ShippingCategoryFixture(
$this->getMockBuilder(ObjectManager::class)->getMock(),
- $this->getMockBuilder(ExampleFactoryInterface::class)->getMock()
+ $this->getMockBuilder(ExampleFactoryInterface::class)->getMock(),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ShippingMethodFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ShippingMethodFixtureTest.php
index 62ad1d6f7c0..26ad365727c 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ShippingMethodFixtureTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ShippingMethodFixtureTest.php
@@ -107,7 +107,7 @@ protected function getConfiguration(): ShippingMethodFixture
{
return new ShippingMethodFixture(
$this->getMockBuilder(ObjectManager::class)->getMock(),
- $this->getMockBuilder(ExampleFactoryInterface::class)->getMock()
+ $this->getMockBuilder(ExampleFactoryInterface::class)->getMock(),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ShopUserFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ShopUserFixtureTest.php
index c6b50d93a7d..8c874c9b8ce 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ShopUserFixtureTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/ShopUserFixtureTest.php
@@ -100,7 +100,7 @@ protected function getConfiguration(): ShopUserFixture
{
return new ShopUserFixture(
$this->getMockBuilder(ObjectManager::class)->getMock(),
- $this->getMockBuilder(ExampleFactoryInterface::class)->getMock()
+ $this->getMockBuilder(ExampleFactoryInterface::class)->getMock(),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/TaxCategoryFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/TaxCategoryFixtureTest.php
index a26cbc55490..45a19ea4c7e 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/TaxCategoryFixtureTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/TaxCategoryFixtureTest.php
@@ -60,7 +60,7 @@ protected function getConfiguration(): TaxCategoryFixture
{
return new TaxCategoryFixture(
$this->getMockBuilder(ObjectManager::class)->getMock(),
- $this->getMockBuilder(ExampleFactoryInterface::class)->getMock()
+ $this->getMockBuilder(ExampleFactoryInterface::class)->getMock(),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/TaxRateFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/TaxRateFixtureTest.php
index 648a636cf20..71a4590cb8e 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/TaxRateFixtureTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/TaxRateFixtureTest.php
@@ -93,7 +93,7 @@ protected function getConfiguration(): TaxRateFixture
{
return new TaxRateFixture(
$this->getMockBuilder(ObjectManager::class)->getMock(),
- $this->getMockBuilder(ExampleFactoryInterface::class)->getMock()
+ $this->getMockBuilder(ExampleFactoryInterface::class)->getMock(),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/TaxonFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/TaxonFixtureTest.php
index d2ca1742cf6..c2a4aa56985 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/TaxonFixtureTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/TaxonFixtureTest.php
@@ -72,7 +72,7 @@ public function taxon_children_may_contain_nested_array(): void
$this->assertProcessedConfigurationEquals(
[['custom' => [['children' => [['nested' => ['key' => 'value']]]]]]],
['custom' => [['children' => [['nested' => ['key' => 'value']]]]]],
- 'custom.*.children'
+ 'custom.*.children',
);
}
@@ -92,7 +92,7 @@ public function taxon_translations_may_contain_nested_array(): void
$this->assertProcessedConfigurationEquals(
[['custom' => [['translations' => [['nested' => ['key' => 'value']]]]]]],
['custom' => [['translations' => [['nested' => ['key' => 'value']]]]]],
- 'custom.*.translations'
+ 'custom.*.translations',
);
}
@@ -100,7 +100,7 @@ protected function getConfiguration(): TaxonFixture
{
return new TaxonFixture(
$this->getMockBuilder(ObjectManager::class)->getMock(),
- $this->getMockBuilder(ExampleFactoryInterface::class)->getMock()
+ $this->getMockBuilder(ExampleFactoryInterface::class)->getMock(),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Form/Type/Taxon/ProductTaxonAutocompleteChoiceTypeTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Form/Type/Taxon/ProductTaxonAutocompleteChoiceTypeTest.php
index 92ca1c7a52c..f897672c6ba 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Form/Type/Taxon/ProductTaxonAutocompleteChoiceTypeTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Form/Type/Taxon/ProductTaxonAutocompleteChoiceTypeTest.php
@@ -48,7 +48,7 @@ protected function getExtensions(): array
{
$productTaxonAutoCompleteType = new ProductTaxonAutocompleteChoiceType(
$this->productTaxonFactory->reveal(),
- $this->productTaxonRepository->reveal()
+ $this->productTaxonRepository->reveal(),
);
$resourceAutoCompleteType = new ResourceAutocompleteChoiceType($this->resourceRepositoryRegistry->reveal());
diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Mailer/OrderEmailManagerTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Mailer/OrderEmailManagerTest.php
index ff14a1ded64..c36599a6bc8 100644
--- a/src/Sylius/Bundle/CoreBundle/Tests/Mailer/OrderEmailManagerTest.php
+++ b/src/Sylius/Bundle/CoreBundle/Tests/Mailer/OrderEmailManagerTest.php
@@ -71,9 +71,9 @@ public function it_sends_order_confirmation_email(): void
'%s %s %s',
$translator->trans('sylius.email.order_confirmation.your_order_number', [], null, self::LOCALE_CODE),
self::ORDER_NUMBER,
- $translator->trans('sylius.email.order_confirmation.has_been_successfully_placed', [], null, self::LOCALE_CODE)
+ $translator->trans('sylius.email.order_confirmation.has_been_successfully_placed', [], null, self::LOCALE_CODE),
),
- self::RECIPIENT_EMAIL
+ self::RECIPIENT_EMAIL,
));
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Twig/FilterExtension.php b/src/Sylius/Bundle/CoreBundle/Twig/FilterExtension.php
index 5334d82ae91..2474d08421b 100644
--- a/src/Sylius/Bundle/CoreBundle/Twig/FilterExtension.php
+++ b/src/Sylius/Bundle/CoreBundle/Twig/FilterExtension.php
@@ -37,7 +37,7 @@ public function filter(
$filter,
array $config = [],
$resolver = null,
- $referenceType = UrlGeneratorInterface::ABSOLUTE_URL
+ $referenceType = UrlGeneratorInterface::ABSOLUTE_URL,
) {
if (!$this->canImageBeFiltered($path)) {
return $this->imagesPath . $path;
diff --git a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/CartItemAvailabilityValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/CartItemAvailabilityValidator.php
index ee61cb88c5e..6fef80ff224 100644
--- a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/CartItemAvailabilityValidator.php
+++ b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/CartItemAvailabilityValidator.php
@@ -43,13 +43,13 @@ public function validate($value, Constraint $constraint): void
$isStockSufficient = $this->availabilityChecker->isStockSufficient(
$cartItem->getVariant(),
- $cartItem->getQuantity() + $this->getExistingCartItemQuantityFromCart($value->getCart(), $cartItem)
+ $cartItem->getQuantity() + $this->getExistingCartItemQuantityFromCart($value->getCart(), $cartItem),
);
if (!$isStockSufficient) {
$this->context->addViolation(
$constraint->message,
- ['%itemName%' => $cartItem->getVariant()->getInventoryName()]
+ ['%itemName%' => $cartItem->getVariant()->getInventoryName()],
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/HasEnabledEntityValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/HasEnabledEntityValidator.php
index cc951f7aa00..b47bddbe7ca 100644
--- a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/HasEnabledEntityValidator.php
+++ b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/HasEnabledEntityValidator.php
@@ -85,8 +85,8 @@ public function validate($value, Constraint $constraint): void
*/
private function isLastEnabledEntity($result, $entity): bool
{
- return !\is_countable($result) || 0 === count($result)
- || (1 === count($result) && $entity === ($result instanceof \Iterator ? $result->current() : current($result)));
+ return !\is_countable($result) || 0 === count($result) ||
+ (1 === count($result) && $entity === ($result instanceof \Iterator ? $result->current() : current($result)));
}
/**
@@ -105,8 +105,8 @@ private function getProperObjectManager(?string $manager, $entity): ?ObjectManag
$objectManager,
sprintf(
'Unable to find the object manager associated with an entity of class "%s".',
- get_class($entity)
- )
+ get_class($entity),
+ ),
);
}
@@ -135,7 +135,7 @@ private function ensureEntityHasProvidedEnabledField(ObjectManager $objectManage
if (!$class->hasField($enabledPropertyPath) && !$class->hasAssociation($enabledPropertyPath)) {
throw new ConstraintDefinitionException(
- sprintf("The field '%s' is not mapped by Doctrine, so it cannot be validated.", $enabledPropertyPath)
+ sprintf("The field '%s' is not mapped by Doctrine, so it cannot be validated.", $enabledPropertyPath),
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/OrderPaymentMethodEligibilityValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/OrderPaymentMethodEligibilityValidator.php
index 2981cfc1428..9df610334e7 100644
--- a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/OrderPaymentMethodEligibilityValidator.php
+++ b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/OrderPaymentMethodEligibilityValidator.php
@@ -37,7 +37,7 @@ public function validate($value, Constraint $constraint): void
if (!$payment->getMethod()->isEnabled()) {
$this->context->addViolation(
$constraint->message,
- ['%paymentMethodName%' => $payment->getMethod()->getName()]
+ ['%paymentMethodName%' => $payment->getMethod()->getName()],
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/OrderProductEligibilityValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/OrderProductEligibilityValidator.php
index 17f867d0f99..43792a3d181 100644
--- a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/OrderProductEligibilityValidator.php
+++ b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/OrderProductEligibilityValidator.php
@@ -39,12 +39,12 @@ public function validate($value, Constraint $constraint): void
if (!$orderItem->getVariant()->isEnabled()) {
$this->context->addViolation(
$constraint->message,
- ['%productName%' => $orderItem->getVariant()->getName()]
+ ['%productName%' => $orderItem->getVariant()->getName()],
);
} elseif (!$orderItem->getProduct()->isEnabled()) {
$this->context->addViolation(
$constraint->message,
- ['%productName%' => $orderItem->getProduct()->getName()]
+ ['%productName%' => $orderItem->getProduct()->getName()],
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/OrderShippingMethodEligibilityValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/OrderShippingMethodEligibilityValidator.php
index 38c82cefbd8..8374bad5f14 100644
--- a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/OrderShippingMethodEligibilityValidator.php
+++ b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/OrderShippingMethodEligibilityValidator.php
@@ -48,7 +48,7 @@ public function validate($value, Constraint $constraint): void
if (!$this->methodEligibilityChecker->isEligible($shipment, $shipment->getMethod())) {
$this->context->addViolation(
$constraint->message,
- ['%shippingMethodName%' => $shipment->getMethod()->getName()]
+ ['%shippingMethodName%' => $shipment->getMethod()->getName()],
);
}
}
diff --git a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/UniqueReviewerEmailValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/UniqueReviewerEmailValidator.php
index 5a988afadd1..6ba1e7bea2b 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;
@@ -35,7 +34,7 @@ class UniqueReviewerEmailValidator extends ConstraintValidator
public function __construct(
UserRepositoryInterface $userRepository,
TokenStorageInterface $tokenStorage,
- AuthorizationCheckerInterface $authorizationChecker
+ AuthorizationCheckerInterface $authorizationChecker,
) {
$this->userRepository = $userRepository;
$this->tokenStorage = $tokenStorage;
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Checkout/CheckoutRedirectListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Checkout/CheckoutRedirectListenerSpec.php
index 471179bc5ba..6e8bf559a7e 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Checkout/CheckoutRedirectListenerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Checkout/CheckoutRedirectListenerSpec.php
@@ -29,7 +29,7 @@ final class CheckoutRedirectListenerSpec extends ObjectBehavior
function let(
RequestStack $requestStack,
CheckoutStateUrlGeneratorInterface $checkoutStateUrlGenerator,
- RequestMatcherInterface $requestMatcher
+ RequestMatcherInterface $requestMatcher,
): void {
$this->beConstructedWith($requestStack, $checkoutStateUrlGenerator, $requestMatcher);
}
@@ -40,7 +40,7 @@ function it_redirects_to_proper_route_based_on_order_checkout_state(
Request $request,
RequestMatcherInterface $requestMatcher,
RequestStack $requestStack,
- ResourceControllerEvent $resourceControllerEvent
+ ResourceControllerEvent $resourceControllerEvent,
): void {
$requestStack->getCurrentRequest()->willReturn($request);
$requestMatcher->matches($request)->willReturn(true);
@@ -58,7 +58,7 @@ function it_does_nothing_if_current_request_is_not_checkout_request(
Request $request,
RequestMatcherInterface $requestMatcher,
RequestStack $requestStack,
- ResourceControllerEvent $resourceControllerEvent
+ ResourceControllerEvent $resourceControllerEvent,
): void {
$requestStack->getCurrentRequest()->willReturn($request);
$requestMatcher->matches($request)->willReturn(false);
@@ -72,7 +72,7 @@ function it_does_nothing_if_current_request_has_redirect_configured(
Request $request,
RequestMatcherInterface $requestMatcher,
RequestStack $requestStack,
- ResourceControllerEvent $resourceControllerEvent
+ ResourceControllerEvent $resourceControllerEvent,
): void {
$requestStack->getCurrentRequest()->willReturn($request);
$requestMatcher->matches($request)->willReturn(true);
@@ -87,7 +87,7 @@ function it_throws_exception_if_event_subject_is_not_an_order(
Request $request,
RequestMatcherInterface $requestMatcher,
RequestStack $requestStack,
- ResourceControllerEvent $resourceControllerEvent
+ ResourceControllerEvent $resourceControllerEvent,
): void {
$requestStack->getCurrentRequest()->willReturn($request);
$requestMatcher->matches($request)->willReturn(true);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Checkout/CheckoutStateUrlGeneratorSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Checkout/CheckoutStateUrlGeneratorSpec.php
index 75f04cb93e8..fe4cc12400d 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Checkout/CheckoutStateUrlGeneratorSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Checkout/CheckoutStateUrlGeneratorSpec.php
@@ -67,7 +67,7 @@ function it_is_a_regular_url_generator(RouterInterface $router): void
function it_throws_route_not_found_exception_if_there_is_no_route_for_given_state(
RouterInterface $router,
- OrderInterface $order
+ OrderInterface $order,
): void {
$order->getCheckoutState()->willReturn('shipping_selected');
$router->generate(Argument::any())->shouldNotBeCalled();
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Command/Model/PluginInfoSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Command/Model/PluginInfoSpec.php
index 72473362ed2..4e2ce047c38 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Command/Model/PluginInfoSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Command/Model/PluginInfoSpec.php
@@ -22,7 +22,7 @@ function let(): void
$this->beConstructedWith(
'Admin Order Creation',
'Creating (and copying) orders in the administration panel.',
- 'https://github.com/Sylius/AdminOrderCreationPlugin'
+ 'https://github.com/Sylius/AdminOrderCreationPlugin',
);
}
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Context/CustomerAndChannelBasedCartContextSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Context/CustomerAndChannelBasedCartContextSpec.php
index 1dc5c4a3113..0e42dd30e3d 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Context/CustomerAndChannelBasedCartContextSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Context/CustomerAndChannelBasedCartContextSpec.php
@@ -29,7 +29,7 @@ final class CustomerAndChannelBasedCartContextSpec extends ObjectBehavior
function let(
CustomerContextInterface $customerContext,
ChannelContextInterface $channelContext,
- OrderRepositoryInterface $orderRepository
+ OrderRepositoryInterface $orderRepository,
): void {
$this->beConstructedWith($customerContext, $channelContext, $orderRepository);
}
@@ -45,7 +45,7 @@ function it_returns_uncompleted_cart_for_currently_logged_user(
CustomerContextInterface $customerContext,
CustomerInterface $customer,
OrderInterface $order,
- OrderRepositoryInterface $orderRepository
+ OrderRepositoryInterface $orderRepository,
): void {
$channelContext->getChannel()->willReturn($channel);
$customerContext->getCustomer()->willReturn($customer);
@@ -60,7 +60,7 @@ function it_throws_exception_if_no_cart_can_be_provided(
ChannelContextInterface $channelContext,
CustomerContextInterface $customerContext,
CustomerInterface $customer,
- OrderRepositoryInterface $orderRepository
+ OrderRepositoryInterface $orderRepository,
): void {
$channelContext->getChannel()->willReturn($channel);
$customerContext->getCustomer()->willReturn($customer);
@@ -76,7 +76,7 @@ function it_throws_exception_if_no_cart_can_be_provided(
function it_throws_exception_if_there_is_no_logged_in_customer(
CustomerContextInterface $customerContext,
ChannelContextInterface $channelContext,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$customerContext->getCustomer()->willReturn(null);
$channelContext->getChannel()->willReturn($channel);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Context/CustomerContextSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Context/CustomerContextSpec.php
index 34df64f19b6..b084ad8b44a 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Context/CustomerContextSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Context/CustomerContextSpec.php
@@ -32,7 +32,7 @@ function it_gets_customer_from_currently_logged_user(
AuthorizationCheckerInterface $authorizationChecker,
TokenInterface $token,
ShopUserInterface $user,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$tokenStorage->getToken()->willReturn($token);
$authorizationChecker->isGranted('IS_AUTHENTICATED_REMEMBERED')->willReturn(true);
@@ -53,7 +53,7 @@ function it_returns_null_if_user_is_not_a_shop_user_instance(
TokenStorageInterface $tokenStorage,
AuthorizationCheckerInterface $authorizationChecker,
TokenInterface $token,
- \stdClass $user
+ \stdClass $user,
): void {
$tokenStorage->getToken()->willReturn($token);
$authorizationChecker->isGranted('IS_AUTHENTICATED_REMEMBERED')->willReturn(true);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Context/SessionAndChannelBasedCartContextSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Context/SessionAndChannelBasedCartContextSpec.php
index 85224763e64..2eb35f0cb22 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Context/SessionAndChannelBasedCartContextSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Context/SessionAndChannelBasedCartContextSpec.php
@@ -38,7 +38,7 @@ function it_returns_cart_based_on_id_stored_in_session_and_current_channel(
CartStorageInterface $cartStorage,
ChannelContextInterface $channelContext,
ChannelInterface $channel,
- OrderInterface $cart
+ OrderInterface $cart,
): void {
$channelContext->getChannel()->willReturn($channel);
$cartStorage->hasForChannel($channel)->willReturn(true);
@@ -50,7 +50,7 @@ function it_returns_cart_based_on_id_stored_in_session_and_current_channel(
function it_throws_cart_not_found_exception_if_session_key_does_not_exist(
CartStorageInterface $cartStorage,
ChannelContextInterface $channelContext,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$channelContext->getChannel()->willReturn($channel);
$cartStorage->hasForChannel($channel)->willReturn(false);
@@ -61,7 +61,7 @@ function it_throws_cart_not_found_exception_if_session_key_does_not_exist(
function it_throws_cart_not_found_exception_and_removes_id_from_session_when_cart_was_not_found(
CartStorageInterface $cartStorage,
ChannelContextInterface $channelContext,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$channelContext->getChannel()->willReturn($channel);
$cartStorage->hasForChannel($channel)->willReturn(true);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Doctrine/ORM/Handler/ResourceDeleteHandlerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Doctrine/ORM/Handler/ResourceDeleteHandlerSpec.php
index 0dcc340c5ce..ca6bb0b9285 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Doctrine/ORM/Handler/ResourceDeleteHandlerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Doctrine/ORM/Handler/ResourceDeleteHandlerSpec.php
@@ -37,7 +37,7 @@ function it_uses_decorated_handler_to_handle_resource_deletion(
ResourceDeleteHandlerInterface $decoratedHandler,
EntityManagerInterface $entityManager,
RepositoryInterface $repository,
- ResourceInterface $resource
+ ResourceInterface $resource,
): void {
$entityManager->beginTransaction()->shouldBeCalled();
$decoratedHandler->handle($resource, $repository)->shouldBeCalled();
@@ -50,7 +50,7 @@ function it_throws_delete_handling_exception_if_something_gone_wrong_with_orm_wh
ResourceDeleteHandlerInterface $decoratedHandler,
EntityManagerInterface $entityManager,
RepositoryInterface $repository,
- ResourceInterface $resource
+ ResourceInterface $resource,
): void {
$entityManager->beginTransaction()->shouldBeCalled();
$decoratedHandler->handle($resource, $repository)->willThrow(ORMException::class);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Doctrine/ORM/Handler/ResourceUpdateHandlerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Doctrine/ORM/Handler/ResourceUpdateHandlerSpec.php
index 796ab888539..8d639d834d9 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Doctrine/ORM/Handler/ResourceUpdateHandlerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Doctrine/ORM/Handler/ResourceUpdateHandlerSpec.php
@@ -37,7 +37,7 @@ function it_uses_decorated_updater_to_handle_update(
ResourceUpdateHandlerInterface $decoratedUpdater,
ResourceInterface $resource,
RequestConfiguration $configuration,
- ObjectManager $manager
+ ObjectManager $manager,
): void {
$decoratedUpdater->handle($resource, $configuration, $manager);
@@ -48,7 +48,7 @@ function it_throws_a_race_condition_exception_if_catch_an_optimistic_lock_except
ResourceUpdateHandlerInterface $decoratedUpdater,
ResourceInterface $resource,
RequestConfiguration $configuration,
- ObjectManager $manager
+ ObjectManager $manager,
): void {
$decoratedUpdater
->handle($resource, $configuration, $manager)
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Doctrine/ORM/Inventory/Operator/OrderInventoryOperatorSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Doctrine/ORM/Inventory/Operator/OrderInventoryOperatorSpec.php
index 4e988c8dc79..1b993452304 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Doctrine/ORM/Inventory/Operator/OrderInventoryOperatorSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Doctrine/ORM/Inventory/Operator/OrderInventoryOperatorSpec.php
@@ -39,7 +39,7 @@ function it_locks_tracked_variants_during_cancelling(
EntityManagerInterface $productVariantManager,
OrderInterface $order,
OrderItemInterface $orderItem,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$order->getItems()->willReturn(new ArrayCollection([$orderItem->getWrappedObject()]));
$orderItem->getVariant()->willReturn($variant);
@@ -58,7 +58,7 @@ function it_locks_tracked_variants_during_holding(
EntityManagerInterface $productVariantManager,
OrderInterface $order,
OrderItemInterface $orderItem,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$order->getItems()->willReturn(new ArrayCollection([$orderItem->getWrappedObject()]));
$orderItem->getVariant()->willReturn($variant);
@@ -77,7 +77,7 @@ function it_locks_tracked_variants_during_selling(
EntityManagerInterface $productVariantManager,
OrderInterface $order,
OrderItemInterface $orderItem,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$order->getItems()->willReturn(new ArrayCollection([$orderItem->getWrappedObject()]));
$orderItem->getVariant()->willReturn($variant);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/EventListener/CustomerDefaultAddressListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/EventListener/CustomerDefaultAddressListenerSpec.php
index 4cc728a308d..f647f0e8af2 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/EventListener/CustomerDefaultAddressListenerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/EventListener/CustomerDefaultAddressListenerSpec.php
@@ -24,7 +24,7 @@ final class CustomerDefaultAddressListenerSpec extends ObjectBehavior
function it_adds_the_address_as_default_to_the_customer_on_pre_create_resource_controller_event(
ResourceControllerEvent $event,
AddressInterface $address,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$event->getSubject()->willReturn($address);
$address->getCustomer()->willReturn($customer);
@@ -44,7 +44,7 @@ function it_does_not_set_address_as_default_if_customer_already_have_a_default_a
ResourceControllerEvent $event,
AddressInterface $address,
CustomerInterface $customer,
- AddressInterface $anotherAddress
+ AddressInterface $anotherAddress,
): void {
$event->getSubject()->willReturn($address);
$address->getCustomer()->willReturn($customer);
@@ -59,18 +59,19 @@ function it_does_not_set_address_as_default_if_customer_already_have_a_default_a
}
function it_throws_an_exception_if_event_subject_is_not_an_address(
- ResourceControllerEvent $event
+ ResourceControllerEvent $event,
): void {
$event->getSubject()->willReturn(Argument::any());
$this
->shouldThrow(\InvalidArgumentException::class)
- ->during('preCreate', [$event]);
+ ->during('preCreate', [$event])
+ ;
}
function it_does_nothing_if_address_does_have_an_id(
ResourceControllerEvent $event,
- AddressInterface $address
+ AddressInterface $address,
): void {
$event->getSubject()->willReturn($address);
$address->getId()->willReturn(1);
@@ -84,7 +85,7 @@ function it_does_nothing_if_address_does_have_an_id(
function it_does_nothing_if_address_does_not_have_a_customer_assigned(
ResourceControllerEvent $event,
AddressInterface $address,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$event->getSubject()->willReturn($address);
$address->getCustomer()->willReturn(null);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/EventListener/CustomerReviewsDeleteListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/EventListener/CustomerReviewsDeleteListenerSpec.php
index d1be47eef0e..37f9df8ce0a 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/EventListener/CustomerReviewsDeleteListenerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/EventListener/CustomerReviewsDeleteListenerSpec.php
@@ -28,7 +28,7 @@ function let(ReviewerReviewsRemoverInterface $reviewerReviewsRemover): void
function it_removes_soft_deleted_customer_reviews_and_recalculates_their_product_ratings(
ReviewerReviewsRemoverInterface $reviewerReviewsRemover,
GenericEvent $event,
- ReviewerInterface $author
+ ReviewerInterface $author,
): void {
$event->getSubject()->willReturn($author);
$reviewerReviewsRemover->removeReviewerReviews($author)->shouldBeCalled();
diff --git a/src/Sylius/Bundle/CoreBundle/spec/EventListener/DefaultUsernameORMListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/EventListener/DefaultUsernameORMListenerSpec.php
index bcdc5fd9d3e..198feda3c0e 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/EventListener/DefaultUsernameORMListenerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/EventListener/DefaultUsernameORMListenerSpec.php
@@ -30,7 +30,7 @@ function it_sets_usernames_on_customer_create(
UnitOfWork $unitOfWork,
CustomerInterface $customer,
ShopUserInterface $user,
- ClassMetadata $userMetadata
+ ClassMetadata $userMetadata,
): void {
$onFlushEventArgs->getEntityManager()->willReturn($entityManager);
$entityManager->getUnitOfWork()->willReturn($unitOfWork);
@@ -59,7 +59,7 @@ function it_sets_usernames_on_customer_update_when_user_is_associated(
UnitOfWork $unitOfWork,
CustomerInterface $customer,
ShopUserInterface $user,
- ClassMetadata $userMetadata
+ ClassMetadata $userMetadata,
): void {
$onFlushEventArgs->getEntityManager()->willReturn($entityManager);
$entityManager->getUnitOfWork()->willReturn($unitOfWork);
@@ -88,7 +88,7 @@ function it_updates_usernames_on_customer_email_change(
UnitOfWork $unitOfWork,
CustomerInterface $customer,
ShopUserInterface $user,
- ClassMetadata $userMetadata
+ ClassMetadata $userMetadata,
): void {
$onFlushEventArgs->getEntityManager()->willReturn($entityManager);
$entityManager->getUnitOfWork()->willReturn($unitOfWork);
@@ -117,7 +117,7 @@ function it_updates_usernames_on_customer_email_canonical_change(
UnitOfWork $unitOfWork,
CustomerInterface $customer,
ShopUserInterface $user,
- ClassMetadata $userMetadata
+ ClassMetadata $userMetadata,
): void {
$onFlushEventArgs->getEntityManager()->willReturn($entityManager);
$entityManager->getUnitOfWork()->willReturn($unitOfWork);
@@ -146,7 +146,7 @@ function it_does_not_update_usernames_when_customer_emails_are_the_same(
UnitOfWork $unitOfWork,
CustomerInterface $customer,
ShopUserInterface $user,
- ClassMetadata $userMetadata
+ ClassMetadata $userMetadata,
): void {
$onFlushEventArgs->getEntityManager()->willReturn($entityManager);
$entityManager->getUnitOfWork()->willReturn($unitOfWork);
@@ -172,7 +172,7 @@ function it_does_nothing_on_customer_create_when_no_user_associated(
OnFlushEventArgs $onFlushEventArgs,
EntityManager $entityManager,
UnitOfWork $unitOfWork,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$onFlushEventArgs->getEntityManager()->willReturn($entityManager);
$entityManager->getUnitOfWork()->willReturn($unitOfWork);
@@ -191,7 +191,7 @@ function it_does_nothing_on_customer_update_when_no_user_associated(
OnFlushEventArgs $onFlushEventArgs,
EntityManager $entityManager,
UnitOfWork $unitOfWork,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$onFlushEventArgs->getEntityManager()->willReturn($entityManager);
$entityManager->getUnitOfWork()->willReturn($unitOfWork);
@@ -210,7 +210,7 @@ function it_does_nothing_on_customer_update_when_no_user_associated(
function it_does_nothing_when_there_are_no_objects_scheduled_in_the_unit_of_work(
OnFlushEventArgs $onFlushEventArgs,
EntityManager $entityManager,
- UnitOfWork $unitOfWork
+ UnitOfWork $unitOfWork,
): void {
$onFlushEventArgs->getEntityManager()->willReturn($entityManager);
$entityManager->getUnitOfWork()->willReturn($unitOfWork);
@@ -228,7 +228,7 @@ function it_does_nothing_when_there_are_other_objects_than_customer(
EntityManager $entityManager,
UnitOfWork $unitOfWork,
\stdClass $stdObject,
- \stdClass $stdObject2
+ \stdClass $stdObject2,
): void {
$onFlushEventArgs->getEntityManager()->willReturn($entityManager);
$entityManager->getUnitOfWork()->willReturn($unitOfWork);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/EventListener/ImageUploadListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/EventListener/ImageUploadListenerSpec.php
index 4633cf4ecb3..5f2035a30f2 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/EventListener/ImageUploadListenerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/EventListener/ImageUploadListenerSpec.php
@@ -30,7 +30,7 @@ function it_uploads_image_of_image_aware_entity(
ImageUploaderInterface $imageUploader,
ImageAwareInterface $imageAware,
ImageInterface $image,
- GenericEvent $event
+ GenericEvent $event,
): void {
$event->getSubject()->willReturn($imageAware);
$imageAware->getImage()->willReturn($image);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/EventListener/ImagesRemoveListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/EventListener/ImagesRemoveListenerSpec.php
index 4fbe92f0b65..8e7983e7c65 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/EventListener/ImagesRemoveListenerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/EventListener/ImagesRemoveListenerSpec.php
@@ -43,7 +43,7 @@ function it_saves_scheduled_entity_deletions_images_paths(
EntityManagerInterface $entityManager,
UnitOfWork $unitOfWork,
ImageInterface $image,
- ProductInterface $product
+ ProductInterface $product,
): void {
$event->getEntityManager()->willReturn($entityManager);
$entityManager->getUnitOfWork()->willReturn($unitOfWork);
@@ -64,7 +64,7 @@ function it_removes_saved_images_paths(
UnitOfWork $unitOfWork,
ImageInterface $image,
ProductInterface $product,
- FilterConfiguration $filterConfiguration
+ FilterConfiguration $filterConfiguration,
): void {
$onFlushEvent->getEntityManager()->willReturn($entityManager);
$entityManager->getUnitOfWork()->willReturn($unitOfWork);
@@ -94,7 +94,7 @@ function it_removes_saved_images_paths_from_both_filesystem_and_service_property
UnitOfWork $unitOfWork,
ImageInterface $image,
ProductInterface $product,
- FilterConfiguration $filterConfiguration
+ FilterConfiguration $filterConfiguration,
): void {
$onFlushEvent->getEntityManager()->willReturn($entityManager);
$entityManager->getUnitOfWork()->willReturn($unitOfWork);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/EventListener/ImagesUploadListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/EventListener/ImagesUploadListenerSpec.php
index 80abd9d3788..1db3182e8b5 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/EventListener/ImagesUploadListenerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/EventListener/ImagesUploadListenerSpec.php
@@ -31,7 +31,7 @@ function it_uses_image_uploader_to_upload_images(
GenericEvent $event,
ImagesAwareInterface $subject,
ImageInterface $image,
- ImageUploaderInterface $uploader
+ ImageUploaderInterface $uploader,
): void {
$event->getSubject()->willReturn($subject);
$subject->getImages()->willReturn(new ArrayCollection([$image->getWrappedObject()]));
@@ -44,7 +44,7 @@ function it_uses_image_uploader_to_upload_images(
function it_throws_exception_if_event_subject_is_not_an_image_aware(
GenericEvent $event,
- \stdClass $object
+ \stdClass $object,
): void {
$event->getSubject()->willReturn($object);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/EventListener/LockingListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/EventListener/LockingListenerSpec.php
index b28f130ad0c..a4061f552e9 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/EventListener/LockingListenerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/EventListener/LockingListenerSpec.php
@@ -30,7 +30,7 @@ function let(EntityManagerInterface $manager, ProductVariantResolverInterface $v
function it_locks_versioned_entity(
EntityManagerInterface $manager,
GenericEvent $event,
- VersionedInterface $subject
+ VersionedInterface $subject,
): void {
$event->getSubject()->willReturn($subject);
$subject->getVersion()->willReturn(7);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/EventListener/MailerListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/EventListener/MailerListenerSpec.php
index 44d909ad9cb..95127034edd 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/EventListener/MailerListenerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/EventListener/MailerListenerSpec.php
@@ -31,7 +31,7 @@ function let(
SenderInterface $emailSender,
ChannelContextInterface $channelContext,
LocaleContextInterface $localeContext,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$this->beConstructedWith($emailSender, $channelContext, $localeContext);
@@ -41,7 +41,7 @@ function let(
function it_throws_an_exception_if_event_subject_is_not_a_customer_instance_sending_confirmation(
GenericEvent $event,
- \stdClass $customer
+ \stdClass $customer,
): void {
$event->getSubject()->willReturn($customer);
@@ -51,7 +51,7 @@ function it_throws_an_exception_if_event_subject_is_not_a_customer_instance_send
function it_does_not_send_the_email_confirmation_if_the_customer_user_is_null(
SenderInterface $emailSender,
GenericEvent $event,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$event->getSubject()->willReturn($customer);
$customer->getUser()->willReturn(null);
@@ -65,7 +65,7 @@ function it_does_not_send_the_email_registration_if_the_customer_user_does_not_h
SenderInterface $emailSender,
GenericEvent $event,
CustomerInterface $customer,
- ShopUserInterface $user
+ ShopUserInterface $user,
): void {
$event->getSubject()->willReturn($customer);
$customer->getUser()->willReturn($user);
@@ -81,7 +81,7 @@ function it_sends_an_email_registration_successfully(
ChannelInterface $channel,
GenericEvent $event,
CustomerInterface $customer,
- ShopUserInterface $user
+ ShopUserInterface $user,
): void {
$event->getSubject()->willReturn($customer);
$customer->getUser()->willReturn($user);
@@ -102,7 +102,7 @@ function it_send_password_reset_token_mail(
SenderInterface $emailSender,
ChannelInterface $channel,
GenericEvent $event,
- UserInterface $user
+ UserInterface $user,
): void {
$event->getSubject()->willReturn($user);
@@ -121,7 +121,7 @@ function it_send_password_reset_pin_mail(
SenderInterface $emailSender,
ChannelInterface $channel,
GenericEvent $event,
- UserInterface $user
+ UserInterface $user,
): void {
$event->getSubject()->willReturn($user);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/EventListener/OrderRecalculationListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/EventListener/OrderRecalculationListenerSpec.php
index 46fd97ad595..c930f669f71 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/EventListener/OrderRecalculationListenerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/EventListener/OrderRecalculationListenerSpec.php
@@ -28,7 +28,7 @@ function let(OrderProcessorInterface $orderProcessor): void
function it_uses_order_processor_to_recalculate_order(
OrderProcessorInterface $orderProcessor,
GenericEvent $event,
- OrderInterface $order
+ OrderInterface $order,
): void {
$event->getSubject()->willReturn($order);
$orderProcessor->process($order)->shouldBeCalled();
diff --git a/src/Sylius/Bundle/CoreBundle/spec/EventListener/PasswordUpdaterListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/EventListener/PasswordUpdaterListenerSpec.php
index 19211c623ab..af0421efeb0 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/EventListener/PasswordUpdaterListenerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/EventListener/PasswordUpdaterListenerSpec.php
@@ -30,7 +30,7 @@ function it_updates_password_for_customer(
PasswordUpdaterInterface $passwordUpdater,
GenericEvent $event,
UserInterface $user,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$event->getSubject()->willReturn($customer);
$customer->getUser()->willReturn($user);
@@ -43,7 +43,7 @@ function it_updates_password_for_customer(
function it_does_not_update_password_if_subject_is_not_instance_of_customer_interface(
GenericEvent $event,
- UserInterface $user
+ UserInterface $user,
): void {
$event->getSubject()->willReturn($user);
@@ -53,7 +53,7 @@ function it_does_not_update_password_if_subject_is_not_instance_of_customer_inte
function it_does_not_update_password_if_customer_does_not_have_user(
PasswordUpdaterInterface $passwordUpdater,
GenericEvent $event,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$event->getSubject()->willReturn($customer);
$customer->getUser()->willReturn(null);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/EventListener/ReviewCreateListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/EventListener/ReviewCreateListenerSpec.php
index f0def82120e..cf60df33b1a 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/EventListener/ReviewCreateListenerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/EventListener/ReviewCreateListenerSpec.php
@@ -30,7 +30,7 @@ function it_adds_currently_logged_customer_as_author_to_newly_created_review_if_
CustomerContextInterface $customerContext,
CustomerInterface $customer,
GenericEvent $event,
- ReviewInterface $review
+ ReviewInterface $review,
): void {
$event->getSubject()->willReturn($review);
$customerContext->getCustomer()->willReturn($customer);
@@ -55,7 +55,7 @@ function it_does_nothing_if_review_already_has_author(
CustomerContextInterface $customerContext,
CustomerInterface $existingAuthor,
GenericEvent $event,
- ReviewInterface $review
+ ReviewInterface $review,
): void {
$event->getSubject()->willReturn($review);
$review->getAuthor()->willReturn($existingAuthor);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/EventListener/SimpleProductLockingListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/EventListener/SimpleProductLockingListenerSpec.php
index b9858b11356..8088da53839 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/EventListener/SimpleProductLockingListenerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/EventListener/SimpleProductLockingListenerSpec.php
@@ -32,7 +32,7 @@ function it_locks_variant_of_a_simple_product_entity(
EntityManagerInterface $manager,
GenericEvent $event,
ProductInterface $product,
- ProductVariantInterface $productVariant
+ ProductVariantInterface $productVariant,
): void {
$event->getSubject()->willReturn($product);
$product->isSimple()->willReturn(true);
@@ -46,7 +46,7 @@ function it_locks_variant_of_a_simple_product_entity(
function it_does_not_lock_variant_of_a_configurable_product_entity(
GenericEvent $event,
- ProductInterface $product
+ ProductInterface $product,
): void {
$event->getSubject()->willReturn($product);
$product->isSimple()->willReturn(false);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/EventListener/TaxonDeletionListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/EventListener/TaxonDeletionListenerSpec.php
index b44886e6cde..240852f2316 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/EventListener/TaxonDeletionListenerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/EventListener/TaxonDeletionListenerSpec.php
@@ -28,13 +28,13 @@ function let(
SessionInterface $session,
ChannelRepositoryInterface $channelRepository,
TaxonAwareRuleUpdaterInterface $hasTaxonRuleUpdater,
- TaxonAwareRuleUpdaterInterface $totalOfItemsFromTaxonRuleUpdater
+ TaxonAwareRuleUpdaterInterface $totalOfItemsFromTaxonRuleUpdater,
): void {
$this->beConstructedWith(
$session,
$channelRepository,
$hasTaxonRuleUpdater,
- $totalOfItemsFromTaxonRuleUpdater
+ $totalOfItemsFromTaxonRuleUpdater,
);
}
@@ -44,7 +44,7 @@ function it_does_not_allow_to_remove_taxon_if_any_channel_has_it_as_a_menu_taxon
GenericEvent $event,
TaxonInterface $taxon,
ChannelInterface $channel,
- FlashBagInterface $flashes
+ FlashBagInterface $flashes,
): void {
$event->getSubject()->willReturn($taxon);
@@ -62,7 +62,7 @@ function it_does_nothing_if_taxon_is_not_a_menu_taxon_of_any_channel(
ChannelRepositoryInterface $channelRepository,
GenericEvent $event,
TaxonInterface $taxon,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$event->getSubject()->willReturn($taxon);
@@ -88,7 +88,7 @@ function it_adds_flash_that_promotions_have_been_updated(
TaxonAwareRuleUpdaterInterface $totalOfItemsFromTaxonRuleUpdater,
FlashBagInterface $flashes,
GenericEvent $event,
- TaxonInterface $taxon
+ TaxonInterface $taxon,
): void {
$event->getSubject()->willReturn($taxon);
@@ -112,7 +112,7 @@ function it_does_nothing_if_no_promotion_has_been_updated(
TaxonAwareRuleUpdaterInterface $hasTaxonRuleUpdater,
TaxonAwareRuleUpdaterInterface $totalOfItemsFromTaxonRuleUpdater,
GenericEvent $event,
- TaxonInterface $taxon
+ TaxonInterface $taxon,
): void {
$event->getSubject()->willReturn($taxon);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Fixture/Factory/TaxonExampleFactorySpec.php b/src/Sylius/Bundle/CoreBundle/spec/Fixture/Factory/TaxonExampleFactorySpec.php
index 1707197765d..e0fc815da49 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Fixture/Factory/TaxonExampleFactorySpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Fixture/Factory/TaxonExampleFactorySpec.php
@@ -29,7 +29,7 @@ function let(
FactoryInterface $taxonFactory,
TaxonRepositoryInterface $taxonRepository,
RepositoryInterface $localeRepository,
- TaxonSlugGeneratorInterface $taxonSlugGenerator
+ TaxonSlugGeneratorInterface $taxonSlugGenerator,
) {
$this->beConstructedWith($taxonFactory, $taxonRepository, $localeRepository, $taxonSlugGenerator);
}
@@ -43,7 +43,7 @@ function it_creates_translations_for_each_defined_locales(
FactoryInterface $taxonFactory,
RepositoryInterface $localeRepository,
Locale $locale,
- TaxonInterface $taxon
+ TaxonInterface $taxon,
) {
$taxonFactory->createNew()->willReturn($taxon);
$localeRepository->findAll()->willReturn([$locale]);
@@ -66,7 +66,7 @@ function it_creates_translations_for_each_custom_translations(
FactoryInterface $taxonFactory,
RepositoryInterface $localeRepository,
Locale $locale,
- TaxonInterface $taxon
+ TaxonInterface $taxon,
) {
$taxonFactory->createNew()->willReturn($taxon);
$localeRepository->findAll()->willReturn([$locale]);
@@ -101,7 +101,7 @@ function it_replaces_existing_translations_for_each_custom_translations(
FactoryInterface $taxonFactory,
RepositoryInterface $localeRepository,
Locale $locale,
- TaxonInterface $taxon
+ TaxonInterface $taxon,
) {
$taxonFactory->createNew()->willReturn($taxon);
$localeRepository->findAll()->willReturn([$locale]);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Fixture/GeographicalFixtureSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Fixture/GeographicalFixtureSpec.php
index d035b0fe679..6e781814f92 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Fixture/GeographicalFixtureSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Fixture/GeographicalFixtureSpec.php
@@ -30,7 +30,7 @@ function let(
FactoryInterface $provinceFactory,
ObjectManager $provinceManager,
ZoneFactoryInterface $zoneFactory,
- ObjectManager $zoneManager
+ ObjectManager $zoneManager,
): void {
$this->beConstructedWith(
$countryFactory,
@@ -38,7 +38,7 @@ function let(
$provinceFactory,
$provinceManager,
$zoneFactory,
- $zoneManager
+ $zoneManager,
);
}
@@ -50,7 +50,7 @@ function it_is_a_fixture(): void
function it_creates_and_persist_a_country(
FactoryInterface $countryFactory,
ObjectManager $countryManager,
- CountryInterface $country
+ CountryInterface $country,
): void {
$countryFactory->createNew()->willReturn($country);
$country->setCode('PL')->shouldBeCalled();
@@ -68,7 +68,7 @@ function it_creates_and_persist_a_country_province(
FactoryInterface $provinceFactory,
ObjectManager $provinceManager,
CountryInterface $country,
- ProvinceInterface $province
+ ProvinceInterface $province,
): void {
$countryFactory->createNew()->willReturn($country);
$country->setCode('PL')->shouldBeCalled();
@@ -100,7 +100,7 @@ function it_creates_and_persist_a_country_and_a_zone_containing_it(
ZoneFactoryInterface $zoneFactory,
ObjectManager $zoneManager,
CountryInterface $country,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$countryFactory->createNew()->willReturn($country);
$country->setCode('PL')->shouldBeCalled();
@@ -133,7 +133,7 @@ function it_creates_and_persist_a_country_and_a_zone_with_scope_containing_it(
ZoneFactoryInterface $zoneFactory,
ObjectManager $zoneManager,
CountryInterface $country,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$countryFactory->createNew()->willReturn($country);
$country->setCode('PL')->shouldBeCalled();
@@ -171,7 +171,7 @@ function it_creates_and_persist_a_country_province_and_a_zone_containing_it(
ObjectManager $zoneManager,
CountryInterface $country,
ProvinceInterface $province,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$countryFactory->createNew()->willReturn($country);
$country->setCode('PL')->shouldBeCalled();
@@ -213,7 +213,7 @@ function it_creates_and_persist_a_country_type_zone_and_a_zone_containing_it(
ObjectManager $zoneManager,
CountryInterface $country,
ZoneInterface $countryTypeZone,
- ZoneInterface $zoneTypeZone
+ ZoneInterface $zoneTypeZone,
): void {
$countryFactory->createNew()->willReturn($country);
$country->setCode('PL')->shouldBeCalled();
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Fixture/LocaleFixtureSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Fixture/LocaleFixtureSpec.php
index 73f08b50d10..b53ab2985cd 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Fixture/LocaleFixtureSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Fixture/LocaleFixtureSpec.php
@@ -35,7 +35,7 @@ function it_loads_all_provided_locales(
FactoryInterface $localeFactory,
ObjectManager $localeManager,
LocaleInterface $germanLocale,
- LocaleInterface $englishLocale
+ LocaleInterface $englishLocale,
): void {
$localeFactory->createNew()->willReturn($englishLocale, $germanLocale);
@@ -55,7 +55,7 @@ function it_loads_all_provided_locales_and_the_default_one(
ObjectManager $localeManager,
LocaleInterface $defaultLocale,
LocaleInterface $germanLocale,
- LocaleInterface $englishLocale
+ LocaleInterface $englishLocale,
): void {
$localeFactory->createNew()->willReturn($defaultLocale, $englishLocale, $germanLocale);
@@ -75,7 +75,7 @@ function it_loads_all_provided_locales_and_the_default_one(
function it_allows_to_load_default_locale_and_specify_it_explicitly(
FactoryInterface $localeFactory,
ObjectManager $localeManager,
- LocaleInterface $defaultLocale
+ LocaleInterface $defaultLocale,
): void {
$localeFactory->createNew()->willReturn($defaultLocale);
@@ -91,7 +91,7 @@ function it_allows_to_load_default_locale_and_specify_it_explicitly(
function it_creates_and_persists_default_locale(
FactoryInterface $localeFactory,
ObjectManager $localeManager,
- LocaleInterface $defaultLocale
+ LocaleInterface $defaultLocale,
): void {
$localeFactory->createNew()->willReturn($defaultLocale);
@@ -108,7 +108,7 @@ function it_creates_and_persists_default_locale_and_other_specified_locales(
FactoryInterface $localeFactory,
ObjectManager $localeManager,
LocaleInterface $defaultLocale,
- LocaleInterface $polishLocale
+ LocaleInterface $polishLocale,
): void {
$localeFactory->createNew()->willReturn($defaultLocale, $polishLocale);
@@ -127,7 +127,7 @@ function it_deduplicates_passed_locales_and_the_default_one(
FactoryInterface $localeFactory,
ObjectManager $localeManager,
LocaleInterface $defaultLocale,
- LocaleInterface $polishLocale
+ LocaleInterface $polishLocale,
): void {
$localeFactory->createNew()->willReturn($defaultLocale, $polishLocale);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Form/DataTransformer/ProductTaxonToTaxonTransformerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Form/DataTransformer/ProductTaxonToTaxonTransformerSpec.php
index b5803463676..4d26e413967 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Form/DataTransformer/ProductTaxonToTaxonTransformerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Form/DataTransformer/ProductTaxonToTaxonTransformerSpec.php
@@ -36,7 +36,7 @@ function it_implements_data_transformer_interface(): void
function it_transforms_product_taxon_to_taxon(
ProductTaxonInterface $productTaxon,
- TaxonInterface $taxon
+ TaxonInterface $taxon,
): void {
$productTaxon->getTaxon()->willReturn($taxon);
@@ -53,7 +53,7 @@ function it_transforms_taxon_to_new_product_taxon(
RepositoryInterface $productTaxonRepository,
ProductInterface $product,
ProductTaxonInterface $productTaxon,
- TaxonInterface $taxon
+ TaxonInterface $taxon,
): void {
$productTaxonRepository->findOneBy(['taxon' => $taxon, 'product' => $product])->willReturn(null);
$productTaxonFactory->createNew()->willReturn($productTaxon);
@@ -67,7 +67,7 @@ function it_transforms_taxon_to_existing_product_taxon(
RepositoryInterface $productTaxonRepository,
ProductTaxonInterface $productTaxon,
ProductInterface $product,
- TaxonInterface $taxon
+ TaxonInterface $taxon,
): void {
$productTaxonRepository->findOneBy(['taxon' => $taxon, 'product' => $product])->willReturn($productTaxon);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Form/DataTransformer/ProductsToCodesTransformerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Form/DataTransformer/ProductsToCodesTransformerSpec.php
index c28b56d5d96..58164c1fb4a 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Form/DataTransformer/ProductsToCodesTransformerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Form/DataTransformer/ProductsToCodesTransformerSpec.php
@@ -34,7 +34,7 @@ function it_implements_data_transformer_interface(): void
function it_transforms_array_of_products_codes_to_products_collection(
ProductRepositoryInterface $productRepository,
ProductInterface $bow,
- ProductInterface $sword
+ ProductInterface $sword,
): void {
$productRepository->findBy(['code' => ['bow', 'sword']])->willReturn([$bow, $sword]);
@@ -43,7 +43,7 @@ function it_transforms_array_of_products_codes_to_products_collection(
function it_transforms_only_existing_products(
ProductRepositoryInterface $productRepository,
- ProductInterface $bow
+ ProductInterface $bow,
): void {
$productRepository->findBy(['code' => ['bow', 'sword']])->willReturn([$bow]);
@@ -65,7 +65,7 @@ function it_throws_exception_if_value_to_transform_is_not_array(): void
function it_reverse_transforms_into_array_of_products_codes(
ProductInterface $axes,
- ProductInterface $shields
+ ProductInterface $shields,
): void {
$axes->getCode()->willReturn('axes');
$shields->getCode()->willReturn('shields');
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Form/DataTransformer/TaxonsToCodesTransformerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Form/DataTransformer/TaxonsToCodesTransformerSpec.php
index a36835c5bd8..c2cb5a23774 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Form/DataTransformer/TaxonsToCodesTransformerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Form/DataTransformer/TaxonsToCodesTransformerSpec.php
@@ -34,7 +34,7 @@ function it_implements_data_transformer_interface(): void
function it_transforms_array_of_taxons_codes_to_taxons_collection(
TaxonRepositoryInterface $taxonRepository,
TaxonInterface $bows,
- TaxonInterface $swords
+ TaxonInterface $swords,
): void {
$taxonRepository->findBy(['code' => ['bows', 'swords']])->willReturn([$bows, $swords]);
@@ -43,7 +43,7 @@ function it_transforms_array_of_taxons_codes_to_taxons_collection(
function it_transforms_only_existing_taxons(
TaxonRepositoryInterface $taxonRepository,
- TaxonInterface $bows
+ TaxonInterface $bows,
): void {
$taxonRepository->findBy(['code' => ['bows', 'swords']])->willReturn([$bows]);
@@ -65,7 +65,7 @@ function it_throws_exception_if_value_to_transform_is_not_array(): void
function it_reverse_transforms_into_array_of_taxons_codes(
TaxonInterface $axes,
- TaxonInterface $shields
+ TaxonInterface $shields,
): void {
$axes->getCode()->willReturn('axes');
$shields->getCode()->willReturn('shields');
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Form/EventSubscriber/AddBaseCurrencySubscriberSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Form/EventSubscriber/AddBaseCurrencySubscriberSpec.php
index dc3b184c3bf..8b43e011180 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Form/EventSubscriber/AddBaseCurrencySubscriberSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Form/EventSubscriber/AddBaseCurrencySubscriberSpec.php
@@ -37,7 +37,7 @@ function it_subscribes_to_event(): void
function it_sets_base_currency_as_disabled_when_channel_is_not_new(
FormEvent $event,
ChannelInterface $channel,
- FormInterface $form
+ FormInterface $form,
): void {
$event->getData()->willReturn($channel);
$event->getForm()->willReturn($form);
@@ -55,7 +55,7 @@ function it_sets_base_currency_as_disabled_when_channel_is_not_new(
function it_does_not_set_base_currency_as_enabled_when_channel_is_new(
FormEvent $event,
ChannelInterface $channel,
- FormInterface $form
+ FormInterface $form,
): void {
$event->getData()->willReturn($channel);
$event->getForm()->willReturn($form);
@@ -72,7 +72,7 @@ function it_does_not_set_base_currency_as_enabled_when_channel_is_new(
function it_throws_unexpected_type_exception_when_resource_does_not_implements_channel_interface(
FormEvent $event,
- $resource
+ $resource,
): void {
$event->getData()->willReturn($resource);
$this->shouldThrow(UnexpectedTypeException::class)->during('preSetData', [$event]);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Form/EventSubscriber/AddUserFormSubscriberSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Form/EventSubscriber/AddUserFormSubscriberSpec.php
index 68f68ea39aa..7ee911cabdb 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Form/EventSubscriber/AddUserFormSubscriberSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Form/EventSubscriber/AddUserFormSubscriberSpec.php
@@ -35,7 +35,7 @@ function it_is_event_subscriber_instance(): void
function it_adds_user_form_type_and_create_user_check(
FormEvent $event,
- Form $form
+ Form $form,
): void {
$event->getForm()->willReturn($form);
@@ -50,7 +50,7 @@ function it_replaces_user_form_by_new_user_form_when_create_user_check_is_not_ch
Form $form,
Form $createUserCheckForm,
UserAwareInterface $customer,
- UserInterface $user
+ UserInterface $user,
): void {
$event->getData()->willReturn($customer);
$event->getForm()->willReturn($form);
@@ -75,7 +75,7 @@ function it_does_not_replace_user_form_by_new_user_form_when_create_user_check_i
Form $form,
Form $createUserCheckForm,
UserAwareInterface $customer,
- UserInterface $user
+ UserInterface $user,
): void {
$event->getData()->willReturn($customer);
$event->getForm()->willReturn($form);
@@ -100,7 +100,7 @@ function it_does_not_replace_user_form_by_new_user_form_when_user_has_an_id(
Form $form,
Form $createUserCheckForm,
UserAwareInterface $customer,
- UserInterface $user
+ UserInterface $user,
): void {
$event->getData()->willReturn($customer);
$event->getForm()->willReturn($form);
@@ -124,7 +124,7 @@ function it_throws_invalid_argument_exception_when_data_does_not_implement_user_
FormEvent $event,
Form $form,
Form $createUserCheckForm,
- UserInterface $user
+ UserInterface $user,
): void {
$event->getData()->willReturn($user);
$event->getForm()->willReturn($form);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Form/EventSubscriber/CustomerRegistrationFormSubscriberSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Form/EventSubscriber/CustomerRegistrationFormSubscriberSpec.php
index 912040f239a..0055d2cdef1 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Form/EventSubscriber/CustomerRegistrationFormSubscriberSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Form/EventSubscriber/CustomerRegistrationFormSubscriberSpec.php
@@ -45,7 +45,7 @@ function it_sets_user_for_existing_customer(
CustomerInterface $customer,
RepositoryInterface $customerRepository,
CustomerInterface $existingCustomer,
- ShopUserInterface $user
+ ShopUserInterface $user,
): void {
$event->getForm()->willReturn($form);
$form->getData()->willReturn($customer);
@@ -65,7 +65,7 @@ function it_sets_user_for_existing_customer(
function it_throws_unexpected_type_exception_if_data_is_not_customer_type(
FormEvent $event,
FormInterface $form,
- ShopUserInterface $user
+ ShopUserInterface $user,
): void {
$event->getForm()->willReturn($form);
$form->getData()->willReturn($user);
@@ -80,7 +80,7 @@ function it_does_not_set_user_if_customer_with_given_email_has_set_user(
CustomerInterface $customer,
RepositoryInterface $customerRepository,
CustomerInterface $existingCustomer,
- ShopUserInterface $user
+ ShopUserInterface $user,
): void {
$event->getForm()->willReturn($form);
$form->getData()->willReturn($customer);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Installer/Executor/CommandExecutorSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Installer/Executor/CommandExecutorSpec.php
index 25928df7cb8..8c23ba46bfc 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Installer/Executor/CommandExecutorSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Installer/Executor/CommandExecutorSpec.php
@@ -60,7 +60,7 @@ function it_should_preserve_the_current_value_of_interactive_option(InputInterfa
'--no-debug' => true,
'--env' => 'dev',
'--verbose' => true,
- ]
+ ],
);
$application->setAutoExit(false)->shouldBeCalled();
@@ -103,7 +103,7 @@ function it_should_use_passed_options_rather_than_default_params(InputInterface
'--env' => 'dev',
'--no-interaction' => true,
'--verbose' => true,
- ]
+ ],
);
$application->setAutoExit(false)->shouldBeCalled();
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Mailer/OrderEmailManagerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Mailer/OrderEmailManagerSpec.php
index bb50f7b9fe4..151f10002f5 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Mailer/OrderEmailManagerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Mailer/OrderEmailManagerSpec.php
@@ -36,7 +36,7 @@ function it_sends_an_order_confirmation_email(
SenderInterface $sender,
OrderInterface $order,
ChannelInterface $channel,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$order->getChannel()->willReturn($channel);
$order->getLocaleCode()->willReturn('en_US');
diff --git a/src/Sylius/Bundle/CoreBundle/spec/OAuth/UserProviderSpec.php b/src/Sylius/Bundle/CoreBundle/spec/OAuth/UserProviderSpec.php
index bc7c97c085c..023c86689e7 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/OAuth/UserProviderSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/OAuth/UserProviderSpec.php
@@ -43,7 +43,7 @@ function let(
RepositoryInterface $oauthRepository,
ObjectManager $userManager,
CanonicalizerInterface $canonicalizer,
- CustomerRepositoryInterface $customerRepository
+ CustomerRepositoryInterface $customerRepository,
): void {
$this->beConstructedWith(
ShopUser::class,
@@ -54,7 +54,7 @@ function let(
$oauthRepository,
$userManager,
$canonicalizer,
- $customerRepository
+ $customerRepository,
);
}
@@ -74,7 +74,7 @@ function it_should_connect_oauth_account_with_given_user(
ShopUserInterface $user,
UserResponseInterface $response,
ResourceOwnerInterface $resourceOwner,
- UserOAuthInterface $oauth
+ UserOAuthInterface $oauth,
): void {
$resourceOwner->getName()->willReturn('google');
@@ -104,7 +104,7 @@ function it_should_return_user_if_relation_exists(
ShopUserInterface $user,
UserOAuthInterface $oauth,
UserResponseInterface $response,
- ResourceOwnerInterface $resourceOwner
+ ResourceOwnerInterface $resourceOwner,
): void {
$resourceOwner->getName()->willReturn('google');
@@ -125,7 +125,7 @@ function it_should_update_user_when_he_was_found_by_email(
ShopUserInterface $user,
UserResponseInterface $response,
ResourceOwnerInterface $resourceOwner,
- UserOAuthInterface $oauth
+ UserOAuthInterface $oauth,
): void {
$resourceOwner->getName()->willReturn('google');
@@ -163,7 +163,7 @@ function it_should_create_new_user_when_none_was_found(
ShopUserInterface $user,
UserResponseInterface $response,
ResourceOwnerInterface $resourceOwner,
- UserOAuthInterface $oauth
+ UserOAuthInterface $oauth,
): void {
$resourceOwner->getName()->willReturn('google');
@@ -211,7 +211,7 @@ function it_should_throw_exception_when_no_email_was_provided(
ShopUserInterface $user,
UserResponseInterface $response,
ResourceOwnerInterface $resourceOwner,
- UserOAuthInterface $oauth
+ UserOAuthInterface $oauth,
): void {
$response->getResourceOwner()->willReturn($resourceOwner);
$resourceOwner->getName()->willReturn('google');
@@ -227,7 +227,7 @@ function it_should_throw_exception_when_no_email_was_provided(
}
function it_should_throw_exception_when_unsupported_user_is_used(
- UserInterface $user
+ UserInterface $user,
): void {
$this->shouldThrow(UnsupportedUserException::class)->during('refreshUser', [$user]);
}
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Order/NumberGenerator/SequentialOrderNumberGeneratorSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Order/NumberGenerator/SequentialOrderNumberGeneratorSpec.php
index 9e8ce63fec2..46ff878509b 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Order/NumberGenerator/SequentialOrderNumberGeneratorSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Order/NumberGenerator/SequentialOrderNumberGeneratorSpec.php
@@ -27,7 +27,7 @@ final class SequentialOrderNumberGeneratorSpec extends ObjectBehavior
function let(
EntityRepository $sequenceRepository,
FactoryInterface $sequenceFactory,
- EntityManagerInterface $sequenceManager
+ EntityManagerInterface $sequenceManager,
): void {
$this->beConstructedWith($sequenceRepository, $sequenceFactory, $sequenceManager);
}
@@ -41,7 +41,7 @@ function it_generates_an_order_number(
EntityRepository $sequenceRepository,
EntityManagerInterface $sequenceManager,
OrderSequenceInterface $sequence,
- OrderInterface $order
+ OrderInterface $order,
): void {
$sequence->getIndex()->willReturn(6);
$sequence->getVersion()->willReturn(7);
@@ -59,7 +59,7 @@ function it_generates_an_order_number_when_sequence_is_null(
FactoryInterface $sequenceFactory,
EntityManagerInterface $sequenceManager,
OrderSequenceInterface $sequence,
- OrderInterface $order
+ OrderInterface $order,
): void {
$sequence->getIndex()->willReturn(0);
$sequence->getVersion()->willReturn(1);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Provider/ChannelBasedDefaultTaxZoneProviderSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Provider/ChannelBasedDefaultTaxZoneProviderSpec.php
index bffc22414ae..ce62e279329 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Provider/ChannelBasedDefaultTaxZoneProviderSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Provider/ChannelBasedDefaultTaxZoneProviderSpec.php
@@ -29,7 +29,7 @@ function it_implements_default_tax_zone_provider_interface(): void
function it_provides_default_tax_zone_from_order_channel(
ChannelInterface $channel,
OrderInterface $order,
- ZoneInterface $defaultTaxZone
+ ZoneInterface $defaultTaxZone,
): void {
$order->getChannel()->willReturn($channel);
$channel->getDefaultTaxZone()->willReturn($defaultTaxZone);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Remover/ReviewerReviewsRemoverSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Remover/ReviewerReviewsRemoverSpec.php
index 158fa5f60c6..0a5e6cba085 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Remover/ReviewerReviewsRemoverSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Remover/ReviewerReviewsRemoverSpec.php
@@ -27,7 +27,7 @@ final class ReviewerReviewsRemoverSpec extends ObjectBehavior
function let(
EntityRepository $reviewRepository,
ObjectManager $reviewManager,
- ReviewableRatingUpdaterInterface $averageRatingUpdater
+ ReviewableRatingUpdaterInterface $averageRatingUpdater,
): void {
$this->beConstructedWith($reviewRepository, $reviewManager, $averageRatingUpdater);
}
@@ -43,7 +43,7 @@ function it_removes_soft_deleted_customer_reviews_and_recalculates_their_product
$reviewManager,
ReviewerInterface $author,
ReviewableInterface $reviewSubject,
- ReviewInterface $review
+ ReviewInterface $review,
): void {
$reviewRepository->findBy(['author' => $author])->willReturn([$review]);
$review->getReviewSubject()->willReturn($reviewSubject);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/SectionResolver/UriBasedSectionProviderSpec.php b/src/Sylius/Bundle/CoreBundle/spec/SectionResolver/UriBasedSectionProviderSpec.php
index 469d18c99f7..0046541ea22 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/SectionResolver/UriBasedSectionProviderSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/SectionResolver/UriBasedSectionProviderSpec.php
@@ -26,7 +26,7 @@ final class UriBasedSectionProviderSpec extends ObjectBehavior
function let(
RequestStack $requestStack,
UriBasedSectionResolverInterface $firstSectionResolver,
- UriBasedSectionResolverInterface $secondSectionResolver
+ UriBasedSectionResolverInterface $secondSectionResolver,
): void {
$this->beConstructedWith($requestStack, [$firstSectionResolver, $secondSectionResolver]);
}
@@ -40,7 +40,7 @@ function it_resolves_first_section_based_on_injected_resolvers(
RequestStack $requestStack,
Request $request,
UriBasedSectionResolverInterface $firstSectionResolver,
- SectionInterface $section
+ SectionInterface $section,
): void {
$requestStack->getMasterRequest()->willReturn($request);
@@ -56,7 +56,7 @@ function it_resolves_second_section_if_first_will_throw_an_exception(
Request $request,
UriBasedSectionResolverInterface $firstSectionResolver,
UriBasedSectionResolverInterface $secondSectionResolver,
- SectionInterface $section
+ SectionInterface $section,
): void {
$requestStack->getMasterRequest()->willReturn($request);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Storage/CartSessionStorageSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Storage/CartSessionStorageSpec.php
index 52c2db0125e..60931f6d303 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Storage/CartSessionStorageSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Storage/CartSessionStorageSpec.php
@@ -46,7 +46,7 @@ function it_returns_a_cart_from_a_session(
SessionInterface $session,
OrderRepositoryInterface $orderRepository,
ChannelInterface $channel,
- OrderInterface $cart
+ OrderInterface $cart,
): void {
$channel->getCode()->willReturn('channel_code');
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Taxation/Strategy/TaxCalculationStrategySpec.php b/src/Sylius/Bundle/CoreBundle/spec/Taxation/Strategy/TaxCalculationStrategySpec.php
index ca7f523d239..6552b505ea6 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Taxation/Strategy/TaxCalculationStrategySpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Taxation/Strategy/TaxCalculationStrategySpec.php
@@ -24,7 +24,7 @@ final class TaxCalculationStrategySpec extends ObjectBehavior
{
function let(
OrderTaxesApplicatorInterface $applicatorOne,
- OrderTaxesApplicatorInterface $applicatorTwo
+ OrderTaxesApplicatorInterface $applicatorTwo,
): void {
$this->beConstructedWith('order_items_based', [$applicatorOne, $applicatorTwo]);
}
@@ -42,7 +42,7 @@ function it_has_a_type(): void
function it_throws_an_exception_if_any_of_the_applicators_are_not_of_the_correct_type(
OrderTaxesApplicatorInterface $applicatorOne,
OrderTaxesApplicatorInterface $applicatorTwo,
- \stdClass $applicatorThree
+ \stdClass $applicatorThree,
): void {
$this->beConstructedWith('order_items_based', [$applicatorOne, $applicatorTwo, $applicatorThree]);
@@ -52,7 +52,7 @@ function it_throws_an_exception_if_any_of_the_applicators_are_not_of_the_correct
function it_can_be_supported_when_the_tax_calculation_strategy_from_order_channel_matches_the_strategy_type(
ChannelInterface $channel,
OrderInterface $order,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$order->getChannel()->willReturn($channel);
$channel->getTaxCalculationStrategy()->willReturn('order_items_based');
@@ -63,7 +63,7 @@ function it_can_be_supported_when_the_tax_calculation_strategy_from_order_channe
function it_cannot_be_supported_when_the_tax_calculation_strategy_from_order_channel_does_not_match_the_strategy_type(
ChannelInterface $channel,
OrderInterface $order,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$order->getChannel()->willReturn($channel);
$channel->getTaxCalculationStrategy()->willReturn('order_item_units_based');
@@ -75,7 +75,7 @@ function it_applies_all_of_the_applicators(
OrderTaxesApplicatorInterface $applicatorOne,
OrderTaxesApplicatorInterface $applicatorTwo,
OrderInterface $order,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$applicatorOne->apply($order, $zone)->shouldBeCalled();
$applicatorTwo->apply($order, $zone)->shouldBeCalled();
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Templating/Helper/CheckoutStepsHelperSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Templating/Helper/CheckoutStepsHelperSpec.php
index 9626de6c08c..7868613fe88 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Templating/Helper/CheckoutStepsHelperSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Templating/Helper/CheckoutStepsHelperSpec.php
@@ -23,11 +23,11 @@ final class CheckoutStepsHelperSpec extends ObjectBehavior
{
function let(
OrderPaymentMethodSelectionRequirementCheckerInterface $orderPaymentMethodSelectionRequirementChecker,
- OrderShippingMethodSelectionRequirementCheckerInterface $orderShippingMethodSelectionRequirementChecker
+ OrderShippingMethodSelectionRequirementCheckerInterface $orderShippingMethodSelectionRequirementChecker,
): void {
$this->beConstructedWith(
$orderPaymentMethodSelectionRequirementChecker,
- $orderShippingMethodSelectionRequirementChecker
+ $orderShippingMethodSelectionRequirementChecker,
);
}
@@ -38,7 +38,7 @@ function it_is_helper(): void
function it_checks_if_order_requires_shipping(
OrderInterface $order,
- OrderShippingMethodSelectionRequirementCheckerInterface $orderShippingMethodSelectionRequirementChecker
+ OrderShippingMethodSelectionRequirementCheckerInterface $orderShippingMethodSelectionRequirementChecker,
): void {
$orderShippingMethodSelectionRequirementChecker->isShippingMethodSelectionRequired($order)->willReturn(true);
@@ -47,7 +47,7 @@ function it_checks_if_order_requires_shipping(
function it_checks_if_order_required_payment(
OrderInterface $order,
- OrderPaymentMethodSelectionRequirementCheckerInterface $orderPaymentMethodSelectionRequirementChecker
+ OrderPaymentMethodSelectionRequirementCheckerInterface $orderPaymentMethodSelectionRequirementChecker,
): void {
$orderPaymentMethodSelectionRequirementChecker->isPaymentMethodSelectionRequired($order)->willReturn(true);
$this->isPaymentRequired($order)->shouldReturn(true);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Templating/Helper/PriceHelperSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Templating/Helper/PriceHelperSpec.php
index b8a72074ee5..46863267c90 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Templating/Helper/PriceHelperSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Templating/Helper/PriceHelperSpec.php
@@ -34,7 +34,7 @@ function it_is_helper(): void
function it_returns_variant_price_for_channel_given_in_context(
ChannelInterface $channel,
ProductVariantInterface $productVariant,
- ProductVariantPricesCalculatorInterface $productVariantPriceCalculator
+ ProductVariantPricesCalculatorInterface $productVariantPriceCalculator,
): void {
$context = ['channel' => $channel];
@@ -45,7 +45,7 @@ function it_returns_variant_price_for_channel_given_in_context(
function it_throws_invalid_argument_exception_when_channel_key_is_not_present_in_context(
ProductVariantInterface $productVariant,
- ProductVariantPricesCalculatorInterface $productVariantPriceCalculator
+ ProductVariantPricesCalculatorInterface $productVariantPriceCalculator,
): void {
$context = ['lennahc' => ''];
@@ -57,7 +57,7 @@ function it_throws_invalid_argument_exception_when_channel_key_is_not_present_in
function it_returns_variant_original_price_for_channel_given_in_context(
ChannelInterface $channel,
ProductVariantInterface $productVariant,
- ProductVariantPricesCalculatorInterface $productVariantPriceCalculator
+ ProductVariantPricesCalculatorInterface $productVariantPriceCalculator,
): void {
$context = ['channel' => $channel];
@@ -68,7 +68,7 @@ function it_returns_variant_original_price_for_channel_given_in_context(
function it_throws_invalid_argument_exception_when_channel_key_is_not_present_in_context_when_getting_original_price(
ProductVariantInterface $productVariant,
- ProductVariantPricesCalculatorInterface $productVariantPriceCalculator
+ ProductVariantPricesCalculatorInterface $productVariantPriceCalculator,
): void {
$context = ['lennahc' => ''];
@@ -80,7 +80,7 @@ function it_throws_invalid_argument_exception_when_channel_key_is_not_present_in
function it_returns_true_if_variant_is_discounted_for_channel_given_in_context(
ChannelInterface $channel,
ProductVariantInterface $productVariant,
- ProductVariantPricesCalculatorInterface $productVariantPriceCalculator
+ ProductVariantPricesCalculatorInterface $productVariantPriceCalculator,
): void {
$context = ['channel' => $channel];
@@ -93,7 +93,7 @@ function it_returns_true_if_variant_is_discounted_for_channel_given_in_context(
function it_returns_false_if_variant_is_not_discounted_for_channel_given_in_context(
ChannelInterface $channel,
ProductVariantInterface $productVariant,
- ProductVariantPricesCalculatorInterface $productVariantPriceCalculator
+ ProductVariantPricesCalculatorInterface $productVariantPriceCalculator,
): void {
$context = ['channel' => $channel];
@@ -105,7 +105,7 @@ function it_returns_false_if_variant_is_not_discounted_for_channel_given_in_cont
function it_throws_invalid_argument_exception_when_channel_key_is_not_present_in_context_when_checking_if_variant_is_discounted(
ProductVariantInterface $productVariant,
- ProductVariantPricesCalculatorInterface $productVariantPriceCalculator
+ ProductVariantPricesCalculatorInterface $productVariantPriceCalculator,
): void {
$context = ['lennahc' => ''];
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Templating/Helper/ProductVariantsPricesHelperSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Templating/Helper/ProductVariantsPricesHelperSpec.php
index d915782b3f3..e7af04fed2d 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Templating/Helper/ProductVariantsPricesHelperSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Templating/Helper/ProductVariantsPricesHelperSpec.php
@@ -34,7 +34,7 @@ function it_is_helper(): void
function it_uses_provider_to_get_variants_prices(
ChannelInterface $channel,
ProductInterface $product,
- ProductVariantsPricesProviderInterface $productVariantsPricesProvider
+ ProductVariantsPricesProviderInterface $productVariantsPricesProvider,
): void {
$productVariantsPricesProvider->provideVariantsPrices($product, $channel)->willReturn([
['color' => 'black', 'value' => 1000],
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Templating/Helper/VariantResolverHelperSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Templating/Helper/VariantResolverHelperSpec.php
index 1c9d2de958d..20d7e22a090 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Templating/Helper/VariantResolverHelperSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Templating/Helper/VariantResolverHelperSpec.php
@@ -32,7 +32,7 @@ function it_is_helper(): void
function it_returns_null_if_product_has_no_variants(
ProductVariantResolverInterface $productVariantResolver,
- ProductInterface $product
+ ProductInterface $product,
) {
$productVariantResolver->getVariant($product)->willReturn(null);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Theme/ChannelBasedThemeContextSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Theme/ChannelBasedThemeContextSpec.php
index efa9813f620..d6cf956aa27 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Theme/ChannelBasedThemeContextSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Theme/ChannelBasedThemeContextSpec.php
@@ -37,7 +37,7 @@ function it_returns_a_theme(
ChannelContextInterface $channelContext,
ThemeRepositoryInterface $themeRepository,
ChannelInterface $channel,
- ThemeInterface $theme
+ ThemeInterface $theme,
): void {
$channelContext->getChannel()->willReturn($channel);
$channel->getThemeName()->willReturn('theme/name');
@@ -49,7 +49,7 @@ function it_returns_a_theme(
function it_returns_null_if_channel_has_no_theme(
ChannelContextInterface $channelContext,
ThemeRepositoryInterface $themeRepository,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$channelContext->getChannel()->willReturn($channel);
$channel->getThemeName()->willReturn(null);
@@ -59,7 +59,7 @@ function it_returns_null_if_channel_has_no_theme(
}
function it_returns_null_if_there_is_no_channel(
- ChannelContextInterface $channelContext
+ ChannelContextInterface $channelContext,
): void {
$channelContext->getChannel()->willThrow(ChannelNotFoundException::class);
@@ -67,7 +67,7 @@ function it_returns_null_if_there_is_no_channel(
}
function it_returns_null_if_any_exception_is_thrown_during_getting_the_channel(
- ChannelContextInterface $channelContext
+ ChannelContextInterface $channelContext,
): void {
$channelContext->getChannel()->willThrow(\Exception::class);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/CartItemAvailabilityValidatorSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/CartItemAvailabilityValidatorSpec.php
index 351990bc9aa..468f460b002 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/CartItemAvailabilityValidatorSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/CartItemAvailabilityValidatorSpec.php
@@ -60,7 +60,7 @@ function it_does_not_add_violation_if_requested_cart_item_is_available(
AddToCartCommandInterface $addCartItemCommand,
OrderInterface $order,
OrderItemInterface $orderItem,
- ProductVariantInterface $productVariant
+ ProductVariantInterface $productVariant,
): void {
$addCartItemCommand->getCart()->willReturn($order);
$addCartItemCommand->getCartItem()->willReturn($orderItem);
@@ -83,7 +83,7 @@ function it_adds_violation_if_requested_cart_item_is_not_available(
AddToCartCommandInterface $addCartItemCommand,
OrderInterface $order,
OrderItemInterface $orderItem,
- ProductVariantInterface $productVariant
+ ProductVariantInterface $productVariant,
): void {
$addCartItemCommand->getCart()->willReturn($order);
$addCartItemCommand->getCartItem()->willReturn($orderItem);
@@ -109,7 +109,7 @@ function it_adds_violation_if_total_quantity_of_cart_items_exceed_available_quan
OrderInterface $order,
OrderItemInterface $orderItem,
OrderItemInterface $existingOrderItem,
- ProductVariantInterface $productVariant
+ ProductVariantInterface $productVariant,
): void {
$addCartItemCommand->getCart()->willReturn($order);
$addCartItemCommand->getCartItem()->willReturn($orderItem);
@@ -138,7 +138,7 @@ function it_does_not_add_violation_if_total_quantity_of_cart_items_do_not_exceed
OrderInterface $order,
OrderItemInterface $orderItem,
OrderItemInterface $existingOrderItem,
- ProductVariantInterface $productVariant
+ ProductVariantInterface $productVariant,
): void {
$addCartItemCommand->getCart()->willReturn($order);
$addCartItemCommand->getCartItem()->willReturn($orderItem);
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/ChannelDefaultLocaleEnabledValidatorSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/ChannelDefaultLocaleEnabledValidatorSpec.php
index 3e1a05e7384..3eb5d9d80ed 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/ChannelDefaultLocaleEnabledValidatorSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/ChannelDefaultLocaleEnabledValidatorSpec.php
@@ -50,7 +50,7 @@ function it_adds_violation_if_default_locale_is_not_enabled_for_a_given_channel(
ExecutionContextInterface $executionContext,
ConstraintViolationBuilderInterface $constraintViolationBuilder,
ChannelInterface $channel,
- LocaleInterface $locale
+ LocaleInterface $locale,
): void {
$constraint = new ChannelDefaultLocaleEnabled();
@@ -67,7 +67,7 @@ function it_adds_violation_if_default_locale_is_not_enabled_for_a_given_channel(
function it_does_nothing_if_default_locale_is_enabled_for_a_given_channel(
ExecutionContextInterface $executionContext,
ChannelInterface $channel,
- LocaleInterface $locale
+ LocaleInterface $locale,
): void {
$constraint = new ChannelDefaultLocaleEnabled();
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/LocalesAwareValidAttributeValueValidatorSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/LocalesAwareValidAttributeValueValidatorSpec.php
index 632fa195f20..98989b60382 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/LocalesAwareValidAttributeValueValidatorSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/LocalesAwareValidAttributeValueValidatorSpec.php
@@ -44,7 +44,7 @@ function it_validates_attribute_based_on_its_type_and_set_it_as_required_if_its_
AttributeValueInterface $attributeValue,
ServiceRegistryInterface $attributeTypesRegistry,
ValidAttributeValue $attributeValueConstraint,
- TranslationLocaleProviderInterface $localeProvider
+ TranslationLocaleProviderInterface $localeProvider,
): void {
$attributeValue->getType()->willReturn(TextAttributeType::TYPE);
$attributeTypesRegistry->get('text')->willReturn($attributeType);
@@ -65,7 +65,7 @@ function it_validates_attribute_value_based_on_its_type_and_do_not_set_it_as_req
AttributeValueInterface $attributeValue,
ServiceRegistryInterface $attributeTypesRegistry,
ValidAttributeValue $attributeValueConstraint,
- TranslationLocaleProviderInterface $localeProvider
+ TranslationLocaleProviderInterface $localeProvider,
): void {
$attributeValue->getType()->willReturn(TextAttributeType::TYPE);
$attributeTypesRegistry->get('text')->willReturn($attributeType);
@@ -82,7 +82,7 @@ function it_validates_attribute_value_based_on_its_type_and_do_not_set_it_as_req
function it_throws_exception_if_validated_value_is_not_attribute_value(
\DateTime $badObject,
- ValidAttributeValue $attributeValueConstraint
+ ValidAttributeValue $attributeValueConstraint,
): void {
$this
->shouldThrow(\InvalidArgumentException::class)
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/UniqueReviewerEmailValidatorSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/UniqueReviewerEmailValidatorSpec.php
index 4953c2f14f0..6ac9fffd962 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/UniqueReviewerEmailValidatorSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/UniqueReviewerEmailValidatorSpec.php
@@ -32,7 +32,7 @@ function let(
UserRepositoryInterface $userRepository,
TokenStorageInterface $tokenStorage,
AuthorizationCheckerInterface $authorizationChecker,
- ExecutionContextInterface $executionContextInterface
+ ExecutionContextInterface $executionContextInterface,
): void {
$this->beConstructedWith($userRepository, $tokenStorage, $authorizationChecker);
$this->initialize($executionContextInterface);
@@ -52,7 +52,7 @@ function it_validates_if_user_with_given_email_is_already_registered(
TokenInterface $token,
ReviewInterface $review,
CustomerInterface $customer,
- UserInterface $existingUser
+ UserInterface $existingUser,
): void {
$constraint = new UniqueReviewerEmail();
diff --git a/src/Sylius/Bundle/CurrencyBundle/DependencyInjection/Compiler/CompositeCurrencyContextPass.php b/src/Sylius/Bundle/CurrencyBundle/DependencyInjection/Compiler/CompositeCurrencyContextPass.php
index 3e3279681f9..528b22a2fef 100644
--- a/src/Sylius/Bundle/CurrencyBundle/DependencyInjection/Compiler/CompositeCurrencyContextPass.php
+++ b/src/Sylius/Bundle/CurrencyBundle/DependencyInjection/Compiler/CompositeCurrencyContextPass.php
@@ -25,7 +25,7 @@ public function __construct()
'sylius.context.currency',
'sylius.context.currency.composite',
'sylius.context.currency',
- 'addContext'
+ 'addContext',
);
}
diff --git a/src/Sylius/Bundle/CurrencyBundle/Doctrine/ORM/ExchangeRateRepository.php b/src/Sylius/Bundle/CurrencyBundle/Doctrine/ORM/ExchangeRateRepository.php
index d31814f4dd8..4d45a77d542 100644
--- a/src/Sylius/Bundle/CurrencyBundle/Doctrine/ORM/ExchangeRateRepository.php
+++ b/src/Sylius/Bundle/CurrencyBundle/Doctrine/ORM/ExchangeRateRepository.php
@@ -34,7 +34,7 @@ public function findOneWithCurrencyPair(string $firstCurrencyCode, string $secon
->innerJoin('o.targetCurrency', 'targetCurrency')
->andWhere($expr->orX(
'sourceCurrency.code = :firstCurrency AND targetCurrency.code = :secondCurrency',
- 'targetCurrency.code = :firstCurrency AND sourceCurrency.code = :secondCurrency'
+ 'targetCurrency.code = :firstCurrency AND sourceCurrency.code = :secondCurrency',
))
->setParameter('firstCurrency', $firstCurrencyCode)
->setParameter('secondCurrency', $secondCurrencyCode)
diff --git a/src/Sylius/Bundle/CurrencyBundle/Form/Type/CurrencyChoiceType.php b/src/Sylius/Bundle/CurrencyBundle/Form/Type/CurrencyChoiceType.php
index f946b06ee02..ba46e916751 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 3c86a00646e..3564177e63a 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 30631c67772..c3962cd71c4 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 6f1e6427c28..ed6203f807a 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 22d63d986ee..3d3e297e2ab 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/Validator/Constraints/InStockValidator.php b/src/Sylius/Bundle/InventoryBundle/Validator/Constraints/InStockValidator.php
index f6a6a6a37db..fc60c7c6d99 100644
--- a/src/Sylius/Bundle/InventoryBundle/Validator/Constraints/InStockValidator.php
+++ b/src/Sylius/Bundle/InventoryBundle/Validator/Constraints/InStockValidator.php
@@ -50,7 +50,7 @@ public function validate($value, Constraint $constraint): void
if (!$this->availabilityChecker->isStockSufficient($stockable, $quantity)) {
$this->context->addViolation(
$constraint->message,
- ['%itemName%' => $stockable->getInventoryName()]
+ ['%itemName%' => $stockable->getInventoryName()],
);
}
}
diff --git a/src/Sylius/Bundle/InventoryBundle/spec/Templating/Helper/InventoryHelperSpec.php b/src/Sylius/Bundle/InventoryBundle/spec/Templating/Helper/InventoryHelperSpec.php
index 5bac3d7027c..0ce80ca7ac3 100644
--- a/src/Sylius/Bundle/InventoryBundle/spec/Templating/Helper/InventoryHelperSpec.php
+++ b/src/Sylius/Bundle/InventoryBundle/spec/Templating/Helper/InventoryHelperSpec.php
@@ -32,7 +32,7 @@ function it_is_a_twig_extension(): void
function it_delegates_the_stock_availability_checking_to_the_checker(
AvailabilityCheckerInterface $checker,
- StockableInterface $stockable
+ StockableInterface $stockable,
): void {
$checker->isStockAvailable($stockable)->shouldBeCalled()->willReturn(true);
@@ -41,7 +41,7 @@ function it_delegates_the_stock_availability_checking_to_the_checker(
function it_delegates_the_stock_sufficiency_checking_to_the_checker(
AvailabilityCheckerInterface $checker,
- StockableInterface $stockable
+ StockableInterface $stockable,
): void {
$checker->isStockSufficient($stockable, 3)->shouldBeCalled()->willReturn(false);
diff --git a/src/Sylius/Bundle/InventoryBundle/spec/Validator/Constraints/InStockValidatorSpec.php b/src/Sylius/Bundle/InventoryBundle/spec/Validator/Constraints/InStockValidatorSpec.php
index 048cd61a590..e2777385dc5 100644
--- a/src/Sylius/Bundle/InventoryBundle/spec/Validator/Constraints/InStockValidatorSpec.php
+++ b/src/Sylius/Bundle/InventoryBundle/spec/Validator/Constraints/InStockValidatorSpec.php
@@ -35,7 +35,7 @@ function it_is_a_constraint_validator(): void
function it_does_not_add_violation_if_there_is_no_stockable(
InventoryUnitInterface $inventoryUnit,
- PropertyAccessor $propertyAccessor
+ PropertyAccessor $propertyAccessor,
): void {
$propertyAccessor->getValue($inventoryUnit, 'stockable')->willReturn(null);
@@ -47,7 +47,7 @@ function it_does_not_add_violation_if_there_is_no_stockable(
function it_does_not_add_violation_if_there_is_no_quantity(
InventoryUnitInterface $inventoryUnit,
PropertyAccessor $propertyAccessor,
- StockableInterface $stockable
+ StockableInterface $stockable,
): void {
$propertyAccessor->getValue($inventoryUnit, 'stockable')->willReturn($stockable);
$propertyAccessor->getValue($inventoryUnit, 'quantity')->willReturn(null);
@@ -61,7 +61,7 @@ function it_does_not_add_violation_if_stock_is_sufficient(
AvailabilityCheckerInterface $availabilityChecker,
InventoryUnitInterface $inventoryUnit,
PropertyAccessor $propertyAccessor,
- StockableInterface $stockable
+ StockableInterface $stockable,
): void {
$propertyAccessor->getValue($inventoryUnit, 'stockable')->willReturn($stockable);
$propertyAccessor->getValue($inventoryUnit, 'quantity')->willReturn(1);
diff --git a/src/Sylius/Bundle/InventoryBundle/test/src/Tests/SyliusInventoryBundleTest.php b/src/Sylius/Bundle/InventoryBundle/test/src/Tests/SyliusInventoryBundleTest.php
index acf95a6539e..be99a5abcfa 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/DependencyInjection/Compiler/CompositeLocaleContextPass.php b/src/Sylius/Bundle/LocaleBundle/DependencyInjection/Compiler/CompositeLocaleContextPass.php
index 5ad57e004c6..8344417d223 100644
--- a/src/Sylius/Bundle/LocaleBundle/DependencyInjection/Compiler/CompositeLocaleContextPass.php
+++ b/src/Sylius/Bundle/LocaleBundle/DependencyInjection/Compiler/CompositeLocaleContextPass.php
@@ -23,7 +23,7 @@ public function __construct()
'sylius.context.locale',
'sylius.context.locale.composite',
'sylius.context.locale',
- 'addContext'
+ 'addContext',
);
}
}
diff --git a/src/Sylius/Bundle/LocaleBundle/Listener/RequestLocaleSetter.php b/src/Sylius/Bundle/LocaleBundle/Listener/RequestLocaleSetter.php
index 5dea7ee65e8..d3e2cd575d7 100644
--- a/src/Sylius/Bundle/LocaleBundle/Listener/RequestLocaleSetter.php
+++ b/src/Sylius/Bundle/LocaleBundle/Listener/RequestLocaleSetter.php
@@ -26,7 +26,7 @@ final class RequestLocaleSetter
public function __construct(
LocaleContextInterface $localeContext,
- LocaleProviderInterface $localeProvider
+ LocaleProviderInterface $localeProvider,
) {
$this->localeContext = $localeContext;
$this->localeProvider = $localeProvider;
diff --git a/src/Sylius/Bundle/LocaleBundle/spec/Context/RequestBasedLocaleContextSpec.php b/src/Sylius/Bundle/LocaleBundle/spec/Context/RequestBasedLocaleContextSpec.php
index 54901a53761..29d7a8f1a16 100644
--- a/src/Sylius/Bundle/LocaleBundle/spec/Context/RequestBasedLocaleContextSpec.php
+++ b/src/Sylius/Bundle/LocaleBundle/spec/Context/RequestBasedLocaleContextSpec.php
@@ -42,7 +42,7 @@ function it_throws_locale_not_found_exception_if_master_request_is_not_found(Req
function it_throws_locale_not_found_exception_if_master_request_does_not_have_locale_attribute(
RequestStack $requestStack,
- Request $request
+ Request $request,
): void {
$requestStack->getMasterRequest()->willReturn($request);
@@ -54,7 +54,7 @@ function it_throws_locale_not_found_exception_if_master_request_does_not_have_lo
function it_throws_locale_not_found_exception_if_master_request_locale_code_is_not_among_available_ones(
RequestStack $requestStack,
LocaleProviderInterface $localeProvider,
- Request $request
+ Request $request,
): void {
$requestStack->getMasterRequest()->willReturn($request);
@@ -68,7 +68,7 @@ function it_throws_locale_not_found_exception_if_master_request_locale_code_is_n
function it_returns_master_request_locale_code(
RequestStack $requestStack,
LocaleProviderInterface $localeProvider,
- Request $request
+ Request $request,
): void {
$requestStack->getMasterRequest()->willReturn($request);
diff --git a/src/Sylius/Bundle/LocaleBundle/spec/Listener/RequestLocaleSetterSpec.php b/src/Sylius/Bundle/LocaleBundle/spec/Listener/RequestLocaleSetterSpec.php
index a5127b210ec..a0cfff47c59 100644
--- a/src/Sylius/Bundle/LocaleBundle/spec/Listener/RequestLocaleSetterSpec.php
+++ b/src/Sylius/Bundle/LocaleBundle/spec/Listener/RequestLocaleSetterSpec.php
@@ -30,7 +30,7 @@ function it_sets_locale_and_default_locale_on_request(
LocaleContextInterface $localeContext,
LocaleProviderInterface $localeProvider,
RequestEvent $event,
- Request $request
+ Request $request,
): void {
$event->getRequest()->willReturn($request);
diff --git a/src/Sylius/Bundle/LocaleBundle/spec/Templating/Helper/LocaleHelperSpec.php b/src/Sylius/Bundle/LocaleBundle/spec/Templating/Helper/LocaleHelperSpec.php
index 84598b3e267..a2e7345739a 100644
--- a/src/Sylius/Bundle/LocaleBundle/spec/Templating/Helper/LocaleHelperSpec.php
+++ b/src/Sylius/Bundle/LocaleBundle/spec/Templating/Helper/LocaleHelperSpec.php
@@ -53,7 +53,7 @@ function it_converts_locales_code_to_name_using_given_locale(LocaleConverterInte
function it_converts_locales_code_to_name_using_locale_from_the_context(
LocaleConverterInterface $localeConverter,
- LocaleContextInterface $localeContext
+ LocaleContextInterface $localeContext,
): void {
$this->beConstructedWith($localeConverter, $localeContext);
@@ -66,7 +66,7 @@ function it_converts_locales_code_to_name_using_locale_from_the_context(
function it_converts_locale_code_to_name_using_default_locale_if_passed_locale_context_throws_an_exception(
LocaleConverterInterface $localeConverter,
- LocaleContextInterface $localeContext
+ LocaleContextInterface $localeContext,
): void {
$this->beConstructedWith($localeConverter, $localeContext);
diff --git a/src/Sylius/Bundle/LocaleBundle/test/src/Tests/SyliusLocaleBundleTest.php b/src/Sylius/Bundle/LocaleBundle/test/src/Tests/SyliusLocaleBundleTest.php
index 9cda6dd1200..56389f31c2a 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/Form/Type/MoneyType.php b/src/Sylius/Bundle/MoneyBundle/Form/Type/MoneyType.php
index 57c3adffae6..ac4b3fbf82b 100644
--- a/src/Sylius/Bundle/MoneyBundle/Form/Type/MoneyType.php
+++ b/src/Sylius/Bundle/MoneyBundle/Form/Type/MoneyType.php
@@ -30,7 +30,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
$options['scale'],
$options['grouping'],
null,
- $options['divisor']
+ $options['divisor'],
))
;
}
diff --git a/src/Sylius/Bundle/MoneyBundle/Formatter/MoneyFormatter.php b/src/Sylius/Bundle/MoneyBundle/Formatter/MoneyFormatter.php
index eae87c50714..c8aeacc2c52 100644
--- a/src/Sylius/Bundle/MoneyBundle/Formatter/MoneyFormatter.php
+++ b/src/Sylius/Bundle/MoneyBundle/Formatter/MoneyFormatter.php
@@ -25,7 +25,7 @@ public function format(int $amount, string $currencyCode, ?string $locale = null
Assert::notSame(
false,
$result,
- sprintf('The amount "%s" of type %s cannot be formatted to currency "%s".', $amount, gettype($amount), $currencyCode)
+ sprintf('The amount "%s" of type %s cannot be formatted to currency "%s".', $amount, gettype($amount), $currencyCode),
);
return $amount >= 0 ? $result : '-' . $result;
diff --git a/src/Sylius/Bundle/MoneyBundle/spec/Templating/Helper/ConvertMoneyHelperSpec.php b/src/Sylius/Bundle/MoneyBundle/spec/Templating/Helper/ConvertMoneyHelperSpec.php
index 57efbf78a62..acc107f3146 100644
--- a/src/Sylius/Bundle/MoneyBundle/spec/Templating/Helper/ConvertMoneyHelperSpec.php
+++ b/src/Sylius/Bundle/MoneyBundle/spec/Templating/Helper/ConvertMoneyHelperSpec.php
@@ -36,7 +36,7 @@ function it_is_a_convert_money_price_helper(): void
}
function it_converts_and_formats_money_using_default_locale_if_not_given(
- CurrencyConverterInterface $currencyConverter
+ CurrencyConverterInterface $currencyConverter,
): void {
$currencyConverter->convert(500, 'USD', 'CAD')->willReturn(250);
diff --git a/src/Sylius/Bundle/MoneyBundle/test/src/Tests/SyliusMoneyBundleTest.php b/src/Sylius/Bundle/MoneyBundle/test/src/Tests/SyliusMoneyBundleTest.php
index 50cea2da0dd..510eaca9510 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/Command/RemoveExpiredCartsCommand.php b/src/Sylius/Bundle/OrderBundle/Command/RemoveExpiredCartsCommand.php
index 003cd4240fa..cc6f33b3892 100644
--- a/src/Sylius/Bundle/OrderBundle/Command/RemoveExpiredCartsCommand.php
+++ b/src/Sylius/Bundle/OrderBundle/Command/RemoveExpiredCartsCommand.php
@@ -36,7 +36,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$expirationTime = $this->getContainer()->getParameter('sylius_order.cart_expiration_period');
$output->writeln(sprintf(
'Command will remove carts that have been idle for %s.',
- (string) $expirationTime
+ (string) $expirationTime,
));
$expiredCartsRemover = $this->getContainer()->get('sylius.expired_carts_remover');
diff --git a/src/Sylius/Bundle/OrderBundle/Controller/OrderController.php b/src/Sylius/Bundle/OrderBundle/Controller/OrderController.php
index 3cc77ed3874..77f8557429e 100644
--- a/src/Sylius/Bundle/OrderBundle/Controller/OrderController.php
+++ b/src/Sylius/Bundle/OrderBundle/Controller/OrderController.php
@@ -49,7 +49,7 @@ public function summaryAction(Request $request): Response
[
'cart' => $cart,
'form' => $form->createView(),
- ]
+ ],
);
}
@@ -67,7 +67,7 @@ public function widgetAction(Request $request): Response
$configuration->getTemplate('summary.html'),
[
'cart' => $cart,
- ]
+ ],
);
}
@@ -123,7 +123,7 @@ public function saveAction(Request $request): Response
$this->metadata->getName() => $resource,
'form' => $form->createView(),
'cart' => $resource,
- ]
+ ],
);
}
diff --git a/src/Sylius/Bundle/OrderBundle/Controller/OrderItemController.php b/src/Sylius/Bundle/OrderBundle/Controller/OrderItemController.php
index 17dc0e9b8aa..2bf5f4f8392 100644
--- a/src/Sylius/Bundle/OrderBundle/Controller/OrderItemController.php
+++ b/src/Sylius/Bundle/OrderBundle/Controller/OrderItemController.php
@@ -48,7 +48,7 @@ public function addAction(Request $request): Response
$form = $this->getFormFactory()->create(
$configuration->getFormType(),
$this->createAddToCartCommand($cart, $orderItem),
- $configuration->getFormOptions()
+ $configuration->getFormOptions(),
);
if ($request->isMethod('POST') && $form->handleRequest($request)->isValid()) {
@@ -103,7 +103,7 @@ public function addAction(Request $request): Response
'configuration' => $configuration,
$this->metadata->getName() => $orderItem,
'form' => $form->createView(),
- ]
+ ],
);
}
@@ -239,7 +239,7 @@ protected function handleBadAjaxRequestView(RequestConfiguration $configuration,
{
return $this->viewHandler->handle(
$configuration,
- View::create($form, Response::HTTP_BAD_REQUEST)->setData(['errors' => $form->getErrors(true, true)])
+ View::create($form, Response::HTTP_BAD_REQUEST)->setData(['errors' => $form->getErrors(true, true)]),
);
}
}
diff --git a/src/Sylius/Bundle/OrderBundle/DependencyInjection/Compiler/RegisterCartContextsPass.php b/src/Sylius/Bundle/OrderBundle/DependencyInjection/Compiler/RegisterCartContextsPass.php
index 728d758d3b6..62d19b437bf 100644
--- a/src/Sylius/Bundle/OrderBundle/DependencyInjection/Compiler/RegisterCartContextsPass.php
+++ b/src/Sylius/Bundle/OrderBundle/DependencyInjection/Compiler/RegisterCartContextsPass.php
@@ -27,7 +27,7 @@ public function __construct()
'sylius.context.cart',
'sylius.context.cart.composite',
self::CART_CONTEXT_SERVICE_TAG,
- 'addContext'
+ 'addContext',
);
}
diff --git a/src/Sylius/Bundle/OrderBundle/DependencyInjection/Compiler/RegisterProcessorsPass.php b/src/Sylius/Bundle/OrderBundle/DependencyInjection/Compiler/RegisterProcessorsPass.php
index b5899596696..3f0a68028ed 100644
--- a/src/Sylius/Bundle/OrderBundle/DependencyInjection/Compiler/RegisterProcessorsPass.php
+++ b/src/Sylius/Bundle/OrderBundle/DependencyInjection/Compiler/RegisterProcessorsPass.php
@@ -27,7 +27,7 @@ public function __construct()
'sylius.order_processing.order_processor',
'sylius.order_processing.order_processor.composite',
self::PROCESSOR_SERVICE_TAG,
- 'addProcessor'
+ 'addProcessor',
);
}
diff --git a/src/Sylius/Bundle/OrderBundle/Form/DataMapper/OrderItemQuantityDataMapper.php b/src/Sylius/Bundle/OrderBundle/Form/DataMapper/OrderItemQuantityDataMapper.php
index d52b2796b98..cff84b826f4 100644
--- a/src/Sylius/Bundle/OrderBundle/Form/DataMapper/OrderItemQuantityDataMapper.php
+++ b/src/Sylius/Bundle/OrderBundle/Form/DataMapper/OrderItemQuantityDataMapper.php
@@ -27,7 +27,7 @@ class OrderItemQuantityDataMapper implements DataMapperInterface
public function __construct(
OrderItemQuantityModifierInterface $orderItemQuantityModifier,
- DataMapperInterface $propertyPathDataMapper
+ DataMapperInterface $propertyPathDataMapper,
) {
$this->orderItemQuantityModifier = $orderItemQuantityModifier;
$this->propertyPathDataMapper = $propertyPathDataMapper;
diff --git a/src/Sylius/Bundle/OrderBundle/Form/Type/CartItemType.php b/src/Sylius/Bundle/OrderBundle/Form/Type/CartItemType.php
index 0f4ad125609..c07b790ac7e 100644
--- a/src/Sylius/Bundle/OrderBundle/Form/Type/CartItemType.php
+++ b/src/Sylius/Bundle/OrderBundle/Form/Type/CartItemType.php
@@ -25,7 +25,7 @@ class CartItemType extends AbstractResourceType
public function __construct(
string $dataClass,
array $validationGroups,
- DataMapperInterface $dataMapper
+ DataMapperInterface $dataMapper,
) {
parent::__construct($dataClass, $validationGroups);
diff --git a/src/Sylius/Bundle/OrderBundle/Form/Type/OrderItemType.php b/src/Sylius/Bundle/OrderBundle/Form/Type/OrderItemType.php
index ea2e9d4c444..b42d2a8f602 100644
--- a/src/Sylius/Bundle/OrderBundle/Form/Type/OrderItemType.php
+++ b/src/Sylius/Bundle/OrderBundle/Form/Type/OrderItemType.php
@@ -25,7 +25,7 @@ final class OrderItemType extends AbstractResourceType
public function __construct(
string $dataClass,
array $validationGroups,
- DataMapperInterface $dataMapper
+ DataMapperInterface $dataMapper,
) {
parent::__construct($dataClass, $validationGroups);
diff --git a/src/Sylius/Bundle/OrderBundle/NumberGenerator/SequentialOrderNumberGenerator.php b/src/Sylius/Bundle/OrderBundle/NumberGenerator/SequentialOrderNumberGenerator.php
index 05f7dfe7ba1..953ff4a4c93 100644
--- a/src/Sylius/Bundle/OrderBundle/NumberGenerator/SequentialOrderNumberGenerator.php
+++ b/src/Sylius/Bundle/OrderBundle/NumberGenerator/SequentialOrderNumberGenerator.php
@@ -32,7 +32,7 @@ public function __construct(
RepositoryInterface $sequenceRepository,
FactoryInterface $sequenceFactory,
int $startNumber = 1,
- int $numberLength = 9
+ int $numberLength = 9,
) {
$this->sequenceRepository = $sequenceRepository;
$this->sequenceFactory = $sequenceFactory;
diff --git a/src/Sylius/Bundle/OrderBundle/Remover/ExpiredCartsRemover.php b/src/Sylius/Bundle/OrderBundle/Remover/ExpiredCartsRemover.php
index 84679c5621e..b700043e80e 100644
--- a/src/Sylius/Bundle/OrderBundle/Remover/ExpiredCartsRemover.php
+++ b/src/Sylius/Bundle/OrderBundle/Remover/ExpiredCartsRemover.php
@@ -34,7 +34,7 @@ public function __construct(
OrderRepositoryInterface $orderRepository,
ObjectManager $orderManager,
EventDispatcherInterface $eventDispatcher,
- string $expirationPeriod
+ string $expirationPeriod,
) {
$this->orderRepository = $orderRepository;
$this->orderManager = $orderManager;
diff --git a/src/Sylius/Bundle/OrderBundle/Tests/DependencyInjection/Compiler/RegisterOrderProcessorPassTest.php b/src/Sylius/Bundle/OrderBundle/Tests/DependencyInjection/Compiler/RegisterOrderProcessorPassTest.php
index 7ee69b1222a..25e97b47ce5 100644
--- a/src/Sylius/Bundle/OrderBundle/Tests/DependencyInjection/Compiler/RegisterOrderProcessorPassTest.php
+++ b/src/Sylius/Bundle/OrderBundle/Tests/DependencyInjection/Compiler/RegisterOrderProcessorPassTest.php
@@ -46,7 +46,7 @@ public function it_adds_method_call_to_composite_order_processor_if_exist(): voi
[
new Reference('sylius.order_processing.order_adjustments_clearer'),
0,
- ]
+ ],
);
}
@@ -71,7 +71,7 @@ public function it_adds_method_call_to_composite_order_processor_with_custom_pri
[
new Reference('sylius.order_processing.order_adjustments_clearer'),
10,
- ]
+ ],
);
}
@@ -85,7 +85,7 @@ public function it_does_not_add_method_call_if_there_are_no_tagged_processors():
$this->assertContainerBuilderDoesNotHaveServiceDefinitionWithMethodCall(
'sylius.order_processing.order_processor',
- 'addProcessor'
+ 'addProcessor',
);
}
@@ -95,7 +95,7 @@ private function assertContainerBuilderDoesNotHaveServiceDefinitionWithMethodCal
self::assertThat(
$definition,
- new LogicalNot(new DefinitionHasMethodCallConstraint($method))
+ new LogicalNot(new DefinitionHasMethodCallConstraint($method)),
);
}
diff --git a/src/Sylius/Bundle/OrderBundle/Tests/DependencyInjection/SyliusOrderExtensionTest.php b/src/Sylius/Bundle/OrderBundle/Tests/DependencyInjection/SyliusOrderExtensionTest.php
index 583f1294964..e94d92b339e 100644
--- a/src/Sylius/Bundle/OrderBundle/Tests/DependencyInjection/SyliusOrderExtensionTest.php
+++ b/src/Sylius/Bundle/OrderBundle/Tests/DependencyInjection/SyliusOrderExtensionTest.php
@@ -32,7 +32,7 @@ public function it_autoconfigures_cart_contexts(): void
'acme.cart_context_autoconfigured',
(new Definition())
->setClass($this->getMockClass(CartContextInterface::class))
- ->setAutoconfigured(true)
+ ->setAutoconfigured(true),
);
$this->load();
@@ -40,7 +40,7 @@ public function it_autoconfigures_cart_contexts(): void
$this->assertContainerBuilderHasServiceDefinitionWithTag(
'acme.cart_context_autoconfigured',
- RegisterCartContextsPass::CART_CONTEXT_SERVICE_TAG
+ RegisterCartContextsPass::CART_CONTEXT_SERVICE_TAG,
);
}
@@ -53,7 +53,7 @@ public function it_does_not_autoconfigure_order_processors(): void
'acme.processor_autoconfigured',
(new Definition())
->setClass($this->getMockClass(OrderProcessorInterface::class))
- ->setAutoconfigured(true)
+ ->setAutoconfigured(true),
);
$this->load();
@@ -61,7 +61,7 @@ public function it_does_not_autoconfigure_order_processors(): void
$this->assertContainerBuilderHasServiceDefinitionWithTag(
'acme.processor_autoconfigured',
- RegisterProcessorsPass::PROCESSOR_SERVICE_TAG
+ RegisterProcessorsPass::PROCESSOR_SERVICE_TAG,
);
}
diff --git a/src/Sylius/Bundle/OrderBundle/spec/Context/SessionBasedCartContextSpec.php b/src/Sylius/Bundle/OrderBundle/spec/Context/SessionBasedCartContextSpec.php
index f95f6a8408c..2db64d72890 100644
--- a/src/Sylius/Bundle/OrderBundle/spec/Context/SessionBasedCartContextSpec.php
+++ b/src/Sylius/Bundle/OrderBundle/spec/Context/SessionBasedCartContextSpec.php
@@ -35,7 +35,7 @@ function it_implements_a_cart_context_interface(): void
function it_returns_a_cart_based_on_id_stored_in_session(
SessionInterface $session,
OrderRepositoryInterface $orderRepository,
- OrderInterface $cart
+ OrderInterface $cart,
): void {
$session->has('session_key_name')->willReturn(true);
$session->get('session_key_name')->willReturn(12345);
@@ -53,7 +53,7 @@ function it_throws_a_cart_not_found_exception_if_session_key_does_not_exist(Sess
function it_throws_a_cart_not_found_exception_and_removes_id_from_session_when_cart_is_not_found(
SessionInterface $session,
- OrderRepositoryInterface $orderRepository
+ OrderRepositoryInterface $orderRepository,
): void {
$session->has('session_key_name')->willReturn(true);
$session->get('session_key_name')->willReturn(12345);
diff --git a/src/Sylius/Bundle/OrderBundle/spec/Factory/AddToCartCommandFactorySpec.php b/src/Sylius/Bundle/OrderBundle/spec/Factory/AddToCartCommandFactorySpec.php
index fa457529137..79baa4a7a4b 100644
--- a/src/Sylius/Bundle/OrderBundle/spec/Factory/AddToCartCommandFactorySpec.php
+++ b/src/Sylius/Bundle/OrderBundle/spec/Factory/AddToCartCommandFactorySpec.php
@@ -28,7 +28,7 @@ function it_is_add_to_cart_command_factory(): void
function it_creates_add_to_cart_command_with_cart_and_cart_item(
OrderInterface $cart,
- OrderItemInterface $cartItem
+ OrderItemInterface $cartItem,
): void {
$this->createWithCartAndCartItem($cart, $cartItem)->shouldBeLike(new AddToCartCommand($cart->getWrappedObject(), $cartItem->getWrappedObject()));
}
diff --git a/src/Sylius/Bundle/OrderBundle/spec/Form/DataMapper/OrderItemQuantityDataMapperSpec.php b/src/Sylius/Bundle/OrderBundle/spec/Form/DataMapper/OrderItemQuantityDataMapperSpec.php
index ac612f334f4..59b59f09af6 100644
--- a/src/Sylius/Bundle/OrderBundle/spec/Form/DataMapper/OrderItemQuantityDataMapperSpec.php
+++ b/src/Sylius/Bundle/OrderBundle/spec/Form/DataMapper/OrderItemQuantityDataMapperSpec.php
@@ -23,7 +23,7 @@ final class OrderItemQuantityDataMapperSpec extends ObjectBehavior
{
function let(
OrderItemQuantityModifierInterface $orderItemQuantityModifier,
- DataMapperInterface $propertyPathDataMapper
+ DataMapperInterface $propertyPathDataMapper,
): void {
$this->beConstructedWith($orderItemQuantityModifier, $propertyPathDataMapper);
}
@@ -36,7 +36,7 @@ function it_implements_a_data_mapper_interface(): void
function it_uses_a_property_path_data_mapper_while_mapping_data_to_forms(
DataMapperInterface $propertyPathDataMapper,
FormInterface $form,
- OrderItemInterface $orderItem
+ OrderItemInterface $orderItem,
): void {
$forms = new \ArrayIterator([$form->getWrappedObject()]);
diff --git a/src/Sylius/Bundle/OrderBundle/spec/NumberAssigner/OrderNumberAssignerSpec.php b/src/Sylius/Bundle/OrderBundle/spec/NumberAssigner/OrderNumberAssignerSpec.php
index 223e9dbcaac..f8f6c259554 100644
--- a/src/Sylius/Bundle/OrderBundle/spec/NumberAssigner/OrderNumberAssignerSpec.php
+++ b/src/Sylius/Bundle/OrderBundle/spec/NumberAssigner/OrderNumberAssignerSpec.php
@@ -33,7 +33,7 @@ function it_implements_an_order_number_assigner_interface(): void
function it_assigns_a_number_to_an_order(
OrderInterface $order,
- OrderNumberGeneratorInterface $numberGenerator
+ OrderNumberGeneratorInterface $numberGenerator,
): void {
$order->getNumber()->willReturn(null);
@@ -45,7 +45,7 @@ function it_assigns_a_number_to_an_order(
function it_does_not_assign_a_number_to_an_order_with_number(
OrderInterface $order,
- OrderNumberGeneratorInterface $numberGenerator
+ OrderNumberGeneratorInterface $numberGenerator,
): void {
$order->getNumber()->willReturn('00000007');
diff --git a/src/Sylius/Bundle/OrderBundle/spec/NumberGenerator/SequentialOrderNumberGeneratorSpec.php b/src/Sylius/Bundle/OrderBundle/spec/NumberGenerator/SequentialOrderNumberGeneratorSpec.php
index a9a04fffafa..1dd50e3d820 100644
--- a/src/Sylius/Bundle/OrderBundle/spec/NumberGenerator/SequentialOrderNumberGeneratorSpec.php
+++ b/src/Sylius/Bundle/OrderBundle/spec/NumberGenerator/SequentialOrderNumberGeneratorSpec.php
@@ -35,7 +35,7 @@ function it_implements_an_order_number_generator_interface(): void
function it_generates_an_order_number(
EntityRepository $sequenceRepository,
OrderSequenceInterface $sequence,
- OrderInterface $order
+ OrderInterface $order,
): void {
$sequence->getIndex()->willReturn(6);
$sequenceRepository->findOneBy([])->willReturn($sequence);
@@ -49,7 +49,7 @@ function it_generates_an_order_number_when_sequence_is_null(
EntityRepository $sequenceRepository,
FactoryInterface $sequenceFactory,
OrderSequenceInterface $sequence,
- OrderInterface $order
+ OrderInterface $order,
): void {
$sequence->getIndex()->willReturn(0);
diff --git a/src/Sylius/Bundle/OrderBundle/spec/Remover/ExpiredCartsRemoverSpec.php b/src/Sylius/Bundle/OrderBundle/spec/Remover/ExpiredCartsRemoverSpec.php
index c83e20d0d90..44baa4df531 100644
--- a/src/Sylius/Bundle/OrderBundle/spec/Remover/ExpiredCartsRemoverSpec.php
+++ b/src/Sylius/Bundle/OrderBundle/spec/Remover/ExpiredCartsRemoverSpec.php
@@ -39,7 +39,7 @@ function it_removes_a_cart_which_has_been_updated_before_configured_date(
ObjectManager $orderManager,
EventDispatcher $eventDispatcher,
OrderInterface $firstCart,
- OrderInterface $secondCart
+ OrderInterface $secondCart,
): void {
$orderRepository->findCartsNotModifiedSince(Argument::type('\DateTimeInterface'))->willReturn([
$firstCart,
diff --git a/src/Sylius/Bundle/OrderBundle/spec/Templating/Helper/AdjustmentsHelperSpec.php b/src/Sylius/Bundle/OrderBundle/spec/Templating/Helper/AdjustmentsHelperSpec.php
index 1c83cad5d89..82617e8a7e3 100644
--- a/src/Sylius/Bundle/OrderBundle/spec/Templating/Helper/AdjustmentsHelperSpec.php
+++ b/src/Sylius/Bundle/OrderBundle/spec/Templating/Helper/AdjustmentsHelperSpec.php
@@ -34,7 +34,7 @@ function it_returns_aggregated_adjustments(
AdjustmentsAggregatorInterface $adjustmentsAggregator,
AdjustmentInterface $adjustment1,
AdjustmentInterface $adjustment2,
- AdjustmentInterface $adjustment3
+ AdjustmentInterface $adjustment3,
): void {
$adjustmentsAggregator
->aggregate([$adjustment1, $adjustment2, $adjustment3])
diff --git a/src/Sylius/Bundle/OrderBundle/test/src/Tests/SyliusOrderBundleTest.php b/src/Sylius/Bundle/OrderBundle/test/src/Tests/SyliusOrderBundleTest.php
index a1271845307..18b4d10d52f 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/Form/Type/PaymentMethodChoiceType.php b/src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodChoiceType.php
index 0a80d865adb..f75a67bbb03 100644
--- a/src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodChoiceType.php
+++ b/src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodChoiceType.php
@@ -31,7 +31,7 @@ final class PaymentMethodChoiceType extends AbstractType
public function __construct(
PaymentMethodsResolverInterface $paymentMethodsResolver,
- RepositoryInterface $paymentMethodRepository
+ RepositoryInterface $paymentMethodRepository,
) {
$this->paymentMethodsResolver = $paymentMethodsResolver;
$this->paymentMethodRepository = $paymentMethodRepository;
diff --git a/src/Sylius/Bundle/PaymentBundle/Tests/DependencyInjection/Compiler/RegisterPaymentMethodsResolversPassTest.php b/src/Sylius/Bundle/PaymentBundle/Tests/DependencyInjection/Compiler/RegisterPaymentMethodsResolversPassTest.php
index 5a8992c017b..5a46dc2c940 100644
--- a/src/Sylius/Bundle/PaymentBundle/Tests/DependencyInjection/Compiler/RegisterPaymentMethodsResolversPassTest.php
+++ b/src/Sylius/Bundle/PaymentBundle/Tests/DependencyInjection/Compiler/RegisterPaymentMethodsResolversPassTest.php
@@ -29,7 +29,7 @@ public function it_registers_resolvers_in_the_registry(): void
'res',
(new Definition())
->addTag('sylius.payment_method_resolver', ['type' => 'res1', 'label' => 'Res 1'])
- ->addTag('sylius.payment_method_resolver', ['type' => 'res2', 'label' => 'Res 2', 'priority' => 5])
+ ->addTag('sylius.payment_method_resolver', ['type' => 'res2', 'label' => 'Res 2', 'priority' => 5]),
);
$this->compile();
@@ -37,12 +37,12 @@ public function it_registers_resolvers_in_the_registry(): void
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.registry.payment_methods_resolver',
'register',
- [new Reference('res'), 0]
+ [new Reference('res'), 0],
);
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.registry.payment_methods_resolver',
'register',
- [new Reference('res'), 5]
+ [new Reference('res'), 5],
);
}
@@ -54,14 +54,14 @@ public function it_creates_parameter_which_maps_resolvers(): void
'res',
(new Definition())
->addTag('sylius.payment_method_resolver', ['type' => 'res1', 'label' => 'Res 1'])
- ->addTag('sylius.payment_method_resolver', ['type' => 'res2', 'label' => 'Res 2', 'priority' => 5])
+ ->addTag('sylius.payment_method_resolver', ['type' => 'res2', 'label' => 'Res 2', 'priority' => 5]),
);
$this->compile();
$this->assertContainerBuilderHasParameter(
'sylius.payment_method_resolvers',
- ['res1' => 'Res 1', 'res2' => 'Res 2']
+ ['res1' => 'Res 1', 'res2' => 'Res 2'],
);
}
diff --git a/src/Sylius/Bundle/PaymentBundle/test/src/Tests/SyliusPaymentBundleTest.php b/src/Sylius/Bundle/PaymentBundle/test/src/Tests/SyliusPaymentBundleTest.php
index 69adefe2efb..625e23d77a9 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/Action/ResolveNextRouteAction.php b/src/Sylius/Bundle/PayumBundle/Action/ResolveNextRouteAction.php
index 402b5a4ef71..23938a1995c 100644
--- a/src/Sylius/Bundle/PayumBundle/Action/ResolveNextRouteAction.php
+++ b/src/Sylius/Bundle/PayumBundle/Action/ResolveNextRouteAction.php
@@ -32,7 +32,7 @@ public function execute($request): void
$payment->getState() === PaymentInterface::STATE_AUTHORIZED
) {
$request->setRouteName(
- 'sylius_shop_order_thank_you'
+ 'sylius_shop_order_thank_you',
);
return;
diff --git a/src/Sylius/Bundle/PayumBundle/Controller/PayumController.php b/src/Sylius/Bundle/PayumBundle/Controller/PayumController.php
index 806f5cee21d..3358418538d 100644
--- a/src/Sylius/Bundle/PayumBundle/Controller/PayumController.php
+++ b/src/Sylius/Bundle/PayumBundle/Controller/PayumController.php
@@ -62,7 +62,7 @@ public function __construct(
ViewHandlerInterface $viewHandler,
RouterInterface $router,
GetStatusFactoryInterface $getStatusFactory,
- ResolveNextRouteFactoryInterface $resolveNextRouteFactory
+ ResolveNextRouteFactoryInterface $resolveNextRouteFactory,
) {
$this->payum = $payum;
$this->orderRepository = $orderRepository;
@@ -148,7 +148,7 @@ private function provideTokenBasedOnPayment(PaymentInterface $payment, array $re
$redirectOptions['route']
?? null,
$redirectOptions['parameters']
- ?? []
+ ?? [],
);
} else {
$token = $this->getTokenFactory()->createCaptureToken(
@@ -157,7 +157,7 @@ private function provideTokenBasedOnPayment(PaymentInterface $payment, array $re
$redirectOptions['route']
?? null,
$redirectOptions['parameters']
- ?? []
+ ?? [],
);
}
diff --git a/src/Sylius/Bundle/PayumBundle/DependencyInjection/Compiler/InjectContainerIntoControllersPass.php b/src/Sylius/Bundle/PayumBundle/DependencyInjection/Compiler/InjectContainerIntoControllersPass.php
index 15eaa560fb3..f11b456dda7 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 82e618c8529..ee935b5fa24 100644
--- a/src/Sylius/Bundle/PayumBundle/DependencyInjection/Compiler/RegisterGatewayConfigTypePass.php
+++ b/src/Sylius/Bundle/PayumBundle/DependencyInjection/Compiler/RegisterGatewayConfigTypePass.php
@@ -43,12 +43,12 @@ public function process(ContainerBuilder $container): void
$formRegistry->addMethodCall(
'add',
- ['gateway_config', $attribute['type'], $container->getDefinition($id)->getClass()]
+ ['gateway_config', $attribute['type'], $container->getDefinition($id)->getClass()],
);
}
}
- 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/Form/Type/GatewayConfigType.php b/src/Sylius/Bundle/PayumBundle/Form/Type/GatewayConfigType.php
index 428fe31536c..8214f180e80 100644
--- a/src/Sylius/Bundle/PayumBundle/Form/Type/GatewayConfigType.php
+++ b/src/Sylius/Bundle/PayumBundle/Form/Type/GatewayConfigType.php
@@ -28,7 +28,7 @@ final class GatewayConfigType extends AbstractResourceType
public function __construct(
string $dataClass,
array $validationGroups,
- FormTypeRegistryInterface $gatewayConfigurationTypeRegistry
+ FormTypeRegistryInterface $gatewayConfigurationTypeRegistry,
) {
parent::__construct($dataClass, $validationGroups);
diff --git a/src/Sylius/Bundle/PayumBundle/Model/PaymentSecurityToken.php b/src/Sylius/Bundle/PayumBundle/Model/PaymentSecurityToken.php
index 32487c67750..f6fca45c013 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/PayumBundle/Provider/PaymentDescriptionProvider.php b/src/Sylius/Bundle/PayumBundle/Provider/PaymentDescriptionProvider.php
index b496672da60..e9ae05f30cf 100644
--- a/src/Sylius/Bundle/PayumBundle/Provider/PaymentDescriptionProvider.php
+++ b/src/Sylius/Bundle/PayumBundle/Provider/PaymentDescriptionProvider.php
@@ -36,7 +36,7 @@ public function getPaymentDescription(PaymentInterface $payment): string
[
'%items%' => $order->getItems()->count(),
'%total%' => round($payment->getAmount() / 100, 2),
- ]
+ ],
);
}
}
diff --git a/src/Sylius/Bundle/PayumBundle/Tests/DependencyInjection/Compiler/RegisterGatewayConfigTypePassTest.php b/src/Sylius/Bundle/PayumBundle/Tests/DependencyInjection/Compiler/RegisterGatewayConfigTypePassTest.php
index 4fd9e123830..3c149d00fc5 100644
--- a/src/Sylius/Bundle/PayumBundle/Tests/DependencyInjection/Compiler/RegisterGatewayConfigTypePassTest.php
+++ b/src/Sylius/Bundle/PayumBundle/Tests/DependencyInjection/Compiler/RegisterGatewayConfigTypePassTest.php
@@ -28,22 +28,22 @@ public function it_registers_payment_gateways_configs_by_their_priority_in_the_r
'custom_low_priority_gateway',
(new Definition('LowGatewayClass'))->addTag(
'sylius.gateway_configuration_type',
- ['type' => 'low_gateway', 'label' => 'Low Gateway', 'priority' => 10]
- )
+ ['type' => 'low_gateway', 'label' => 'Low Gateway', 'priority' => 10],
+ ),
);
$this->setDefinition(
'custom_high_priority_gateway',
(new Definition('HighGatewayClass'))->addTag(
'sylius.gateway_configuration_type',
- ['type' => 'high_gateway', 'label' => 'High Gateway', 'priority' => 1000]
- )
+ ['type' => 'high_gateway', 'label' => 'High Gateway', 'priority' => 1000],
+ ),
);
$this->setDefinition(
'custom_medium_priority_gateway',
(new Definition('MediumGatewayClass'))->addTag(
'sylius.gateway_configuration_type',
- ['type' => 'medium_gateway', 'label' => 'Medium Gateway', 'priority' => 300]
- )
+ ['type' => 'medium_gateway', 'label' => 'Medium Gateway', 'priority' => 300],
+ ),
);
$this->compile();
@@ -51,17 +51,17 @@ public function it_registers_payment_gateways_configs_by_their_priority_in_the_r
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.form_registry.payum_gateway_config',
'add',
- ['gateway_config', 'low_gateway', 'LowGatewayClass']
+ ['gateway_config', 'low_gateway', 'LowGatewayClass'],
);
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.form_registry.payum_gateway_config',
'add',
- ['gateway_config', 'high_gateway', 'HighGatewayClass']
+ ['gateway_config', 'high_gateway', 'HighGatewayClass'],
);
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.form_registry.payum_gateway_config',
'add',
- ['gateway_config', 'medium_gateway', 'MediumGatewayClass']
+ ['gateway_config', 'medium_gateway', 'MediumGatewayClass'],
);
$this->assertSame(
@@ -71,7 +71,7 @@ public function it_registers_payment_gateways_configs_by_their_priority_in_the_r
'low_gateway' => 'Low Gateway',
'offline' => 'sylius.payum_gateway_factory.offline',
],
- $this->container->getParameter('sylius.gateway_factories')
+ $this->container->getParameter('sylius.gateway_factories'),
);
}
@@ -83,22 +83,22 @@ public function it_registers_payment_gateways_configs_with_default_priorities_in
'custom_low_priority_gateway',
(new Definition('LowGatewayClass'))->addTag(
'sylius.gateway_configuration_type',
- ['type' => 'low_gateway', 'label' => 'Low Gateway', 'priority' => 10]
- )
+ ['type' => 'low_gateway', 'label' => 'Low Gateway', 'priority' => 10],
+ ),
);
$this->setDefinition(
'custom_regular_priority_gateway',
(new Definition('RegularGatewayClass'))->addTag(
'sylius.gateway_configuration_type',
- ['type' => 'regular_gateway', 'label' => 'Regular Gateway']
- )
+ ['type' => 'regular_gateway', 'label' => 'Regular Gateway'],
+ ),
);
$this->setDefinition(
'custom_medium_priority_gateway',
(new Definition('MediumGatewayClass'))->addTag(
'sylius.gateway_configuration_type',
- ['type' => 'medium_gateway', 'label' => 'Medium Gateway', 'priority' => 300]
- )
+ ['type' => 'medium_gateway', 'label' => 'Medium Gateway', 'priority' => 300],
+ ),
);
$this->compile();
@@ -106,17 +106,17 @@ public function it_registers_payment_gateways_configs_with_default_priorities_in
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.form_registry.payum_gateway_config',
'add',
- ['gateway_config', 'low_gateway', 'LowGatewayClass']
+ ['gateway_config', 'low_gateway', 'LowGatewayClass'],
);
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.form_registry.payum_gateway_config',
'add',
- ['gateway_config', 'regular_gateway', 'RegularGatewayClass']
+ ['gateway_config', 'regular_gateway', 'RegularGatewayClass'],
);
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.form_registry.payum_gateway_config',
'add',
- ['gateway_config', 'medium_gateway', 'MediumGatewayClass']
+ ['gateway_config', 'medium_gateway', 'MediumGatewayClass'],
);
$this->assertSame(
@@ -126,7 +126,7 @@ public function it_registers_payment_gateways_configs_with_default_priorities_in
'offline' => 'sylius.payum_gateway_factory.offline',
'regular_gateway' => 'Regular Gateway',
],
- $this->container->getParameter('sylius.gateway_factories')
+ $this->container->getParameter('sylius.gateway_factories'),
);
}
diff --git a/src/Sylius/Bundle/PayumBundle/spec/Action/AuthorizePaymentActionSpec.php b/src/Sylius/Bundle/PayumBundle/spec/Action/AuthorizePaymentActionSpec.php
index 6a6a040f224..95194a57021 100644
--- a/src/Sylius/Bundle/PayumBundle/spec/Action/AuthorizePaymentActionSpec.php
+++ b/src/Sylius/Bundle/PayumBundle/spec/Action/AuthorizePaymentActionSpec.php
@@ -44,7 +44,7 @@ function it_should_perform_basic_authorize(
GatewayInterface $gateway,
Authorize $authorize,
PaymentInterface $payment,
- OrderInterface $order
+ OrderInterface $order,
): void {
$this->setGateway($gateway);
$payment->getOrder()->willReturn($order);
diff --git a/src/Sylius/Bundle/PayumBundle/spec/Action/CapturePaymentActionSpec.php b/src/Sylius/Bundle/PayumBundle/spec/Action/CapturePaymentActionSpec.php
index b2a925e0841..b53004e4444 100644
--- a/src/Sylius/Bundle/PayumBundle/spec/Action/CapturePaymentActionSpec.php
+++ b/src/Sylius/Bundle/PayumBundle/spec/Action/CapturePaymentActionSpec.php
@@ -44,7 +44,7 @@ function it_should_perform_basic_capture(
GatewayInterface $gateway,
Capture $capture,
PaymentInterface $payment,
- OrderInterface $order
+ OrderInterface $order,
): void {
$this->setGateway($gateway);
diff --git a/src/Sylius/Bundle/PayumBundle/spec/Action/Offline/ConvertPaymentActionSpec.php b/src/Sylius/Bundle/PayumBundle/spec/Action/Offline/ConvertPaymentActionSpec.php
index 4858cb18600..8eb97481455 100644
--- a/src/Sylius/Bundle/PayumBundle/spec/Action/Offline/ConvertPaymentActionSpec.php
+++ b/src/Sylius/Bundle/PayumBundle/spec/Action/Offline/ConvertPaymentActionSpec.php
@@ -43,7 +43,7 @@ function it_converts_payment_to_offline_action(Convert $request, PaymentInterfac
function it_supports_only_convert_request(
Convert $convertRequest,
Capture $captureRequest,
- PaymentInterface $payment
+ PaymentInterface $payment,
): void {
$convertRequest->getTo()->willReturn('array');
$convertRequest->getSource()->willReturn($payment);
@@ -56,7 +56,7 @@ function it_supports_only_converting_to_array_from_payment(
Convert $fromSomethingElseToSomethingElseRequest,
Convert $fromPaymentToArrayRequest,
PaymentInterface $payment,
- PaymentMethodInterface $method
+ PaymentMethodInterface $method,
): void {
$fromPaymentToArrayRequest->getTo()->willReturn('array');
$fromPaymentToArrayRequest->getSource()->willReturn($payment);
diff --git a/src/Sylius/Bundle/PayumBundle/spec/Action/Paypal/ExpressCheckout/ConvertPaymentActionSpec.php b/src/Sylius/Bundle/PayumBundle/spec/Action/Paypal/ExpressCheckout/ConvertPaymentActionSpec.php
index 4b549ce4548..542ec01924e 100644
--- a/src/Sylius/Bundle/PayumBundle/spec/Action/Paypal/ExpressCheckout/ConvertPaymentActionSpec.php
+++ b/src/Sylius/Bundle/PayumBundle/spec/Action/Paypal/ExpressCheckout/ConvertPaymentActionSpec.php
@@ -49,7 +49,7 @@ function it_executes_request_taking_one_tax_adjustment_to_account(
ProductVariantInterface $productVariant,
ProductInterface $product,
CustomerInterface $customer,
- AddressInterface $billingAddress
+ AddressInterface $billingAddress,
): void {
$request->getTo()->willReturn('array');
@@ -126,7 +126,7 @@ function it_executes_request_taking_shipping_promotion_to_account(
ProductVariantInterface $productVariant,
ProductInterface $product,
CustomerInterface $customer,
- AddressInterface $billingAddress
+ AddressInterface $billingAddress,
): void {
$request->getTo()->willReturn('array');
diff --git a/src/Sylius/Bundle/PayumBundle/spec/Action/ResolveNextRouteActionSpec.php b/src/Sylius/Bundle/PayumBundle/spec/Action/ResolveNextRouteActionSpec.php
index 766c5cb7079..1f7991796e3 100644
--- a/src/Sylius/Bundle/PayumBundle/spec/Action/ResolveNextRouteActionSpec.php
+++ b/src/Sylius/Bundle/PayumBundle/spec/Action/ResolveNextRouteActionSpec.php
@@ -28,7 +28,7 @@ function it_is_a_payum_action(): void
function it_resolves_next_route_for_completed_payment(
ResolveNextRoute $resolveNextRouteRequest,
- PaymentInterface $payment
+ PaymentInterface $payment,
): void {
$resolveNextRouteRequest->getFirstModel()->willReturn($payment);
$payment->getState()->willReturn(PaymentInterface::STATE_COMPLETED);
@@ -41,7 +41,7 @@ function it_resolves_next_route_for_completed_payment(
function it_resolves_next_route_for_cancelled_payment(
ResolveNextRoute $resolveNextRouteRequest,
PaymentInterface $payment,
- OrderInterface $order
+ OrderInterface $order,
): void {
$resolveNextRouteRequest->getFirstModel()->willReturn($payment);
$payment->getState()->willReturn(PaymentInterface::STATE_CANCELLED);
@@ -57,7 +57,7 @@ function it_resolves_next_route_for_cancelled_payment(
function it_resolves_next_route_for_payment_in_cart_state(
ResolveNextRoute $resolveNextRouteRequest,
PaymentInterface $payment,
- OrderInterface $order
+ OrderInterface $order,
): void {
$resolveNextRouteRequest->getFirstModel()->willReturn($payment);
$payment->getState()->willReturn(PaymentInterface::STATE_CART);
@@ -73,7 +73,7 @@ function it_resolves_next_route_for_payment_in_cart_state(
function it_resolves_next_route_for_faild_payment(
ResolveNextRoute $resolveNextRouteRequest,
PaymentInterface $payment,
- OrderInterface $order
+ OrderInterface $order,
): void {
$resolveNextRouteRequest->getFirstModel()->willReturn($payment);
$payment->getState()->willReturn(PaymentInterface::STATE_FAILED);
@@ -89,7 +89,7 @@ function it_resolves_next_route_for_faild_payment(
function it_resolves_next_route_for_processing_payment(
ResolveNextRoute $resolveNextRouteRequest,
PaymentInterface $payment,
- OrderInterface $order
+ OrderInterface $order,
): void {
$resolveNextRouteRequest->getFirstModel()->willReturn($payment);
$payment->getState()->willReturn(PaymentInterface::STATE_PROCESSING);
diff --git a/src/Sylius/Bundle/ProductBundle/Controller/ProductAttributeController.php b/src/Sylius/Bundle/ProductBundle/Controller/ProductAttributeController.php
index fc7a991b9ec..7dc75fd5bf9 100644
--- a/src/Sylius/Bundle/ProductBundle/Controller/ProductAttributeController.php
+++ b/src/Sylius/Bundle/ProductBundle/Controller/ProductAttributeController.php
@@ -30,7 +30,7 @@ public function getAttributeTypesAction(Request $request, string $template): Res
[
'types' => $this->get('sylius.registry.attribute_type')->all(),
'metadata' => $this->metadata,
- ]
+ ],
);
}
@@ -99,7 +99,7 @@ protected function getAttributeFormsInAllLocales(AttributeInterface $attribute,
private function createFormAndView(
$attributeForm,
- AttributeInterface $attribute
+ AttributeInterface $attribute,
): FormView {
return $this
->get('form.factory')
@@ -107,8 +107,9 @@ private function createFormAndView(
'value',
$attributeForm,
null,
- ['label' => $attribute->getName(), 'configuration' => $attribute->getConfiguration()]
+ ['label' => $attribute->getName(), 'configuration' => $attribute->getConfiguration()],
)
- ->createView();
+ ->createView()
+ ;
}
}
diff --git a/src/Sylius/Bundle/ProductBundle/Doctrine/ORM/ProductVariantRepository.php b/src/Sylius/Bundle/ProductBundle/Doctrine/ORM/ProductVariantRepository.php
index f339dbfe675..de3067996dd 100644
--- a/src/Sylius/Bundle/ProductBundle/Doctrine/ORM/ProductVariantRepository.php
+++ b/src/Sylius/Bundle/ProductBundle/Doctrine/ORM/ProductVariantRepository.php
@@ -120,7 +120,7 @@ public function findByPhraseAndProductCode(string $phrase, string $locale, strin
->andWhere('product.code = :productCode')
->andWhere($expr->orX(
'translation.name LIKE :phrase',
- 'o.code LIKE :phrase'
+ 'o.code LIKE :phrase',
))
->setParameter('phrase', '%' . $phrase . '%')
->setParameter('locale', $locale)
diff --git a/src/Sylius/Bundle/ProductBundle/Form/DataTransformer/ProductVariantToProductOptionsTransformer.php b/src/Sylius/Bundle/ProductBundle/Form/DataTransformer/ProductVariantToProductOptionsTransformer.php
index eb1a1d94f06..a71c6160905 100644
--- a/src/Sylius/Bundle/ProductBundle/Form/DataTransformer/ProductVariantToProductOptionsTransformer.php
+++ b/src/Sylius/Bundle/ProductBundle/Form/DataTransformer/ProductVariantToProductOptionsTransformer.php
@@ -44,10 +44,10 @@ public function transform($value): array
return array_combine(
array_map(
- fn(ProductOptionValueInterface $productOptionValue): string => (string) $productOptionValue->getOptionCode(),
- $value->getOptionValues()->toArray()
+ fn (ProductOptionValueInterface $productOptionValue): string => (string) $productOptionValue->getOptionCode(),
+ $value->getOptionValues()->toArray(),
),
- $value->getOptionValues()->toArray()
+ $value->getOptionValues()->toArray(),
);
}
@@ -84,7 +84,7 @@ private function matches(array $optionValues): ProductVariantInterface
throw new TransformationFailedException(sprintf(
'Variant "%s" not found for product %s',
!empty($optionValues[0]) ? $optionValues[0]->getCode() : '',
- $this->product->getCode()
+ $this->product->getCode(),
));
}
}
diff --git a/src/Sylius/Bundle/ProductBundle/Form/DataTransformer/ProductsToProductAssociationsTransformer.php b/src/Sylius/Bundle/ProductBundle/Form/DataTransformer/ProductsToProductAssociationsTransformer.php
index ab9c142892d..0b6f3fbe23e 100644
--- a/src/Sylius/Bundle/ProductBundle/Form/DataTransformer/ProductsToProductAssociationsTransformer.php
+++ b/src/Sylius/Bundle/ProductBundle/Form/DataTransformer/ProductsToProductAssociationsTransformer.php
@@ -41,7 +41,7 @@ final class ProductsToProductAssociationsTransformer implements DataTransformerI
public function __construct(
FactoryInterface $productAssociationFactory,
ProductRepositoryInterface $productRepository,
- RepositoryInterface $productAssociationTypeRepository
+ RepositoryInterface $productAssociationTypeRepository,
) {
$this->productAssociationFactory = $productAssociationFactory;
$this->productRepository = $productRepository;
@@ -132,7 +132,7 @@ private function getProductAssociationByTypeCode(string $productAssociationTypeC
private function setAssociatedProductsByProductCodes(
ProductAssociationInterface $productAssociation,
- string $productCodes
+ string $productCodes,
): void {
$products = $this->productRepository->findBy(['code' => explode(',', $productCodes)]);
diff --git a/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/BuildAttributesFormSubscriber.php b/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/BuildAttributesFormSubscriber.php
index 30b2cad6524..996cbf2be2d 100644
--- a/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/BuildAttributesFormSubscriber.php
+++ b/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/BuildAttributesFormSubscriber.php
@@ -32,7 +32,7 @@ final class BuildAttributesFormSubscriber implements EventSubscriberInterface
public function __construct(
FactoryInterface $attributeValueFactory,
- TranslationLocaleProviderInterface $localeProvider
+ TranslationLocaleProviderInterface $localeProvider,
) {
$this->attributeValueFactory = $attributeValueFactory;
$this->localeProvider = $localeProvider;
@@ -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 */
@@ -100,7 +100,7 @@ private function resolveLocalizedAttributes(ProductInterface $product, ProductAt
private function createProductAttributeValue(
ProductAttributeInterface $attribute,
- string $localeCode
+ string $localeCode,
): ProductAttributeValueInterface {
/** @var ProductAttributeValueInterface $attributeValue */
$attributeValue = $this->attributeValueFactory->createNew();
diff --git a/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/BuildProductVariantFormSubscriber.php b/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/BuildProductVariantFormSubscriber.php
index f3f7bde917c..7ebad54b325 100644
--- a/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/BuildProductVariantFormSubscriber.php
+++ b/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/BuildProductVariantFormSubscriber.php
@@ -63,7 +63,7 @@ public function preSetData(FormEvent $event): void
'disabled' => $this->disabled,
'options' => $product->getOptions(),
'auto_initialize' => false,
- ]
+ ],
));
}
}
diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationTypeChoiceType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationTypeChoiceType.php
index e216a11d450..92abef1cea9 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 45b2dd4d946..02a9b92cd32 100644
--- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationsType.php
+++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationsType.php
@@ -30,7 +30,7 @@ final class ProductAssociationsType extends AbstractType
public function __construct(
RepositoryInterface $productAssociationTypeRepository,
- DataTransformerInterface $productsToProductAssociationsTransformer
+ DataTransformerInterface $productsToProductAssociationsTransformer,
) {
$this->productAssociationTypeRepository = $productAssociationTypeRepository;
$this->productsToProductAssociationsTransformer = $productsToProductAssociationsTransformer;
@@ -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 5756c3050f8..c2971d4722a 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/ProductCodeChoiceType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductCodeChoiceType.php
index dcee34e3e09..d91f09e7eec 100644
--- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductCodeChoiceType.php
+++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductCodeChoiceType.php
@@ -31,7 +31,7 @@ public function __construct(RepositoryInterface $productRepository)
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->addModelTransformer(
- new ReversedTransformer(new ResourceToIdentifierTransformer($this->productRepository, 'code'))
+ new ReversedTransformer(new ResourceToIdentifierTransformer($this->productRepository, 'code')),
);
}
diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductGenerateVariantsType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductGenerateVariantsType.php
index e66447aaa33..6b44f86e29c 100644
--- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductGenerateVariantsType.php
+++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductGenerateVariantsType.php
@@ -41,7 +41,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'allow_delete' => true,
'by_reference' => false,
])
- ->addEventSubscriber($this->generateProductVariantsSubscriber);
+ ->addEventSubscriber($this->generateProductVariantsSubscriber)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductOptionChoiceType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductOptionChoiceType.php
index 27ab230b76b..f4e62e38d4d 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/ProductOptionValueChoiceType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductOptionValueChoiceType.php
index 5e5f3d4ec5a..1720624d774 100644
--- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductOptionValueChoiceType.php
+++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductOptionValueChoiceType.php
@@ -30,7 +30,7 @@ public function __construct(?AvailableProductOptionValuesResolverInterface $avai
if (null === $availableProductOptionValuesResolver) {
@trigger_error(
'Not passing availableProductOptionValuesResolver thru constructor is deprecated in Sylius 1.8 and ' .
- 'it will be removed in Sylius 2.0'
+ 'it will be removed in Sylius 2.0',
);
}
@@ -46,7 +46,7 @@ public function configureOptions(OptionsResolver $resolver): void
if (true === $options['only_available_values']) {
if (null === $options['product']) {
throw new \RuntimeException(
- 'You must specify the "product" option when "only_available_values" is true.'
+ 'You must specify the "product" option when "only_available_values" is true.',
);
}
@@ -56,14 +56,14 @@ public function configureOptions(OptionsResolver $resolver): void
'Cannot provide only available values in "%s" because a "%s" is required but ' .
'none has been set.',
__CLASS__,
- AvailableProductOptionValuesResolverInterface::class
- )
+ AvailableProductOptionValuesResolverInterface::class,
+ ),
);
}
return $this->availableProductOptionValuesResolver->resolve(
$options['product'],
- $productOption
+ $productOption,
);
}
diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductOptionValueCollectionType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductOptionValueCollectionType.php
index 48c8e6453dc..fd8b1d2f624 100644
--- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductOptionValueCollectionType.php
+++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductOptionValueCollectionType.php
@@ -41,7 +41,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
foreach ($options['options'] as $i => $option) {
if (!$option instanceof ProductOptionInterface) {
throw new InvalidConfigurationException(
- sprintf('Each object passed as option list must implement "%s"', ProductOptionInterface::class)
+ sprintf('Each object passed as option list must implement "%s"', ProductOptionInterface::class),
);
}
@@ -76,7 +76,7 @@ private function assertOptionsAreValid($options): void
{
Assert::true(
isset($options['options']) && is_iterable($options['options']),
- 'array or (\Traversable and \ArrayAccess) of "Sylius\Component\Product\Model\ProductOptionInterface" must be passed to collection'
+ 'array or (\Traversable and \ArrayAccess) of "Sylius\Component\Product\Model\ProductOptionInterface" must be passed to collection',
);
}
diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductType.php
index 9fe06a54175..828cd7f903e 100644
--- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductType.php
+++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductType.php
@@ -42,7 +42,7 @@ public function __construct(
array $validationGroups,
ProductVariantResolverInterface $variantResolver,
FactoryInterface $attributeValueFactory,
- TranslationLocaleProviderInterface $localeProvider
+ TranslationLocaleProviderInterface $localeProvider,
) {
parent::__construct($dataClass, $validationGroups);
diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductVariantChoiceType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductVariantChoiceType.php
index ee7ff0a117c..a22cf283477 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 4cb3fff17dd..1ab978aa004 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/spec/EventListener/SelectProductAttributeChoiceRemoveListenerSpec.php b/src/Sylius/Bundle/ProductBundle/spec/EventListener/SelectProductAttributeChoiceRemoveListenerSpec.php
index f1715da68a4..6d8be77dc47 100644
--- a/src/Sylius/Bundle/ProductBundle/spec/EventListener/SelectProductAttributeChoiceRemoveListenerSpec.php
+++ b/src/Sylius/Bundle/ProductBundle/spec/EventListener/SelectProductAttributeChoiceRemoveListenerSpec.php
@@ -37,7 +37,7 @@ function it_removes_select_product_attribute_choices(
EntityManagerInterface $entityManager,
ProductAttributeValueRepositoryInterface $productAttributeValueRepository,
ProductAttributeInterface $productAttribute,
- ProductAttributeValueInterface $productAttributeValue
+ ProductAttributeValueInterface $productAttributeValue,
): void {
$event->getEntity()->willReturn($productAttribute);
$event->getEntityManager()->willReturn($entityManager);
@@ -83,7 +83,7 @@ function it_removes_select_product_attribute_choices(
function it_does_not_remove_select_product_attribute_choices_if_there_is_only_added_new_choice(
LifecycleEventArgs $event,
EntityManagerInterface $entityManager,
- ProductAttributeInterface $productAttribute
+ ProductAttributeInterface $productAttribute,
): void {
$event->getEntity()->willReturn($productAttribute);
$event->getEntityManager()->willReturn($entityManager);
@@ -114,7 +114,7 @@ function it_does_not_remove_select_product_attribute_choices_if_there_is_only_ad
function it_does_not_remove_select_product_attribute_choices_if_there_is_only_changed_value(
LifecycleEventArgs $event,
EntityManagerInterface $entityManager,
- ProductAttributeInterface $productAttribute
+ ProductAttributeInterface $productAttribute,
): void {
$event->getEntity()->willReturn($productAttribute);
$event->getEntityManager()->willReturn($entityManager);
@@ -145,7 +145,7 @@ function it_does_not_remove_select_product_attribute_choices_if_there_is_only_ch
function it_does_nothing_if_an_entity_is_not_a_product_attribute(
EntityManagerInterface $entityManager,
- LifecycleEventArgs $event
+ LifecycleEventArgs $event,
): void {
$event->getEntity()->willReturn('wrongObject');
@@ -159,7 +159,7 @@ function it_does_nothing_if_an_entity_is_not_a_product_attribute(
function it_does_nothing_if_a_product_attribute_has_not_a_select_type(
LifecycleEventArgs $event,
EntityManagerInterface $entityManager,
- ProductAttributeInterface $productAttribute
+ ProductAttributeInterface $productAttribute,
): void {
$event->getEntity()->willReturn($productAttribute);
$productAttribute->getType()->willReturn('wrongType');
diff --git a/src/Sylius/Bundle/ProductBundle/spec/Form/DataTransformer/ProductVariantToProductOptionsTransformerSpec.php b/src/Sylius/Bundle/ProductBundle/spec/Form/DataTransformer/ProductVariantToProductOptionsTransformerSpec.php
index e86321cf370..30e45e4b9f1 100644
--- a/src/Sylius/Bundle/ProductBundle/spec/Form/DataTransformer/ProductVariantToProductOptionsTransformerSpec.php
+++ b/src/Sylius/Bundle/ProductBundle/spec/Form/DataTransformer/ProductVariantToProductOptionsTransformerSpec.php
@@ -73,20 +73,21 @@ function it_does_not_reverse_transform_not_supported_data_and_throw_exception():
function it_throws_exception_when_trying_to_reverse_transform_variable_without_variants(
ProductInterface $variable,
- ProductOptionValueInterface $optionValue
+ ProductOptionValueInterface $optionValue,
): void {
$variable->getVariants()->willReturn(new ArrayCollection([]));
$variable->getCode()->willReturn('example');
$this
->shouldThrow(TransformationFailedException::class)
- ->duringReverseTransform([$optionValue]);
+ ->duringReverseTransform([$optionValue])
+ ;
}
function it_reverse_transforms_variable_with_variants_if_options_match(
ProductInterface $variable,
ProductVariantInterface $variant,
- ProductOptionValueInterface $optionValue
+ ProductOptionValueInterface $optionValue,
): void {
$variable->getVariants()->willReturn(new ArrayCollection([$variant->getWrappedObject()]));
@@ -98,7 +99,7 @@ function it_reverse_transforms_variable_with_variants_if_options_match(
function it_throws_exception_when_trying_to_reverse_transform_variable_with_variants_if_options_not_match(
ProductInterface $variable,
ProductVariantInterface $variant,
- ProductOptionValueInterface $optionValue
+ ProductOptionValueInterface $optionValue,
): void {
$variable->getVariants()->willReturn(new ArrayCollection([$variant->getWrappedObject()]));
$variable->getCode()->willReturn('example');
@@ -107,18 +108,20 @@ function it_throws_exception_when_trying_to_reverse_transform_variable_with_vari
$this
->shouldThrow(TransformationFailedException::class)
- ->duringReverseTransform([$optionValue]);
+ ->duringReverseTransform([$optionValue])
+ ;
}
function it_throws_exception_when_trying_to_reverse_transform_variable_with_variants_if_options_are_missing(
ProductInterface $variable,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$variable->getVariants()->willReturn(new ArrayCollection([$variant->getWrappedObject()]));
$variable->getCode()->willReturn('example');
$this
->shouldThrow(TransformationFailedException::class)
- ->duringReverseTransform([null]);
+ ->duringReverseTransform([null])
+ ;
}
}
diff --git a/src/Sylius/Bundle/ProductBundle/spec/Form/DataTransformer/ProductsToProductAssociationsTransformerSpec.php b/src/Sylius/Bundle/ProductBundle/spec/Form/DataTransformer/ProductsToProductAssociationsTransformerSpec.php
index 499ae989791..24653ebe086 100644
--- a/src/Sylius/Bundle/ProductBundle/spec/Form/DataTransformer/ProductsToProductAssociationsTransformerSpec.php
+++ b/src/Sylius/Bundle/ProductBundle/spec/Form/DataTransformer/ProductsToProductAssociationsTransformerSpec.php
@@ -28,12 +28,12 @@ final class ProductsToProductAssociationsTransformerSpec extends ObjectBehavior
function let(
FactoryInterface $productAssociationFactory,
ProductRepositoryInterface $productRepository,
- RepositoryInterface $productAssociationTypeRepository
+ RepositoryInterface $productAssociationTypeRepository,
): void {
$this->beConstructedWith(
$productAssociationFactory,
$productRepository,
- $productAssociationTypeRepository
+ $productAssociationTypeRepository,
);
}
@@ -51,14 +51,14 @@ function it_transforms_product_associations_to_array(
ProductAssociationInterface $productAssociation,
ProductAssociationTypeInterface $productAssociationType,
ProductInterface $firstAssociatedProduct,
- ProductInterface $secondAssociatedProduct
+ ProductInterface $secondAssociatedProduct,
): void {
$productAssociation->getType()->willReturn($productAssociationType);
$productAssociation->getAssociatedProducts()->willReturn(
new ArrayCollection([
$firstAssociatedProduct->getWrappedObject(),
$secondAssociatedProduct->getWrappedObject(),
- ])
+ ]),
);
$firstAssociatedProduct->getCode()->willReturn('FIRST');
diff --git a/src/Sylius/Bundle/ProductBundle/spec/Form/EventSubscriber/BuildAttributesFormSubscriberSpec.php b/src/Sylius/Bundle/ProductBundle/spec/Form/EventSubscriber/BuildAttributesFormSubscriberSpec.php
index a6cfb8023df..1054dad9700 100644
--- a/src/Sylius/Bundle/ProductBundle/spec/Form/EventSubscriber/BuildAttributesFormSubscriberSpec.php
+++ b/src/Sylius/Bundle/ProductBundle/spec/Form/EventSubscriber/BuildAttributesFormSubscriberSpec.php
@@ -45,7 +45,7 @@ function it_adds_attribute_values_in_different_locales_to_a_product(
ProductInterface $product,
ProductAttributeInterface $attribute,
ProductAttributeValueInterface $attributeValue,
- ProductAttributeValueInterface $newAttributeValue
+ ProductAttributeValueInterface $newAttributeValue,
): void {
$event->getData()->willReturn($product);
@@ -74,7 +74,7 @@ function it_removes_empty_attribute_values_in_different_locales(
ProductInterface $product,
ProductAttributeInterface $attribute,
ProductAttributeValueInterface $attributeValue,
- ProductAttributeValueInterface $attributeValue2
+ ProductAttributeValueInterface $attributeValue2,
): void {
$event->getData()->willReturn($product);
diff --git a/src/Sylius/Bundle/ProductBundle/spec/Form/EventSubscriber/BuildProductVariantFormSubscriberSpec.php b/src/Sylius/Bundle/ProductBundle/spec/Form/EventSubscriber/BuildProductVariantFormSubscriberSpec.php
index 5857121df71..306c71e8f3a 100644
--- a/src/Sylius/Bundle/ProductBundle/spec/Form/EventSubscriber/BuildProductVariantFormSubscriberSpec.php
+++ b/src/Sylius/Bundle/ProductBundle/spec/Form/EventSubscriber/BuildProductVariantFormSubscriberSpec.php
@@ -35,7 +35,7 @@ function let(FormFactoryInterface $factory): void
function it_subscribes_to_event(): void
{
static::getSubscribedEvents()->shouldReturn(
- [FormEvents::PRE_SET_DATA => 'preSetData']
+ [FormEvents::PRE_SET_DATA => 'preSetData'],
);
}
@@ -47,7 +47,7 @@ function it_adds_options_on_pre_set_data_event_with_configurable_options(
ProductInterface $variable,
ProductOptionInterface $options,
ProductOptionValueInterface $optionValue,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$event->getForm()->willReturn($form);
$event->getData()->willReturn($variant);
@@ -65,7 +65,7 @@ function it_adds_options_on_pre_set_data_event_with_configurable_options(
'options' => new ArrayCollection([$options->getWrappedObject()]),
'auto_initialize' => false,
'disabled' => false,
- ]
+ ],
)->willReturn($optionsForm);
$form->add($optionsForm)->shouldBeCalled();
@@ -81,7 +81,7 @@ function it_adds_options_on_pre_set_data_event_without_configurable_options(
ProductInterface $variable,
ProductOptionInterface $options,
ProductOptionValueInterface $optionValue,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$this->beConstructedWith($factory, true);
@@ -101,7 +101,7 @@ function it_adds_options_on_pre_set_data_event_without_configurable_options(
'options' => new ArrayCollection([$options->getWrappedObject()]),
'auto_initialize' => false,
'disabled' => true,
- ]
+ ],
)->willReturn($optionsForm);
$form->add($optionsForm)->shouldBeCalled();
diff --git a/src/Sylius/Bundle/ProductBundle/spec/Validator/ProductVariantCombinationValidatorSpec.php b/src/Sylius/Bundle/ProductBundle/spec/Validator/ProductVariantCombinationValidatorSpec.php
index 3521dd57299..607fc8d0903 100644
--- a/src/Sylius/Bundle/ProductBundle/spec/Validator/ProductVariantCombinationValidatorSpec.php
+++ b/src/Sylius/Bundle/ProductBundle/spec/Validator/ProductVariantCombinationValidatorSpec.php
@@ -39,7 +39,7 @@ function it_does_not_add_violation_if_product_does_not_have_options(
ExecutionContextInterface $context,
ProductInterface $product,
ProductVariantInterface $variant,
- ProductVariantsParityCheckerInterface $variantsParityChecker
+ ProductVariantsParityCheckerInterface $variantsParityChecker,
): void {
$constraint = new ProductVariantCombination([
'message' => 'Variant with given options already exists',
@@ -61,7 +61,7 @@ function it_does_not_add_violation_if_product_does_not_have_variants(
ExecutionContextInterface $context,
ProductInterface $product,
ProductVariantInterface $variant,
- ProductVariantsParityCheckerInterface $variantsParityChecker
+ ProductVariantsParityCheckerInterface $variantsParityChecker,
): void {
$constraint = new ProductVariantCombination([
'message' => 'Variant with given options already exists',
@@ -83,7 +83,7 @@ function it_adds_violation_if_variant_with_given_same_options_already_exists(
ExecutionContextInterface $context,
ProductInterface $product,
ProductVariantInterface $variant,
- ProductVariantsParityCheckerInterface $variantsParityChecker
+ ProductVariantsParityCheckerInterface $variantsParityChecker,
): void {
$constraint = new ProductVariantCombination([
'message' => 'Variant with given options already exists',
diff --git a/src/Sylius/Bundle/ProductBundle/spec/Validator/UniqueSimpleProductCodeValidatorSpec.php b/src/Sylius/Bundle/ProductBundle/spec/Validator/UniqueSimpleProductCodeValidatorSpec.php
index 9c53ed700e7..0b90614001b 100644
--- a/src/Sylius/Bundle/ProductBundle/spec/Validator/UniqueSimpleProductCodeValidatorSpec.php
+++ b/src/Sylius/Bundle/ProductBundle/spec/Validator/UniqueSimpleProductCodeValidatorSpec.php
@@ -38,7 +38,7 @@ function it_is_a_constraint_validator(): void
function it_does_not_add_violation_if_product_is_configurable(
ExecutionContextInterface $context,
- ProductInterface $product
+ ProductInterface $product,
): void {
$constraint = new UniqueSimpleProductCode([
'message' => 'Simple product code has to be unique',
@@ -54,7 +54,7 @@ function it_does_not_add_violation_if_product_is_configurable(
function it_does_not_add_violation_if_product_is_simple_but_code_has_not_been_used_among_neither_producs_nor_product_variants(
ExecutionContextInterface $context,
ProductInterface $product,
- ProductVariantRepositoryInterface $productVariantRepository
+ ProductVariantRepositoryInterface $productVariantRepository,
): void {
$constraint = new UniqueSimpleProductCode([
'message' => 'Simple product code has to be unique',
@@ -74,7 +74,7 @@ function it_does_not_add_violation_if_product_is_simple_code_has_been_used_but_f
ExecutionContextInterface $context,
ProductInterface $product,
ProductVariantInterface $existingProductVariant,
- ProductVariantRepositoryInterface $productVariantRepository
+ ProductVariantRepositoryInterface $productVariantRepository,
): void {
$constraint = new UniqueSimpleProductCode([
'message' => 'Simple product code has to be unique',
@@ -98,7 +98,7 @@ function it_add_violation_if_product_is_simple_and_code_has_been_used_in_other_p
ProductInterface $existingProduct,
ProductVariantInterface $existingProductVariant,
ProductVariantRepositoryInterface $productVariantRepository,
- ConstraintViolationBuilderInterface $constraintViolationBuilder
+ ConstraintViolationBuilderInterface $constraintViolationBuilder,
): void {
$constraint = new UniqueSimpleProductCode([
'message' => 'Simple product code has to be unique',
diff --git a/src/Sylius/Bundle/ProductBundle/test/src/Tests/SyliusProductBundleTest.php b/src/Sylius/Bundle/ProductBundle/test/src/Tests/SyliusProductBundleTest.php
index 81f59ca93ce..7f2e51fe95c 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/Command/GenerateCouponsCommand.php b/src/Sylius/Bundle/PromotionBundle/Command/GenerateCouponsCommand.php
index 7a18c600c8c..d236b25b1dd 100644
--- a/src/Sylius/Bundle/PromotionBundle/Command/GenerateCouponsCommand.php
+++ b/src/Sylius/Bundle/PromotionBundle/Command/GenerateCouponsCommand.php
@@ -34,7 +34,7 @@ final class GenerateCouponsCommand extends Command
public function __construct(
PromotionRepositoryInterface $promotionRepository,
- PromotionCouponGeneratorInterface $couponGenerator
+ PromotionCouponGeneratorInterface $couponGenerator,
) {
parent::__construct();
@@ -74,7 +74,7 @@ public function execute(InputInterface $input, OutputInterface $output): int
$instruction = $this->getGeneratorInstructions(
(int) $input->getArgument('count'),
- (int) $input->getOption('length')
+ (int) $input->getOption('length'),
);
try {
diff --git a/src/Sylius/Bundle/PromotionBundle/Controller/PromotionCouponController.php b/src/Sylius/Bundle/PromotionBundle/Controller/PromotionCouponController.php
index 4e29368250e..f90235deef0 100644
--- a/src/Sylius/Bundle/PromotionBundle/Controller/PromotionCouponController.php
+++ b/src/Sylius/Bundle/PromotionBundle/Controller/PromotionCouponController.php
@@ -59,7 +59,7 @@ public function generateAction(Request $request): Response
'metadata' => $this->metadata,
'promotion' => $promotion,
'form' => $form->createView(),
- ]
+ ],
);
}
diff --git a/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Compiler/CompositePromotionCouponEligibilityCheckerPass.php b/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Compiler/CompositePromotionCouponEligibilityCheckerPass.php
index 93a4ff81f24..c533fcbb02f 100644
--- a/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Compiler/CompositePromotionCouponEligibilityCheckerPass.php
+++ b/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Compiler/CompositePromotionCouponEligibilityCheckerPass.php
@@ -27,8 +27,8 @@ public function process(ContainerBuilder $container): void
$container->getDefinition('sylius.promotion_coupon_eligibility_checker')->setArguments([
array_map(
- fn($id) => new Reference($id),
- array_keys($container->findTaggedServiceIds('sylius.promotion_coupon_eligibility_checker'))
+ 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 fb8212e5043..d662a5002d9 100644
--- a/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Compiler/CompositePromotionEligibilityCheckerPass.php
+++ b/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Compiler/CompositePromotionEligibilityCheckerPass.php
@@ -27,8 +27,8 @@ public function process(ContainerBuilder $container): void
$container->getDefinition('sylius.promotion_eligibility_checker')->setArguments([
array_map(
- fn($id) => new Reference($id),
- array_keys($container->findTaggedServiceIds('sylius.promotion_eligibility_checker'))
+ fn ($id) => new Reference($id),
+ array_keys($container->findTaggedServiceIds('sylius.promotion_eligibility_checker')),
),
]);
}
diff --git a/src/Sylius/Bundle/PromotionBundle/Doctrine/ORM/PromotionCouponRepository.php b/src/Sylius/Bundle/PromotionBundle/Doctrine/ORM/PromotionCouponRepository.php
index 9b9b3406bb0..72b39f6a889 100644
--- a/src/Sylius/Bundle/PromotionBundle/Doctrine/ORM/PromotionCouponRepository.php
+++ b/src/Sylius/Bundle/PromotionBundle/Doctrine/ORM/PromotionCouponRepository.php
@@ -31,7 +31,7 @@ public function createQueryBuilderByPromotionId($promotionId): QueryBuilder
public function countByCodeLength(
int $codeLength,
?string $prefix = null,
- ?string $suffix = null
+ ?string $suffix = null,
): int {
if ($prefix !== null) {
$codeLength += strlen($prefix);
diff --git a/src/Sylius/Bundle/PromotionBundle/Form/Type/Core/AbstractConfigurationCollectionType.php b/src/Sylius/Bundle/PromotionBundle/Form/Type/Core/AbstractConfigurationCollectionType.php
index 16c12d3a792..2940b6b5d5c 100644
--- a/src/Sylius/Bundle/PromotionBundle/Form/Type/Core/AbstractConfigurationCollectionType.php
+++ b/src/Sylius/Bundle/PromotionBundle/Form/Type/Core/AbstractConfigurationCollectionType.php
@@ -40,8 +40,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
$options['entry_type'],
array_replace(
$options['entry_options'],
- ['configuration_type' => $type]
- )
+ ['configuration_type' => $type],
+ ),
);
$prototypes[$type] = $formBuilder->getForm();
diff --git a/src/Sylius/Bundle/PromotionBundle/Tests/Command/GenerateCouponsCommandTest.php b/src/Sylius/Bundle/PromotionBundle/Tests/Command/GenerateCouponsCommandTest.php
index 50ff1f31ecc..4a5af6814db 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
@@ -111,7 +110,8 @@ public function it_handles_generator_exceptions_gracefully(): void
$this->promotionRepository
->method('findOneBy')
->with($this->equalTo(['code' => 'VALID_PROMOTION']))
- ->willReturn($promotion);
+ ->willReturn($promotion)
+ ;
$expectedInstructions = new PromotionCouponGeneratorInstruction();
$expectedInstructions->setAmount(10);
@@ -121,7 +121,7 @@ public function it_handles_generator_exceptions_gracefully(): void
->method('generate')
->with(
$this->equalTo($promotion),
- $this->equalTo($expectedInstructions)
+ $this->equalTo($expectedInstructions),
)
->willThrowException(new InvalidArgumentException('Could not generate'))
;
@@ -149,7 +149,8 @@ public function it_generates_coupons_with_default_length(): void
$this->promotionRepository
->method('findOneBy')
->with($this->equalTo(['code' => 'VALID_PROMOTION']))
- ->willReturn($promotion);
+ ->willReturn($promotion)
+ ;
$expectedInstructions = new PromotionCouponGeneratorInstruction();
$expectedInstructions->setAmount(5);
@@ -160,7 +161,7 @@ public function it_generates_coupons_with_default_length(): void
->method('generate')
->with(
$this->equalTo($promotion),
- $this->equalTo($expectedInstructions)
+ $this->equalTo($expectedInstructions),
)
;
@@ -187,7 +188,8 @@ public function it_generates_coupons_with_customized_length(): void
$this->promotionRepository
->method('findOneBy')
->with($this->equalTo(['code' => 'VALID_PROMOTION']))
- ->willReturn($promotion);
+ ->willReturn($promotion)
+ ;
$expectedInstructions = new PromotionCouponGeneratorInstruction();
$expectedInstructions->setAmount(10);
@@ -198,7 +200,7 @@ public function it_generates_coupons_with_customized_length(): void
->method('generate')
->with(
$this->equalTo($promotion),
- $this->equalTo($expectedInstructions)
+ $this->equalTo($expectedInstructions),
)
;
@@ -208,7 +210,7 @@ public function it_generates_coupons_with_customized_length(): void
'promotion-code' => 'VALID_PROMOTION',
'count' => 10,
'--length' => 7,
- ]
+ ],
);
// the output of the command in the console
diff --git a/src/Sylius/Bundle/PromotionBundle/Tests/DependencyInjection/Compiler/CompositePromotionCouponEligibilityCheckerPassTest.php b/src/Sylius/Bundle/PromotionBundle/Tests/DependencyInjection/Compiler/CompositePromotionCouponEligibilityCheckerPassTest.php
index 9dc049ca0f9..3c3fba16c24 100644
--- a/src/Sylius/Bundle/PromotionBundle/Tests/DependencyInjection/Compiler/CompositePromotionCouponEligibilityCheckerPassTest.php
+++ b/src/Sylius/Bundle/PromotionBundle/Tests/DependencyInjection/Compiler/CompositePromotionCouponEligibilityCheckerPassTest.php
@@ -29,7 +29,7 @@ public function it_collects_tagged_promotion_coupon_eligibility_checkers(): void
$this->setDefinition('sylius.promotion_coupon_eligibility_checker', new Definition());
$this->setDefinition(
'sylius.promotion_coupon_eligibility_checker.tagged',
- (new Definition())->addTag('sylius.promotion_coupon_eligibility_checker')
+ (new Definition())->addTag('sylius.promotion_coupon_eligibility_checker'),
);
$this->compile();
@@ -37,7 +37,7 @@ public function it_collects_tagged_promotion_coupon_eligibility_checkers(): void
$this->assertContainerBuilderHasServiceDefinitionWithArgument(
'sylius.promotion_coupon_eligibility_checker',
0,
- [new Reference('sylius.promotion_coupon_eligibility_checker.tagged')]
+ [new Reference('sylius.promotion_coupon_eligibility_checker.tagged')],
);
}
diff --git a/src/Sylius/Bundle/PromotionBundle/Tests/DependencyInjection/Compiler/CompositePromotionEligibilityCheckerPassTest.php b/src/Sylius/Bundle/PromotionBundle/Tests/DependencyInjection/Compiler/CompositePromotionEligibilityCheckerPassTest.php
index 8af57487373..6885ae6a143 100644
--- a/src/Sylius/Bundle/PromotionBundle/Tests/DependencyInjection/Compiler/CompositePromotionEligibilityCheckerPassTest.php
+++ b/src/Sylius/Bundle/PromotionBundle/Tests/DependencyInjection/Compiler/CompositePromotionEligibilityCheckerPassTest.php
@@ -29,7 +29,7 @@ public function it_collects_tagged_promotion_eligibility_checkers(): void
$this->setDefinition('sylius.promotion_eligibility_checker', new Definition());
$this->setDefinition(
'sylius.promotion_eligibility_checker.tagged',
- (new Definition())->addTag('sylius.promotion_eligibility_checker')
+ (new Definition())->addTag('sylius.promotion_eligibility_checker'),
);
$this->compile();
@@ -37,7 +37,7 @@ public function it_collects_tagged_promotion_eligibility_checkers(): void
$this->assertContainerBuilderHasServiceDefinitionWithArgument(
'sylius.promotion_eligibility_checker',
0,
- [new Reference('sylius.promotion_eligibility_checker.tagged')]
+ [new Reference('sylius.promotion_eligibility_checker.tagged')],
);
}
diff --git a/src/Sylius/Bundle/PromotionBundle/Tests/DependencyInjection/Compiler/RegisterPromotionActionsPassTest.php b/src/Sylius/Bundle/PromotionBundle/Tests/DependencyInjection/Compiler/RegisterPromotionActionsPassTest.php
index 87b8ecdb324..ede2d78d10c 100644
--- a/src/Sylius/Bundle/PromotionBundle/Tests/DependencyInjection/Compiler/RegisterPromotionActionsPassTest.php
+++ b/src/Sylius/Bundle/PromotionBundle/Tests/DependencyInjection/Compiler/RegisterPromotionActionsPassTest.php
@@ -32,7 +32,7 @@ public function it_registers_collected_promotion_actions_in_the_registry(): void
'action',
(new Definition())
->addTag('sylius.promotion_action', ['type' => 'custom', 'label' => 'Label 1', 'form_type' => 'FQCN1'])
- ->addTag('sylius.promotion_action', ['type' => 'another_custom', 'label' => 'Label 2', 'form_type' => 'FQCN2'])
+ ->addTag('sylius.promotion_action', ['type' => 'another_custom', 'label' => 'Label 2', 'form_type' => 'FQCN2']),
);
$this->compile();
@@ -40,12 +40,12 @@ public function it_registers_collected_promotion_actions_in_the_registry(): void
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.registry_promotion_action',
'register',
- ['custom', new Reference('action')]
+ ['custom', new Reference('action')],
);
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.registry_promotion_action',
'register',
- ['another_custom', new Reference('action')]
+ ['another_custom', new Reference('action')],
);
}
@@ -60,14 +60,14 @@ public function it_creates_parameter_which_maps_promotion_action_type_to_label()
'action',
(new Definition())
->addTag('sylius.promotion_action', ['type' => 'custom', 'label' => 'Label 1', 'form_type' => 'FQCN1'])
- ->addTag('sylius.promotion_action', ['type' => 'another_custom', 'label' => 'Label 2', 'form_type' => 'FQCN2'])
+ ->addTag('sylius.promotion_action', ['type' => 'another_custom', 'label' => 'Label 2', 'form_type' => 'FQCN2']),
);
$this->compile();
$this->assertContainerBuilderHasParameter(
'sylius.promotion_actions',
- ['custom' => 'Label 1', 'another_custom' => 'Label 2']
+ ['custom' => 'Label 1', 'another_custom' => 'Label 2'],
);
}
@@ -82,7 +82,7 @@ public function it_registers_collected_promotion_actions_form_types_in_the_regis
'action',
(new Definition())
->addTag('sylius.promotion_action', ['type' => 'custom', 'label' => 'Label 1', 'form_type' => 'FQCN1'])
- ->addTag('sylius.promotion_action', ['type' => 'another_custom', 'label' => 'Label 2', 'form_type' => 'FQCN2'])
+ ->addTag('sylius.promotion_action', ['type' => 'another_custom', 'label' => 'Label 2', 'form_type' => 'FQCN2']),
);
$this->compile();
@@ -90,12 +90,12 @@ public function it_registers_collected_promotion_actions_form_types_in_the_regis
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.form_registry.promotion_action',
'add',
- ['custom', 'default', 'FQCN1']
+ ['custom', 'default', 'FQCN1'],
);
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.form_registry.promotion_action',
'add',
- ['another_custom', 'default', 'FQCN2']
+ ['another_custom', 'default', 'FQCN2'],
);
}
diff --git a/src/Sylius/Bundle/PromotionBundle/Tests/DependencyInjection/Compiler/RegisterRuleCheckersPassTest.php b/src/Sylius/Bundle/PromotionBundle/Tests/DependencyInjection/Compiler/RegisterRuleCheckersPassTest.php
index b39d000eb82..9a7dac62849 100644
--- a/src/Sylius/Bundle/PromotionBundle/Tests/DependencyInjection/Compiler/RegisterRuleCheckersPassTest.php
+++ b/src/Sylius/Bundle/PromotionBundle/Tests/DependencyInjection/Compiler/RegisterRuleCheckersPassTest.php
@@ -32,7 +32,7 @@ public function it_registers_collected_rule_checkers_in_the_registry(): void
'checker',
(new Definition())
->addTag('sylius.promotion_rule_checker', ['type' => 'custom', 'label' => 'Label 1', 'form_type' => 'FQCN1'])
- ->addTag('sylius.promotion_rule_checker', ['type' => 'another_custom', 'label' => 'Label 2', 'form_type' => 'FQCN2'])
+ ->addTag('sylius.promotion_rule_checker', ['type' => 'another_custom', 'label' => 'Label 2', 'form_type' => 'FQCN2']),
);
$this->compile();
@@ -40,12 +40,12 @@ public function it_registers_collected_rule_checkers_in_the_registry(): void
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.registry_promotion_rule_checker',
'register',
- ['custom', new Reference('checker')]
+ ['custom', new Reference('checker')],
);
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.registry_promotion_rule_checker',
'register',
- ['another_custom', new Reference('checker')]
+ ['another_custom', new Reference('checker')],
);
}
@@ -60,14 +60,14 @@ public function it_creates_parameter_which_maps_rule_type_to_label(): void
'checker',
(new Definition())
->addTag('sylius.promotion_rule_checker', ['type' => 'custom', 'label' => 'Label 1', 'form_type' => 'FQCN1'])
- ->addTag('sylius.promotion_rule_checker', ['type' => 'another_custom', 'label' => 'Label 2', 'form_type' => 'FQCN2'])
+ ->addTag('sylius.promotion_rule_checker', ['type' => 'another_custom', 'label' => 'Label 2', 'form_type' => 'FQCN2']),
);
$this->compile();
$this->assertContainerBuilderHasParameter(
'sylius.promotion_rules',
- ['custom' => 'Label 1', 'another_custom' => 'Label 2']
+ ['custom' => 'Label 1', 'another_custom' => 'Label 2'],
);
}
@@ -82,7 +82,7 @@ public function it_registers_collected_rule_checkers_form_types_in_the_registry(
'checker',
(new Definition())
->addTag('sylius.promotion_rule_checker', ['type' => 'custom', 'label' => 'Label 1', 'form_type' => 'FQCN1'])
- ->addTag('sylius.promotion_rule_checker', ['type' => 'another_custom', 'label' => 'Label 2', 'form_type' => 'FQCN2'])
+ ->addTag('sylius.promotion_rule_checker', ['type' => 'another_custom', 'label' => 'Label 2', 'form_type' => 'FQCN2']),
);
$this->compile();
@@ -90,12 +90,12 @@ public function it_registers_collected_rule_checkers_form_types_in_the_registry(
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.form_registry.promotion_rule_checker',
'add',
- ['custom', 'default', 'FQCN1']
+ ['custom', 'default', 'FQCN1'],
);
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.form_registry.promotion_rule_checker',
'add',
- ['another_custom', 'default', 'FQCN2']
+ ['another_custom', 'default', 'FQCN2'],
);
}
diff --git a/src/Sylius/Bundle/PromotionBundle/Validator/CouponGenerationAmountValidator.php b/src/Sylius/Bundle/PromotionBundle/Validator/CouponGenerationAmountValidator.php
index 6720b20cb2a..caab510067f 100644
--- a/src/Sylius/Bundle/PromotionBundle/Validator/CouponGenerationAmountValidator.php
+++ b/src/Sylius/Bundle/PromotionBundle/Validator/CouponGenerationAmountValidator.php
@@ -48,7 +48,7 @@ public function validate($value, Constraint $constraint): void
'%expectedAmount%' => $value->getAmount(),
'%codeLength%' => $value->getCodeLength(),
'%possibleAmount%' => $this->generationPolicy->getPossibleGenerationAmount($value),
- ]
+ ],
);
}
}
diff --git a/src/Sylius/Bundle/PromotionBundle/spec/Validator/CouponGenerationAmountValidatorSpec.php b/src/Sylius/Bundle/PromotionBundle/spec/Validator/CouponGenerationAmountValidatorSpec.php
index 3aac263bc80..cbca9c24078 100644
--- a/src/Sylius/Bundle/PromotionBundle/spec/Validator/CouponGenerationAmountValidatorSpec.php
+++ b/src/Sylius/Bundle/PromotionBundle/spec/Validator/CouponGenerationAmountValidatorSpec.php
@@ -43,7 +43,7 @@ function it_is_a_constraint_validator(): void
function it_adds_violation(
ExecutionContextInterface $context,
PromotionCouponGeneratorInstructionInterface $instruction,
- GenerationPolicyInterface $generationPolicy
+ GenerationPolicyInterface $generationPolicy,
): void {
$constraint = new CouponPossibleGenerationAmount();
@@ -59,7 +59,7 @@ function it_adds_violation(
function it_does_not_add_violation(
ExecutionContextInterface $context,
PromotionCouponGeneratorInstructionInterface $instruction,
- GenerationPolicyInterface $generationPolicy
+ GenerationPolicyInterface $generationPolicy,
): void {
$constraint = new CouponPossibleGenerationAmount();
diff --git a/src/Sylius/Bundle/PromotionBundle/test/src/Tests/SyliusPromotionBundleTest.php b/src/Sylius/Bundle/PromotionBundle/test/src/Tests/SyliusPromotionBundleTest.php
index 3ffed0e7977..56628cf8ad8 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/Doctrine/ORM/Subscriber/LoadMetadataSubscriber.php b/src/Sylius/Bundle/ReviewBundle/Doctrine/ORM/Subscriber/LoadMetadataSubscriber.php
index f6aa41ba6f7..ff57e8a1f30 100644
--- a/src/Sylius/Bundle/ReviewBundle/Doctrine/ORM/Subscriber/LoadMetadataSubscriber.php
+++ b/src/Sylius/Bundle/ReviewBundle/Doctrine/ORM/Subscriber/LoadMetadataSubscriber.php
@@ -61,7 +61,7 @@ public function loadClassMetadata(LoadClassMetadataEventArgs $eventArguments): v
private function createSubjectMapping(
string $reviewableEntity,
string $subject,
- ClassMetadata $reviewableEntityMetadata
+ ClassMetadata $reviewableEntityMetadata,
): array {
return [
'fieldName' => 'reviewSubject',
diff --git a/src/Sylius/Bundle/ReviewBundle/Updater/AverageRatingUpdater.php b/src/Sylius/Bundle/ReviewBundle/Updater/AverageRatingUpdater.php
index a3aa6a98e1e..39c0a2404a7 100644
--- a/src/Sylius/Bundle/ReviewBundle/Updater/AverageRatingUpdater.php
+++ b/src/Sylius/Bundle/ReviewBundle/Updater/AverageRatingUpdater.php
@@ -26,7 +26,7 @@ class AverageRatingUpdater implements ReviewableRatingUpdaterInterface
public function __construct(
ReviewableRatingCalculatorInterface $averageRatingCalculator,
- ObjectManager $reviewSubjectManager
+ ObjectManager $reviewSubjectManager,
) {
$this->averageRatingCalculator = $averageRatingCalculator;
$this->reviewSubjectManager = $reviewSubjectManager;
diff --git a/src/Sylius/Bundle/ReviewBundle/spec/Doctrine/ORM/Subscriber/LoadMetadataSubscriberSpec.php b/src/Sylius/Bundle/ReviewBundle/spec/Doctrine/ORM/Subscriber/LoadMetadataSubscriberSpec.php
index 768ebdec431..090e6ac4fe3 100644
--- a/src/Sylius/Bundle/ReviewBundle/spec/Doctrine/ORM/Subscriber/LoadMetadataSubscriberSpec.php
+++ b/src/Sylius/Bundle/ReviewBundle/spec/Doctrine/ORM/Subscriber/LoadMetadataSubscriberSpec.php
@@ -57,7 +57,7 @@ function it_maps_proper_relations_for_review_model(
ClassMetadata $classMetadataInfo,
ClassMetadata $metadata,
EntityManager $entityManager,
- LoadClassMetadataEventArgs $eventArguments
+ LoadClassMetadataEventArgs $eventArguments,
): void {
$eventArguments->getClassMetadata()->willReturn($metadata);
$eventArguments->getEntityManager()->willReturn($entityManager);
@@ -99,7 +99,7 @@ function it_maps_proper_relations_for_reviewable_model(
ClassMetadataFactory $metadataFactory,
ClassMetadata $metadata,
EntityManager $entityManager,
- LoadClassMetadataEventArgs $eventArguments
+ LoadClassMetadataEventArgs $eventArguments,
): void {
$eventArguments->getClassMetadata()->willReturn($metadata);
$eventArguments->getEntityManager()->willReturn($entityManager);
@@ -120,7 +120,7 @@ function it_skips_mapping_configuration_if_metadata_name_is_not_different(
ClassMetadataFactory $metadataFactory,
ClassMetadata $metadata,
EntityManager $entityManager,
- LoadClassMetadataEventArgs $eventArguments
+ LoadClassMetadataEventArgs $eventArguments,
): void {
$this->beConstructedWith([
'reviewable' => [
diff --git a/src/Sylius/Bundle/ReviewBundle/spec/EventListener/ReviewChangeListenerSpec.php b/src/Sylius/Bundle/ReviewBundle/spec/EventListener/ReviewChangeListenerSpec.php
index a9ed1627825..c2de5ef56a1 100644
--- a/src/Sylius/Bundle/ReviewBundle/spec/EventListener/ReviewChangeListenerSpec.php
+++ b/src/Sylius/Bundle/ReviewBundle/spec/EventListener/ReviewChangeListenerSpec.php
@@ -31,7 +31,7 @@ function it_recalculates_subject_rating_on_accepted_review_deletion(
$averageRatingUpdater,
LifecycleEventArgs $event,
ReviewInterface $review,
- ReviewableInterface $reviewSubject
+ ReviewableInterface $reviewSubject,
): void {
$event->getObject()->willReturn($review);
$review->getReviewSubject()->willReturn($reviewSubject);
diff --git a/src/Sylius/Bundle/ReviewBundle/spec/Updater/AverageRatingUpdaterSpec.php b/src/Sylius/Bundle/ReviewBundle/spec/Updater/AverageRatingUpdaterSpec.php
index c5057920be3..8041eac6c47 100644
--- a/src/Sylius/Bundle/ReviewBundle/spec/Updater/AverageRatingUpdaterSpec.php
+++ b/src/Sylius/Bundle/ReviewBundle/spec/Updater/AverageRatingUpdaterSpec.php
@@ -35,7 +35,7 @@ function it_implements_product_average_rating_updater_interface(): void
function it_updates_review_subject_average_rating(
ReviewableRatingCalculatorInterface $averageRatingCalculator,
ObjectManager $reviewSubjectManager,
- ReviewableInterface $reviewSubject
+ ReviewableInterface $reviewSubject,
): void {
$averageRatingCalculator->calculate($reviewSubject)->willReturn(4.5);
@@ -50,7 +50,7 @@ function it_updates_review_subject_average_rating_from_review(
ReviewableRatingCalculatorInterface $averageRatingCalculator,
ObjectManager $reviewSubjectManager,
ReviewableInterface $reviewSubject,
- ReviewInterface $review
+ ReviewInterface $review,
): void {
$review->getReviewSubject()->willReturn($reviewSubject);
$averageRatingCalculator->calculate($reviewSubject)->willReturn(4.5);
diff --git a/src/Sylius/Bundle/ReviewBundle/test/src/Tests/SyliusReviewBundleTest.php b/src/Sylius/Bundle/ReviewBundle/test/src/Tests/SyliusReviewBundleTest.php
index facaa5e3516..653c221c858 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 5df596a4acb..5302d5fa235 100644
--- a/src/Sylius/Bundle/ShippingBundle/DependencyInjection/Compiler/CompositeShippingMethodEligibilityCheckerPass.php
+++ b/src/Sylius/Bundle/ShippingBundle/DependencyInjection/Compiler/CompositeShippingMethodEligibilityCheckerPass.php
@@ -27,8 +27,8 @@ public function process(ContainerBuilder $container): void
$container->getDefinition('sylius.shipping_method_eligibility_checker')->setArguments([
array_map(
- static fn($id): Reference => new Reference($id),
- array_keys($container->findTaggedServiceIds('sylius.shipping_method_eligibility_checker'))
+ 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/Core/AbstractConfigurationCollectionType.php b/src/Sylius/Bundle/ShippingBundle/Form/Type/Core/AbstractConfigurationCollectionType.php
index 9c8830df8c3..50919ff996d 100644
--- a/src/Sylius/Bundle/ShippingBundle/Form/Type/Core/AbstractConfigurationCollectionType.php
+++ b/src/Sylius/Bundle/ShippingBundle/Form/Type/Core/AbstractConfigurationCollectionType.php
@@ -40,8 +40,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
$options['entry_type'],
array_replace(
$options['entry_options'],
- ['configuration_type' => $type]
- )
+ ['configuration_type' => $type],
+ ),
);
$prototypes[$type] = $formBuilder->getForm();
diff --git a/src/Sylius/Bundle/ShippingBundle/Form/Type/Rule/TotalWeightGreaterThanOrEqualConfigurationType.php b/src/Sylius/Bundle/ShippingBundle/Form/Type/Rule/TotalWeightGreaterThanOrEqualConfigurationType.php
index 92863f0d918..d9fc400e8c6 100644
--- a/src/Sylius/Bundle/ShippingBundle/Form/Type/Rule/TotalWeightGreaterThanOrEqualConfigurationType.php
+++ b/src/Sylius/Bundle/ShippingBundle/Form/Type/Rule/TotalWeightGreaterThanOrEqualConfigurationType.php
@@ -34,7 +34,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
new Type(['type' => 'numeric', 'groups' => ['sylius']]),
new GreaterThan(['value' => 0, 'groups' => ['sylius']]),
],
- ]
+ ],
);
}
diff --git a/src/Sylius/Bundle/ShippingBundle/Form/Type/Rule/TotalWeightLessThanOrEqualConfigurationType.php b/src/Sylius/Bundle/ShippingBundle/Form/Type/Rule/TotalWeightLessThanOrEqualConfigurationType.php
index 3a92aa4740b..f440913c1e8 100644
--- a/src/Sylius/Bundle/ShippingBundle/Form/Type/Rule/TotalWeightLessThanOrEqualConfigurationType.php
+++ b/src/Sylius/Bundle/ShippingBundle/Form/Type/Rule/TotalWeightLessThanOrEqualConfigurationType.php
@@ -34,7 +34,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
new Type(['type' => 'numeric', 'groups' => ['sylius']]),
new GreaterThan(['value' => 0, 'groups' => ['sylius']]),
],
- ]
+ ],
);
}
diff --git a/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingCategoryChoiceType.php b/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingCategoryChoiceType.php
index ea0ea931381..5f962f4bc01 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/Form/Type/ShippingMethodChoiceType.php b/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingMethodChoiceType.php
index cbc8ac71ea7..c703e1bbb23 100644
--- a/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingMethodChoiceType.php
+++ b/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingMethodChoiceType.php
@@ -40,7 +40,7 @@ final class ShippingMethodChoiceType extends AbstractType
public function __construct(
ShippingMethodsResolverInterface $shippingMethodsResolver,
ServiceRegistryInterface $calculators,
- RepositoryInterface $repository
+ RepositoryInterface $repository,
) {
$this->shippingMethodsResolver = $shippingMethodsResolver;
$this->calculators = $calculators;
diff --git a/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingMethodType.php b/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingMethodType.php
index 6696c345657..b6fbb4410db 100644
--- a/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingMethodType.php
+++ b/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingMethodType.php
@@ -42,7 +42,7 @@ public function __construct(
array $validationGroups,
string $shippingMethodTranslationType,
ServiceRegistryInterface $calculatorRegistry,
- FormTypeRegistryInterface $formTypeRegistry
+ FormTypeRegistryInterface $formTypeRegistry,
) {
parent::__construct($dataClass, $validationGroups);
diff --git a/src/Sylius/Bundle/ShippingBundle/Tests/DependencyInjection/Compiler/RegisterCalculatorsPassTest.php b/src/Sylius/Bundle/ShippingBundle/Tests/DependencyInjection/Compiler/RegisterCalculatorsPassTest.php
index 2a6f006d609..db8aa293133 100644
--- a/src/Sylius/Bundle/ShippingBundle/Tests/DependencyInjection/Compiler/RegisterCalculatorsPassTest.php
+++ b/src/Sylius/Bundle/ShippingBundle/Tests/DependencyInjection/Compiler/RegisterCalculatorsPassTest.php
@@ -30,7 +30,7 @@ public function it_registers_calculators_in_the_registry(): void
'custom_calc',
(new Definition())
->addTag('sylius.shipping_calculator', ['calculator' => 'calc1', 'label' => 'Calc 1'])
- ->addTag('sylius.shipping_calculator', ['calculator' => 'calc2', 'label' => 'Calc 2'])
+ ->addTag('sylius.shipping_calculator', ['calculator' => 'calc2', 'label' => 'Calc 2']),
);
$this->compile();
@@ -38,12 +38,12 @@ public function it_registers_calculators_in_the_registry(): void
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.registry.shipping_calculator',
'register',
- ['calc1', new Reference('custom_calc')]
+ ['calc1', new Reference('custom_calc')],
);
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.registry.shipping_calculator',
'register',
- ['calc2', new Reference('custom_calc')]
+ ['calc2', new Reference('custom_calc')],
);
}
@@ -56,7 +56,7 @@ public function it_registers_calculators_in_the_form_type_registry(): void
'custom_calc',
(new Definition())
->addTag('sylius.shipping_calculator', ['calculator' => 'calc1', 'label' => 'Calc 1'])
- ->addTag('sylius.shipping_calculator', ['calculator' => 'calc2', 'label' => 'Calc 2', 'form_type' => 'FQCN'])
+ ->addTag('sylius.shipping_calculator', ['calculator' => 'calc2', 'label' => 'Calc 2', 'form_type' => 'FQCN']),
);
$this->compile();
@@ -64,7 +64,7 @@ public function it_registers_calculators_in_the_form_type_registry(): void
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.form_registry.shipping_calculator',
'add',
- ['calc2', 'default', 'FQCN']
+ ['calc2', 'default', 'FQCN'],
);
}
@@ -77,14 +77,14 @@ public function it_creates_parameter_which_maps_calculators(): void
'custom_calc',
(new Definition())
->addTag('sylius.shipping_calculator', ['calculator' => 'calc1', 'label' => 'Calc 1'])
- ->addTag('sylius.shipping_calculator', ['calculator' => 'calc2', 'label' => 'Calc 2'])
+ ->addTag('sylius.shipping_calculator', ['calculator' => 'calc2', 'label' => 'Calc 2']),
);
$this->compile();
$this->assertContainerBuilderHasParameter(
'sylius.shipping_calculators',
- ['calc1' => 'Calc 1', 'calc2' => 'Calc 2']
+ ['calc1' => 'Calc 1', 'calc2' => 'Calc 2'],
);
}
diff --git a/src/Sylius/Bundle/ShippingBundle/Tests/DependencyInjection/Compiler/RegisterShippingMethodsResolversPassTest.php b/src/Sylius/Bundle/ShippingBundle/Tests/DependencyInjection/Compiler/RegisterShippingMethodsResolversPassTest.php
index de770c2079c..4fb88880623 100644
--- a/src/Sylius/Bundle/ShippingBundle/Tests/DependencyInjection/Compiler/RegisterShippingMethodsResolversPassTest.php
+++ b/src/Sylius/Bundle/ShippingBundle/Tests/DependencyInjection/Compiler/RegisterShippingMethodsResolversPassTest.php
@@ -29,7 +29,7 @@ public function it_registers_resolvers_in_the_registry(): void
'res',
(new Definition())
->addTag('sylius.shipping_method_resolver', ['type' => 'res1', 'label' => 'Res 1'])
- ->addTag('sylius.shipping_method_resolver', ['type' => 'res2', 'label' => 'Res 2', 'priority' => 5])
+ ->addTag('sylius.shipping_method_resolver', ['type' => 'res2', 'label' => 'Res 2', 'priority' => 5]),
);
$this->compile();
@@ -37,12 +37,12 @@ public function it_registers_resolvers_in_the_registry(): void
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.registry.shipping_methods_resolver',
'register',
- [new Reference('res'), 0]
+ [new Reference('res'), 0],
);
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.registry.shipping_methods_resolver',
'register',
- [new Reference('res'), 5]
+ [new Reference('res'), 5],
);
}
@@ -54,14 +54,14 @@ public function it_creates_parameter_which_maps_resolvers(): void
'res',
(new Definition())
->addTag('sylius.shipping_method_resolver', ['type' => 'res1', 'label' => 'Res 1'])
- ->addTag('sylius.shipping_method_resolver', ['type' => 'res2', 'label' => 'Res 2'])
+ ->addTag('sylius.shipping_method_resolver', ['type' => 'res2', 'label' => 'Res 2']),
);
$this->compile();
$this->assertContainerBuilderHasParameter(
'sylius.shipping_method_resolvers',
- ['res1' => 'Res 1', 'res2' => 'Res 2']
+ ['res1' => 'Res 1', 'res2' => 'Res 2'],
);
}
diff --git a/src/Sylius/Bundle/ShippingBundle/test/src/Tests/SyliusShippingBundleTest.php b/src/Sylius/Bundle/ShippingBundle/test/src/Tests/SyliusShippingBundleTest.php
index 63e8f44821d..6192720c7fa 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 bb0c92c2e3f..900c6304ca5 100644
--- a/src/Sylius/Bundle/ShopBundle/Calculator/OrderItemsSubtotalCalculator.php
+++ b/src/Sylius/Bundle/ShopBundle/Calculator/OrderItemsSubtotalCalculator.php
@@ -22,8 +22,8 @@ public function getSubtotal(OrderInterface $order): int
{
return array_reduce(
$order->getItems()->toArray(),
- static fn(int $subtotal, OrderItemInterface $item): int => $subtotal + $item->getSubtotal(),
- 0
+ static fn (int $subtotal, OrderItemInterface $item): int => $subtotal + $item->getSubtotal(),
+ 0,
);
}
}
diff --git a/src/Sylius/Bundle/ShopBundle/Controller/ContactController.php b/src/Sylius/Bundle/ShopBundle/Controller/ContactController.php
index 748922cc008..4339506bc4b 100644
--- a/src/Sylius/Bundle/ShopBundle/Controller/ContactController.php
+++ b/src/Sylius/Bundle/ShopBundle/Controller/ContactController.php
@@ -62,7 +62,7 @@ public function __construct(
ChannelContextInterface $channelContext,
CustomerContextInterface $customerContext,
LocaleContextInterface $localeContext,
- ContactEmailManagerInterface $contactEmailManager
+ ContactEmailManagerInterface $contactEmailManager,
) {
$this->router = $router;
$this->formFactory = $formFactory;
@@ -92,7 +92,7 @@ public function requestAction(Request $request): Response
$errorMessage = $this->getSyliusAttribute(
$request,
'error_flash',
- 'sylius.contact.request_error'
+ 'sylius.contact.request_error',
);
/** @var FlashBagInterface $flashBag */
@@ -108,7 +108,7 @@ public function requestAction(Request $request): Response
$successMessage = $this->getSyliusAttribute(
$request,
'success_flash',
- 'sylius.contact.request_success'
+ 'sylius.contact.request_success',
);
/** @var FlashBagInterface $flashBag */
diff --git a/src/Sylius/Bundle/ShopBundle/Controller/CurrencySwitchController.php b/src/Sylius/Bundle/ShopBundle/Controller/CurrencySwitchController.php
index 5127c2c6a44..b91c944c37e 100644
--- a/src/Sylius/Bundle/ShopBundle/Controller/CurrencySwitchController.php
+++ b/src/Sylius/Bundle/ShopBundle/Controller/CurrencySwitchController.php
@@ -45,7 +45,7 @@ public function __construct(
object $templatingEngine,
CurrencyContextInterface $currencyContext,
CurrencyStorageInterface $currencyStorage,
- ChannelContextInterface $channelContext
+ ChannelContextInterface $channelContext,
) {
$this->templatingEngine = $templatingEngine;
$this->currencyContext = $currencyContext;
@@ -59,8 +59,8 @@ public function renderAction(): Response
$channel = $this->channelContext->getChannel();
$availableCurrencies = array_map(
- fn(CurrencyInterface $currency) => $currency->getCode(),
- $channel->getCurrencies()->toArray()
+ fn (CurrencyInterface $currency) => $currency->getCode(),
+ $channel->getCurrencies()->toArray(),
);
return new Response($this->templatingEngine->render('@SyliusShop/Menu/_currencySwitch.html.twig', [
diff --git a/src/Sylius/Bundle/ShopBundle/Controller/LocaleSwitchController.php b/src/Sylius/Bundle/ShopBundle/Controller/LocaleSwitchController.php
index f2a49ec555d..49587d0e23a 100644
--- a/src/Sylius/Bundle/ShopBundle/Controller/LocaleSwitchController.php
+++ b/src/Sylius/Bundle/ShopBundle/Controller/LocaleSwitchController.php
@@ -43,7 +43,7 @@ public function __construct(
object $templatingEngine,
LocaleContextInterface $localeContext,
LocaleProviderInterface $localeProvider,
- LocaleSwitcherInterface $localeSwitcher
+ LocaleSwitcherInterface $localeSwitcher,
) {
$this->templatingEngine = $templatingEngine;
$this->localeContext = $localeContext;
@@ -68,7 +68,7 @@ public function switchAction(Request $request, ?string $code = null): Response
if (!in_array($code, $this->localeProvider->getAvailableLocalesCodes(), true)) {
throw new HttpException(
Response::HTTP_NOT_ACCEPTABLE,
- sprintf('The locale code "%s" is invalid.', $code)
+ sprintf('The locale code "%s" is invalid.', $code),
);
}
diff --git a/src/Sylius/Bundle/ShopBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/ShopBundle/DependencyInjection/Configuration.php
index f788743cf21..b39a3396b97 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/DependencyInjection/SyliusShopExtension.php b/src/Sylius/Bundle/ShopBundle/DependencyInjection/SyliusShopExtension.php
index 2f2a4015da6..95b4163cc2d 100644
--- a/src/Sylius/Bundle/ShopBundle/DependencyInjection/SyliusShopExtension.php
+++ b/src/Sylius/Bundle/ShopBundle/DependencyInjection/SyliusShopExtension.php
@@ -39,7 +39,7 @@ public function load(array $configs, ContainerBuilder $container): void
$container->setParameter('sylius_shop.firewall_context_name', $config['firewall_context_name']);
$container->setParameter(
'sylius_shop.product_grid.include_all_descendants',
- $config['product_grid']['include_all_descendants']
+ $config['product_grid']['include_all_descendants'],
);
$this->configureCheckoutResolverIfNeeded($config['checkout_resolver'], $container);
}
@@ -57,7 +57,7 @@ private function configureCheckoutResolverIfNeeded(array $config, ContainerBuild
new Reference('sylius.router.checkout_state'),
new Definition(RequestMatcher::class, [$config['pattern']]),
new Reference('sm.factory'),
- ]
+ ],
);
$checkoutResolverDefinition->addTag('kernel.event_subscriber');
@@ -66,7 +66,7 @@ private function configureCheckoutResolverIfNeeded(array $config, ContainerBuild
[
new Reference('router'),
$config['route_map'],
- ]
+ ],
);
$container->setDefinition('sylius.resolver.checkout', $checkoutResolverDefinition);
diff --git a/src/Sylius/Bundle/ShopBundle/EmailManager/ContactEmailManager.php b/src/Sylius/Bundle/ShopBundle/EmailManager/ContactEmailManager.php
index 34d3be2413f..ff729b29fd1 100644
--- a/src/Sylius/Bundle/ShopBundle/EmailManager/ContactEmailManager.php
+++ b/src/Sylius/Bundle/ShopBundle/EmailManager/ContactEmailManager.php
@@ -31,18 +31,18 @@ public function sendContactRequest(
array $data,
array $recipients,
?ChannelInterface $channel = null,
- ?string $localeCode = null
+ ?string $localeCode = null,
): void {
if ($channel === null) {
@trigger_error(
sprintf('Not passing channel into %s::%s is deprecated since Sylius 1.7', __CLASS__, __METHOD__),
- \E_USER_DEPRECATED
+ \E_USER_DEPRECATED,
);
}
if ($localeCode === null) {
@trigger_error(
sprintf('Not passing locale code into %s::%s is deprecated since Sylius 1.7', __CLASS__, __METHOD__),
- \E_USER_DEPRECATED
+ \E_USER_DEPRECATED,
);
}
@@ -55,7 +55,7 @@ public function sendContactRequest(
'localeCode' => $localeCode,
],
[],
- [$data['email']]
+ [$data['email']],
);
}
}
diff --git a/src/Sylius/Bundle/ShopBundle/EmailManager/ContactEmailManagerInterface.php b/src/Sylius/Bundle/ShopBundle/EmailManager/ContactEmailManagerInterface.php
index 59eccc98000..5b648729213 100644
--- a/src/Sylius/Bundle/ShopBundle/EmailManager/ContactEmailManagerInterface.php
+++ b/src/Sylius/Bundle/ShopBundle/EmailManager/ContactEmailManagerInterface.php
@@ -21,6 +21,6 @@ public function sendContactRequest(
array $data,
array $recipients,
?ChannelInterface $channel = null,
- ?string $localeCode = null
+ ?string $localeCode = null,
): void;
}
diff --git a/src/Sylius/Bundle/ShopBundle/EmailManager/OrderEmailManager.php b/src/Sylius/Bundle/ShopBundle/EmailManager/OrderEmailManager.php
index b29c5c9cd9f..bd9c4825ea5 100644
--- a/src/Sylius/Bundle/ShopBundle/EmailManager/OrderEmailManager.php
+++ b/src/Sylius/Bundle/ShopBundle/EmailManager/OrderEmailManager.php
@@ -36,9 +36,9 @@ public function __construct(SenderInterface $emailSender, ?DecoratedOrderEmailMa
sprintf(
'Not passing an instance of %s to %s constructor is deprecated since Sylius 1.8 and will be removed in Sylius 2.0.',
DecoratedOrderEmailManagerInterface::class,
- self::class
+ self::class,
),
- \E_USER_DEPRECATED
+ \E_USER_DEPRECATED,
);
}
}
@@ -58,7 +58,7 @@ public function sendConfirmationEmail(OrderInterface $order): void
'order' => $order,
'channel' => $order->getChannel(),
'localeCode' => $order->getLocaleCode(),
- ]
+ ],
)
;
}
diff --git a/src/Sylius/Bundle/ShopBundle/EventListener/CustomerEmailUpdaterListener.php b/src/Sylius/Bundle/ShopBundle/EventListener/CustomerEmailUpdaterListener.php
index aabf377a6ee..0bb7e6b1ee9 100644
--- a/src/Sylius/Bundle/ShopBundle/EventListener/CustomerEmailUpdaterListener.php
+++ b/src/Sylius/Bundle/ShopBundle/EventListener/CustomerEmailUpdaterListener.php
@@ -49,7 +49,7 @@ public function __construct(
ChannelContextInterface $channelContext,
EventDispatcherInterface $eventDispatcher,
SessionInterface $session,
- SectionProviderInterface $uriBasedSectionContext
+ SectionProviderInterface $uriBasedSectionContext,
) {
$this->tokenGenerator = $tokenGenerator;
$this->channelContext = $channelContext;
diff --git a/src/Sylius/Bundle/ShopBundle/EventListener/NonChannelLocaleListener.php b/src/Sylius/Bundle/ShopBundle/EventListener/NonChannelLocaleListener.php
index 35748ff166b..ab5db4e2a57 100644
--- a/src/Sylius/Bundle/ShopBundle/EventListener/NonChannelLocaleListener.php
+++ b/src/Sylius/Bundle/ShopBundle/EventListener/NonChannelLocaleListener.php
@@ -43,7 +43,7 @@ public function __construct(
RouterInterface $router,
LocaleProviderInterface $channelBasedLocaleProvider,
FirewallMap $firewallMap,
- array $firewallNames
+ array $firewallNames,
) {
Assert::notEmpty($firewallNames);
Assert::allString($firewallNames);
@@ -80,9 +80,9 @@ public function restrictRequestLocale(RequestEvent $event): void
new RedirectResponse(
$this->router->generate(
'sylius_shop_homepage',
- ['_locale' => $this->channelBasedLocaleProvider->getDefaultLocaleCode()]
- )
- )
+ ['_locale' => $this->channelBasedLocaleProvider->getDefaultLocaleCode()],
+ ),
+ ),
);
}
}
diff --git a/src/Sylius/Bundle/ShopBundle/EventListener/OrderIntegrityChecker.php b/src/Sylius/Bundle/ShopBundle/EventListener/OrderIntegrityChecker.php
index e7fb228efe1..cc14615d6ac 100644
--- a/src/Sylius/Bundle/ShopBundle/EventListener/OrderIntegrityChecker.php
+++ b/src/Sylius/Bundle/ShopBundle/EventListener/OrderIntegrityChecker.php
@@ -37,7 +37,7 @@ final class OrderIntegrityChecker
public function __construct(
RouterInterface $router,
OrderProcessorInterface $orderProcessor,
- ObjectManager $manager
+ ObjectManager $manager,
) {
$this->router = $router;
$this->orderProcessor = $orderProcessor;
@@ -63,7 +63,7 @@ public function check(ResourceControllerEvent $event): void
$event->stop(
'sylius.order.promotion_integrity',
ResourceControllerEvent::TYPE_ERROR,
- ['%promotionName%' => $previousPromotion->getName()]
+ ['%promotionName%' => $previousPromotion->getName()],
);
$event->setResponse(new RedirectResponse($this->router->generate('sylius_shop_checkout_complete')));
diff --git a/src/Sylius/Bundle/ShopBundle/EventListener/ShopCartBlamerListener.php b/src/Sylius/Bundle/ShopBundle/EventListener/ShopCartBlamerListener.php
index f159cfc45f0..2ff75db1df9 100644
--- a/src/Sylius/Bundle/ShopBundle/EventListener/ShopCartBlamerListener.php
+++ b/src/Sylius/Bundle/ShopBundle/EventListener/ShopCartBlamerListener.php
@@ -33,7 +33,7 @@ final class ShopCartBlamerListener
public function __construct(
CartContextInterface $cartContext,
- SectionProviderInterface $uriBasedSectionContext
+ SectionProviderInterface $uriBasedSectionContext,
) {
$this->cartContext = $cartContext;
$this->uriBasedSectionContext = $uriBasedSectionContext;
diff --git a/src/Sylius/Bundle/ShopBundle/EventListener/ShopUserLogoutHandler.php b/src/Sylius/Bundle/ShopBundle/EventListener/ShopUserLogoutHandler.php
index 229ff4a204b..6ef11e1405b 100644
--- a/src/Sylius/Bundle/ShopBundle/EventListener/ShopUserLogoutHandler.php
+++ b/src/Sylius/Bundle/ShopBundle/EventListener/ShopUserLogoutHandler.php
@@ -32,7 +32,7 @@ public function __construct(
HttpUtils $httpUtils,
string $targetUrl,
ChannelContextInterface $channelContext,
- CartStorageInterface $cartStorage
+ CartStorageInterface $cartStorage,
) {
parent::__construct($httpUtils, $targetUrl);
diff --git a/src/Sylius/Bundle/ShopBundle/EventListener/UserCartRecalculationListener.php b/src/Sylius/Bundle/ShopBundle/EventListener/UserCartRecalculationListener.php
index d95343af776..ba1e48249c9 100644
--- a/src/Sylius/Bundle/ShopBundle/EventListener/UserCartRecalculationListener.php
+++ b/src/Sylius/Bundle/ShopBundle/EventListener/UserCartRecalculationListener.php
@@ -37,7 +37,7 @@ final class UserCartRecalculationListener
public function __construct(
CartContextInterface $cartContext,
OrderProcessorInterface $orderProcessor,
- SectionProviderInterface $uriBasedSectionContext
+ SectionProviderInterface $uriBasedSectionContext,
) {
$this->cartContext = $cartContext;
$this->orderProcessor = $orderProcessor;
@@ -58,7 +58,7 @@ public function recalculateCartWhileLogin(object $event): void
throw new \TypeError(sprintf(
'$event needs to be an instance of "%s" or "%s"',
InteractiveLoginEvent::class,
- UserEvent::class
+ UserEvent::class,
));
}
diff --git a/src/Sylius/Bundle/ShopBundle/EventListener/UserImpersonatedListener.php b/src/Sylius/Bundle/ShopBundle/EventListener/UserImpersonatedListener.php
index 5fc1a1f1453..e7322848e5b 100644
--- a/src/Sylius/Bundle/ShopBundle/EventListener/UserImpersonatedListener.php
+++ b/src/Sylius/Bundle/ShopBundle/EventListener/UserImpersonatedListener.php
@@ -33,7 +33,7 @@ final class UserImpersonatedListener
public function __construct(
CartStorageInterface $cartStorage,
ChannelContextInterface $channelContext,
- OrderRepositoryInterface $orderRepository
+ OrderRepositoryInterface $orderRepository,
) {
$this->cartStorage = $cartStorage;
$this->channelContext = $channelContext;
diff --git a/src/Sylius/Bundle/ShopBundle/EventListener/UserRegistrationListener.php b/src/Sylius/Bundle/ShopBundle/EventListener/UserRegistrationListener.php
index dc7875dcac6..836ffc36c77 100644
--- a/src/Sylius/Bundle/ShopBundle/EventListener/UserRegistrationListener.php
+++ b/src/Sylius/Bundle/ShopBundle/EventListener/UserRegistrationListener.php
@@ -54,7 +54,7 @@ public function __construct(
EventDispatcherInterface $eventDispatcher,
ChannelContextInterface $channelContext,
UserLoginInterface $userLogin,
- $firewallContextName
+ $firewallContextName,
) {
$this->userManager = $userManager;
$this->tokenGenerator = $tokenGenerator;
diff --git a/src/Sylius/Bundle/ShopBundle/Tests/Calculator/OrderItemsSubtotalCalculatorTest.php b/src/Sylius/Bundle/ShopBundle/Tests/Calculator/OrderItemsSubtotalCalculatorTest.php
index d81c1e3acce..b5dc6966c91 100644
--- a/src/Sylius/Bundle/ShopBundle/Tests/Calculator/OrderItemsSubtotalCalculatorTest.php
+++ b/src/Sylius/Bundle/ShopBundle/Tests/Calculator/OrderItemsSubtotalCalculatorTest.php
@@ -47,7 +47,7 @@ public function it_can_calculate_the_subtotal_of_order_items(OrderItemsSubtotalC
* @depends it_can_be_instantiated
*/
public function it_can_calculate_a_subtotal_if_there_are_no_order_items(
- OrderItemsSubtotalCalculator $calculator
+ OrderItemsSubtotalCalculator $calculator,
): void {
$subTotal = $calculator->getSubtotal($this->getOrderMock([]));
$this->assertEquals(0, $subTotal);
@@ -71,7 +71,8 @@ private function getOrderMock(array $orderItems): OrderInterface
$order
->shouldReceive('getItems->toArray')
->once()
- ->andReturn($orderItems);
+ ->andReturn($orderItems)
+ ;
return $order;
}
diff --git a/src/Sylius/Bundle/ShopBundle/Tests/DependencyInjection/ConfigurationTest.php b/src/Sylius/Bundle/ShopBundle/Tests/DependencyInjection/ConfigurationTest.php
index 91354dd97f6..757d555a114 100644
--- a/src/Sylius/Bundle/ShopBundle/Tests/DependencyInjection/ConfigurationTest.php
+++ b/src/Sylius/Bundle/ShopBundle/Tests/DependencyInjection/ConfigurationTest.php
@@ -29,7 +29,7 @@ public function it_has_default_configuration_for_locale_switching_strategy(): vo
$this->assertProcessedConfigurationEquals(
[[]],
['locale_switcher' => 'url'],
- 'locale_switcher'
+ 'locale_switcher',
);
}
@@ -71,7 +71,7 @@ public function it_has_default_configuration_for_firewall_context_name_node(): v
$this->assertProcessedConfigurationEquals(
[[]],
['firewall_context_name' => 'shop'],
- 'firewall_context_name'
+ 'firewall_context_name',
);
}
@@ -87,7 +87,7 @@ public function it_has_default_configuration_for_checkout_resolver_node(): void
'pattern' => '/checkout/.+',
'route_map' => [],
]],
- 'checkout_resolver'
+ 'checkout_resolver',
);
}
@@ -144,7 +144,7 @@ public function its_checkout_route_map_it_is_configurable(): void
],
],
]],
- 'checkout_resolver'
+ 'checkout_resolver',
);
}
diff --git a/src/Sylius/Bundle/ShopBundle/Twig/OrderItemsSubtotalExtension.php b/src/Sylius/Bundle/ShopBundle/Twig/OrderItemsSubtotalExtension.php
index 5e3fd34c598..6405325e210 100644
--- a/src/Sylius/Bundle/ShopBundle/Twig/OrderItemsSubtotalExtension.php
+++ b/src/Sylius/Bundle/ShopBundle/Twig/OrderItemsSubtotalExtension.php
@@ -31,7 +31,7 @@ public function __construct(?OrderItemsSubtotalCalculatorInterface $calculator =
@trigger_error(
'Not passing a calculator is deprecated since 1.6. Argument will no longer be optional from 2.0.',
- \E_USER_DEPRECATED
+ \E_USER_DEPRECATED,
);
}
diff --git a/src/Sylius/Bundle/ShopBundle/Twig/OrderTaxesTotalExtension.php b/src/Sylius/Bundle/ShopBundle/Twig/OrderTaxesTotalExtension.php
index 555dc810719..94bca4525e4 100644
--- a/src/Sylius/Bundle/ShopBundle/Twig/OrderTaxesTotalExtension.php
+++ b/src/Sylius/Bundle/ShopBundle/Twig/OrderTaxesTotalExtension.php
@@ -43,8 +43,8 @@ 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,
- 0
+ static fn (int $total, BaseAdjustmentInterface $adjustment) => $isNeutral === $adjustment->isNeutral() ? $total + $adjustment->getAmount() : $total,
+ 0,
);
}
}
diff --git a/src/Sylius/Bundle/ShopBundle/spec/EmailManager/ContactEmailManagerSpec.php b/src/Sylius/Bundle/ShopBundle/spec/EmailManager/ContactEmailManagerSpec.php
index 34123f10f52..0b3d1fc0577 100644
--- a/src/Sylius/Bundle/ShopBundle/spec/EmailManager/ContactEmailManagerSpec.php
+++ b/src/Sylius/Bundle/ShopBundle/spec/EmailManager/ContactEmailManagerSpec.php
@@ -32,7 +32,7 @@ function it_implements_a_contact_email_manager_interface(): void
function it_sends_a_contact_request_email(
SenderInterface $sender,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$sender
->send(
@@ -47,7 +47,7 @@ function it_sends_a_contact_request_email(
'localeCode' => 'en_US',
],
[],
- ['customer@example.com']
+ ['customer@example.com'],
)
->shouldBeCalled()
;
@@ -60,7 +60,7 @@ function it_sends_a_contact_request_email(
],
['contact@example.com'],
$channel,
- 'en_US'
+ 'en_US',
)
;
}
diff --git a/src/Sylius/Bundle/ShopBundle/spec/EmailManager/OrderEmailManagerSpec.php b/src/Sylius/Bundle/ShopBundle/spec/EmailManager/OrderEmailManagerSpec.php
index 9b5c09ec192..1f45a00729a 100644
--- a/src/Sylius/Bundle/ShopBundle/spec/EmailManager/OrderEmailManagerSpec.php
+++ b/src/Sylius/Bundle/ShopBundle/spec/EmailManager/OrderEmailManagerSpec.php
@@ -35,7 +35,7 @@ function it_implements_an_order_email_manager_interface(): void
function it_delegates_email_sending_to_core_implementation(
CoreOrderEmailManagerInterface $decoratedEmailManager,
- OrderInterface $order
+ OrderInterface $order,
): void {
$decoratedEmailManager->sendConfirmationEmail($order)->shouldBeCalled();
@@ -46,7 +46,7 @@ function it_sends_an_order_confirmation_email_if_core_email_manager_is_not_set(
SenderInterface $sender,
OrderInterface $order,
ChannelInterface $channel,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$this->beConstructedWith($sender, null);
diff --git a/src/Sylius/Bundle/ShopBundle/spec/EventListener/CustomerEmailUpdaterListenerSpec.php b/src/Sylius/Bundle/ShopBundle/spec/EventListener/CustomerEmailUpdaterListenerSpec.php
index f9eab64d47b..a91e575525f 100644
--- a/src/Sylius/Bundle/ShopBundle/spec/EventListener/CustomerEmailUpdaterListenerSpec.php
+++ b/src/Sylius/Bundle/ShopBundle/spec/EventListener/CustomerEmailUpdaterListenerSpec.php
@@ -36,7 +36,7 @@ function let(
ChannelContextInterface $channelContext,
EventDispatcherInterface $eventDispatcher,
SessionInterface $session,
- SectionProviderInterface $sectionResolver
+ SectionProviderInterface $sectionResolver,
): void {
$this->beConstructedWith($tokenGenerator, $channelContext, $eventDispatcher, $session, $sectionResolver);
}
@@ -44,7 +44,7 @@ function let(
function it_does_nothing_change_was_performed_by_admin(
SectionProviderInterface $sectionResolver,
SectionInterface $section,
- GenericEvent $event
+ GenericEvent $event,
): void {
$sectionResolver->getSection()->willReturn($section);
@@ -62,7 +62,7 @@ function it_removes_user_verification_and_disables_user_if_email_has_been_change
ShopUserInterface $user,
ChannelInterface $channel,
SectionProviderInterface $sectionResolver,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$sectionResolver->getSection()->willReturn($shopSection);
@@ -92,7 +92,7 @@ function it_removes_user_verification_only_if_email_has_been_changed_but_channel
ShopUserInterface $user,
ChannelInterface $channel,
SectionProviderInterface $sectionResolver,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$sectionResolver->getSection()->willReturn($shopSection);
@@ -121,7 +121,7 @@ function it_does_nothing_if_email_has_not_been_changed(
CustomerInterface $customer,
ShopUserInterface $user,
SectionProviderInterface $sectionResolver,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$sectionResolver->getSection()->willReturn($shopSection);
@@ -146,7 +146,7 @@ function it_throws_an_invalid_argument_exception_if_event_subject_is_not_custome
GenericEvent $event,
\stdClass $customer,
SectionProviderInterface $sectionResolver,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$sectionResolver->getSection()->willReturn($shopSection);
@@ -160,7 +160,7 @@ function it_throws_an_invalid_argument_exception_if_user_is_null(
GenericEvent $event,
CustomerInterface $customer,
SectionProviderInterface $sectionResolver,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$sectionResolver->getSection()->willReturn($shopSection);
@@ -181,7 +181,7 @@ function it_sends_verification_email_and_adds_flash_if_user_verification_is_requ
FlashBagInterface $flashBag,
ChannelInterface $channel,
SectionProviderInterface $sectionResolver,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$sectionResolver->getSection()->willReturn($shopSection);
@@ -216,7 +216,7 @@ function it_does_not_send_email_if_user_is_still_enabled(
FlashBagInterface $flashBag,
ChannelInterface $channel,
SectionProviderInterface $sectionResolver,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$sectionResolver->getSection()->willReturn($shopSection);
@@ -251,7 +251,7 @@ function it_does_not_send_email_if_user_is_still_verified(
FlashBagInterface $flashBag,
ChannelInterface $channel,
SectionProviderInterface $sectionResolver,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$sectionResolver->getSection()->willReturn($shopSection);
@@ -286,7 +286,7 @@ function it_does_not_send_email_if_user_does_not_have_verification_token(
FlashBagInterface $flashBag,
ChannelInterface $channel,
SectionProviderInterface $sectionResolver,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$sectionResolver->getSection()->willReturn($shopSection);
@@ -321,7 +321,7 @@ function it_does_nothing_if_channel_does_not_require_verification(
FlashBagInterface $flashBag,
ChannelInterface $channel,
SectionProviderInterface $sectionResolver,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$sectionResolver->getSection()->willReturn($shopSection);
diff --git a/src/Sylius/Bundle/ShopBundle/spec/EventListener/NonChannelLocaleListenerSpec.php b/src/Sylius/Bundle/ShopBundle/spec/EventListener/NonChannelLocaleListenerSpec.php
index 2195df6dd2d..c1336e69551 100644
--- a/src/Sylius/Bundle/ShopBundle/spec/EventListener/NonChannelLocaleListenerSpec.php
+++ b/src/Sylius/Bundle/ShopBundle/spec/EventListener/NonChannelLocaleListenerSpec.php
@@ -31,7 +31,7 @@ final class NonChannelLocaleListenerSpec extends ObjectBehavior
function let(
RouterInterface $router,
LocaleProviderInterface $localeProvider,
- FirewallMap $firewallMap
+ FirewallMap $firewallMap,
): void {
$this->beConstructedWith($router, $localeProvider, $firewallMap, ['shop']);
}
@@ -39,7 +39,7 @@ function let(
function it_throws_exception_on_instantiation_with_no_firewall_names(
RouterInterface $router,
LocaleProviderInterface $localeProvider,
- FirewallMap $firewallMap
+ FirewallMap $firewallMap,
): void {
$this->beConstructedWith($router, $localeProvider, $firewallMap, []);
@@ -52,7 +52,7 @@ function it_throws_exception_on_instantiation_with_no_firewall_names(
function it_throws_exception_on_instantiation_with_non_string_firewall_names(
RouterInterface $router,
LocaleProviderInterface $localeProvider,
- FirewallMap $firewallMap
+ FirewallMap $firewallMap,
): void {
$this->beConstructedWith($router, $localeProvider, $firewallMap, [new \DateTime(), 1, 5.0]);
@@ -65,7 +65,7 @@ function it_throws_exception_on_instantiation_with_non_string_firewall_names(
function it_does_nothing_if_its_not_a_master_request(
LocaleProviderInterface $localeProvider,
FirewallMap $firewallMap,
- RequestEvent $event
+ RequestEvent $event,
): void {
$event->isMasterRequest()->willReturn(false);
@@ -83,7 +83,7 @@ function it_does_nothing_if_request_is_behind_no_firewall(
LocaleProviderInterface $localeProvider,
FirewallMap $firewallMap,
Request $request,
- RequestEvent $event
+ RequestEvent $event,
): void {
$event->isMasterRequest()->willReturn(true);
$event->getRequest()->willReturn($request);
@@ -101,12 +101,12 @@ function it_does_nothing_if_request_is_behind_a_firewall_not_stated_upon_creatin
LocaleProviderInterface $localeProvider,
FirewallMap $firewallMap,
Request $request,
- RequestEvent $event
+ RequestEvent $event,
): void {
$event->isMasterRequest()->willReturn(true);
$event->getRequest()->willReturn($request);
$firewallMap->getFirewallConfig($request)->willReturn(
- new FirewallConfig('lalaland', 'mock')
+ new FirewallConfig('lalaland', 'mock'),
);
$localeProvider->getAvailableLocalesCodes()->shouldNotBeCalled();
@@ -121,12 +121,12 @@ function it_does_nothing_if_request_locale_is_present_in_the_provider(
LocaleProviderInterface $localeProvider,
FirewallMap $firewallMap,
Request $request,
- RequestEvent $event
+ RequestEvent $event,
): void {
$event->isMasterRequest()->willReturn(true);
$event->getRequest()->willReturn($request);
$firewallMap->getFirewallConfig($request)->willReturn(
- new FirewallConfig('shop', 'mock')
+ new FirewallConfig('shop', 'mock'),
);
$request->getLocale()->willReturn('en');
@@ -143,12 +143,12 @@ function it_does_nothing_if_request_locale_is_not_present_in_provider_and_reques
LocaleProviderInterface $localeProvider,
FirewallMap $firewallMap,
Request $request,
- RequestEvent $event
+ RequestEvent $event,
): void {
$event->isMasterRequest()->willReturn(true);
$event->getRequest()->willReturn($request);
$firewallMap->getFirewallConfig($request)->willReturn(
- new FirewallConfig('shop', 'mock')
+ new FirewallConfig('shop', 'mock'),
);
$request->attributes = new ParameterBag(['_route' => '_wdt']);
@@ -173,12 +173,12 @@ function it_redirect_to_default_locale_if_request_locale_is_not_present_in_provi
FirewallMap $firewallMap,
Request $request,
RequestEvent $event,
- Router $router
+ Router $router,
): void {
$event->isMasterRequest()->willReturn(true);
$event->getRequest()->willReturn($request);
$firewallMap->getFirewallConfig($request)->willReturn(
- new FirewallConfig('shop', 'mock')
+ new FirewallConfig('shop', 'mock'),
);
$request->getLocale()->willReturn('en');
diff --git a/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderCompleteListenerSpec.php b/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderCompleteListenerSpec.php
index 6ed01d7e7fb..2b669fee4f9 100644
--- a/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderCompleteListenerSpec.php
+++ b/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderCompleteListenerSpec.php
@@ -28,7 +28,7 @@ function let(OrderEmailManagerInterface $orderEmailManager): void
function it_sends_a_confirmation_email(
OrderEmailManagerInterface $orderEmailManager,
GenericEvent $event,
- OrderInterface $order
+ OrderInterface $order,
): void {
$event->getSubject()->willReturn($order);
@@ -39,7 +39,7 @@ function it_sends_a_confirmation_email(
function it_throws_an_invalid_argument_exception_if_an_event_subject_is_not_an_order_instance(
GenericEvent $event,
- \stdClass $order
+ \stdClass $order,
): void {
$event->getSubject()->willReturn($order);
diff --git a/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderCustomerIpListenerSpec.php b/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderCustomerIpListenerSpec.php
index 61746961d6e..0d391888f19 100644
--- a/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderCustomerIpListenerSpec.php
+++ b/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderCustomerIpListenerSpec.php
@@ -32,7 +32,7 @@ function it_uses_assigner_to_assign_customer_ip_to_order(
IpAssignerInterface $ipAssigner,
OrderInterface $order,
Request $request,
- RequestStack $requestStack
+ RequestStack $requestStack,
): void {
$event->getSubject()->willReturn($order);
$requestStack->getMasterRequest()->willReturn($request);
diff --git a/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderIntegrityCheckerSpec.php b/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderIntegrityCheckerSpec.php
index 0e79fdb9b9d..03ab5ae3e86 100644
--- a/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderIntegrityCheckerSpec.php
+++ b/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderIntegrityCheckerSpec.php
@@ -29,7 +29,7 @@ final class OrderIntegrityCheckerSpec extends ObjectBehavior
function let(
RouterInterface $router,
OrderProcessorInterface $orderProcessor,
- ObjectManager $orderManager
+ ObjectManager $orderManager,
): void {
$this->beConstructedWith($router, $orderProcessor, $orderManager);
}
@@ -38,7 +38,7 @@ function it_does_nothing_if_given_order_has_valid_promotion_applied(
OrderProcessorInterface $orderProcessor,
OrderInterface $order,
PromotionInterface $promotion,
- ResourceControllerEvent $event
+ ResourceControllerEvent $event,
): void {
$event->getSubject()->willReturn($order);
@@ -60,13 +60,13 @@ function it_stops_future_action_if_given_order_has_different_promotion_applied(
PromotionInterface $oldPromotion,
PromotionInterface $newPromotion,
ResourceControllerEvent $event,
- ObjectManager $orderManager
+ ObjectManager $orderManager,
): void {
$event->getSubject()->willReturn($order);
$order->getPromotions()->willReturn(
new ArrayCollection([$oldPromotion->getWrappedObject()]),
- new ArrayCollection([$newPromotion->getWrappedObject()])
+ new ArrayCollection([$newPromotion->getWrappedObject()]),
);
$order->getTotal()->willReturn(1000);
@@ -79,7 +79,7 @@ function it_stops_future_action_if_given_order_has_different_promotion_applied(
$event->stop(
'sylius.order.promotion_integrity',
ResourceControllerEvent::TYPE_ERROR,
- ['%promotionName%' => 'Christmas']
+ ['%promotionName%' => 'Christmas'],
)->shouldBeCalled();
$event->setResponse(new RedirectResponse('checkout.com'))->shouldBeCalled();
@@ -95,7 +95,7 @@ function it_stops_future_action_if_given_order_has_different_total_value(
OrderInterface $order,
PromotionInterface $promotion,
ResourceControllerEvent $event,
- ObjectManager $orderManager
+ ObjectManager $orderManager,
): void {
$event->getSubject()->willReturn($order);
@@ -121,13 +121,13 @@ function it_stops_future_action_if_given_order_has_no_promotion_applied(
OrderInterface $order,
PromotionInterface $promotion,
ResourceControllerEvent $event,
- ObjectManager $orderManager
+ ObjectManager $orderManager,
): void {
$event->getSubject()->willReturn($order);
$order->getPromotions()->willReturn(
new ArrayCollection([$promotion->getWrappedObject()]),
- new ArrayCollection([])
+ new ArrayCollection([]),
);
$order->getTotal()->willReturn(1000);
@@ -141,7 +141,7 @@ function it_stops_future_action_if_given_order_has_no_promotion_applied(
$event->stop(
'sylius.order.promotion_integrity',
ResourceControllerEvent::TYPE_ERROR,
- ['%promotionName%' => 'Christmas']
+ ['%promotionName%' => 'Christmas'],
)->shouldBeCalled();
$event->setResponse(new RedirectResponse('checkout.com'))->shouldBeCalled();
diff --git a/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderLocaleAssignerSpec.php b/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderLocaleAssignerSpec.php
index efd5ec45ac3..2c26983a3f2 100644
--- a/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderLocaleAssignerSpec.php
+++ b/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderLocaleAssignerSpec.php
@@ -28,7 +28,7 @@ function let(LocaleContextInterface $localeContext): void
function it_assigns_locale_to_an_order(
LocaleContextInterface $localeContext,
OrderInterface $order,
- ResourceControllerEvent $event
+ ResourceControllerEvent $event,
): void {
$event->getSubject()->willReturn($order);
$localeContext->getLocaleCode()->willReturn('pl_PL');
diff --git a/src/Sylius/Bundle/ShopBundle/spec/EventListener/ShopCartBlamerListenerSpec.php b/src/Sylius/Bundle/ShopBundle/spec/EventListener/ShopCartBlamerListenerSpec.php
index 6fdeec301a3..ac7b93bad7c 100644
--- a/src/Sylius/Bundle/ShopBundle/spec/EventListener/ShopCartBlamerListenerSpec.php
+++ b/src/Sylius/Bundle/ShopBundle/spec/EventListener/ShopCartBlamerListenerSpec.php
@@ -34,7 +34,7 @@ final class ShopCartBlamerListenerSpec extends ObjectBehavior
{
function let(
CartContextInterface $cartContext,
- SectionProviderInterface $sectionResolver
+ SectionProviderInterface $sectionResolver,
): void {
$this->beConstructedWith($cartContext, $sectionResolver);
}
@@ -45,7 +45,7 @@ function it_throws_an_exception_when_cart_does_not_implement_core_order_interfac
SectionProviderInterface $sectionResolver,
ShopUserInterface $user,
UserEvent $userEvent,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$sectionResolver->getSection()->willReturn($shopSection);
$cartContext->getCart()->willReturn($order);
@@ -61,7 +61,7 @@ function it_throws_an_exception_when_cart_does_not_implement_core_order_interfac
ShopUserInterface $user,
Request $request,
TokenInterface $token,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$sectionResolver->getSection()->willReturn($shopSection);
$cartContext->getCart()->willReturn($order);
@@ -80,7 +80,7 @@ function it_blames_cart_on_user_on_implicit_login(
UserEvent $userEvent,
ShopUserInterface $user,
CustomerInterface $customer,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$sectionResolver->getSection()->willReturn($shopSection);
$cartContext->getCart()->willReturn($cart);
@@ -102,7 +102,7 @@ function it_blames_cart_on_user_on_interactive_login(
TokenInterface $token,
ShopUserInterface $user,
CustomerInterface $customer,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$sectionResolver->getSection()->willReturn($shopSection);
$cartContext->getCart()->willReturn($cart);
@@ -123,7 +123,7 @@ function it_does_nothing_if_given_cart_has_been_blamed_in_past(
Request $request,
TokenInterface $token,
CustomerInterface $customer,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$sectionResolver->getSection()->willReturn($shopSection);
$cartContext->getCart()->willReturn($cart);
@@ -141,7 +141,7 @@ function it_does_nothing_if_given_user_is_invalid_on_interactive_login(
OrderInterface $cart,
Request $request,
TokenInterface $token,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$sectionResolver->getSection()->willReturn($shopSection);
$cartContext->getCart()->willReturn($cart);
@@ -158,7 +158,7 @@ function it_does_nothing_if_there_is_no_existing_cart_on_implicit_login(
SectionProviderInterface $sectionResolver,
UserEvent $userEvent,
ShopUserInterface $user,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$sectionResolver->getSection()->willReturn($shopSection);
$cartContext->getCart()->willThrow(CartNotFoundException::class);
@@ -173,7 +173,7 @@ function it_does_nothing_if_there_is_no_existing_cart_on_interactive_login(
Request $request,
TokenInterface $token,
ShopUserInterface $user,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$sectionResolver->getSection()->willReturn($shopSection);
$cartContext->getCart()->willThrow(CartNotFoundException::class);
@@ -186,7 +186,7 @@ function it_does_nothing_if_the_current_section_is_not_shop_on_implicit_login(
CartContextInterface $cartContext,
SectionProviderInterface $sectionResolver,
UserEvent $userEvent,
- SectionInterface $section
+ SectionInterface $section,
): void {
$sectionResolver->getSection()->willReturn($section);
@@ -201,7 +201,7 @@ function it_does_nothing_if_the_current_section_is_not_shop_on_interactive_login
SectionProviderInterface $sectionResolver,
Request $request,
TokenInterface $token,
- SectionInterface $section
+ SectionInterface $section,
): void {
$sectionResolver->getSection()->willReturn($section);
diff --git a/src/Sylius/Bundle/ShopBundle/spec/EventListener/ShopCustomerAccountSubSectionCacheControlSubscriberSpec.php b/src/Sylius/Bundle/ShopBundle/spec/EventListener/ShopCustomerAccountSubSectionCacheControlSubscriberSpec.php
index 61fc6e72b81..210f42c59f6 100644
--- a/src/Sylius/Bundle/ShopBundle/spec/EventListener/ShopCustomerAccountSubSectionCacheControlSubscriberSpec.php
+++ b/src/Sylius/Bundle/ShopBundle/spec/EventListener/ShopCustomerAccountSubSectionCacheControlSubscriberSpec.php
@@ -43,7 +43,7 @@ function it_adds_cache_control_directives_to_customer_account_requests(
Request $request,
Response $response,
ResponseHeaderBag $responseHeaderBag,
- ShopCustomerAccountSubSection $customerAccountSubSection
+ ShopCustomerAccountSubSection $customerAccountSubSection,
): void {
$sectionProvider->getSection()->willReturn($customerAccountSubSection);
@@ -53,7 +53,7 @@ function it_adds_cache_control_directives_to_customer_account_requests(
$kernel->getWrappedObject(),
$request->getWrappedObject(),
KernelInterface::MASTER_REQUEST,
- $response->getWrappedObject()
+ $response->getWrappedObject(),
);
$responseHeaderBag->addCacheControlDirective('no-cache', true)->shouldBeCalled();
@@ -70,7 +70,7 @@ function it_does_nothing_if_section_is_different_than_customer_account(
Request $request,
Response $response,
ResponseHeaderBag $responseHeaderBag,
- SectionInterface $section
+ SectionInterface $section,
): void {
$sectionProvider->getSection()->willReturn($section);
@@ -80,7 +80,7 @@ function it_does_nothing_if_section_is_different_than_customer_account(
$kernel->getWrappedObject(),
$request->getWrappedObject(),
KernelInterface::MASTER_REQUEST,
- $response->getWrappedObject()
+ $response->getWrappedObject(),
);
$responseHeaderBag->addCacheControlDirective('no-cache', true)->shouldNotBeCalled();
diff --git a/src/Sylius/Bundle/ShopBundle/spec/EventListener/ShopUserLogoutHandlerSpec.php b/src/Sylius/Bundle/ShopBundle/spec/EventListener/ShopUserLogoutHandlerSpec.php
index c4c2e2a8a2d..a9b7a5e6d85 100644
--- a/src/Sylius/Bundle/ShopBundle/spec/EventListener/ShopUserLogoutHandlerSpec.php
+++ b/src/Sylius/Bundle/ShopBundle/spec/EventListener/ShopUserLogoutHandlerSpec.php
@@ -28,7 +28,7 @@ final class ShopUserLogoutHandlerSpec extends ObjectBehavior
function let(
HttpUtils $httpUtils,
ChannelContextInterface $channelContext,
- CartStorageInterface $cartStorage
+ CartStorageInterface $cartStorage,
): void {
$this->beConstructedWith($httpUtils, '/', $channelContext, $cartStorage);
}
@@ -49,7 +49,7 @@ function it_clears_cart_session_after_logging_out_and_return_default_handler_res
HttpUtils $httpUtils,
Request $request,
Response $response,
- CartStorageInterface $cartStorage
+ CartStorageInterface $cartStorage,
): void {
$channelContext->getChannel()->willReturn($channel);
diff --git a/src/Sylius/Bundle/ShopBundle/spec/EventListener/UserCartRecalculationListenerSpec.php b/src/Sylius/Bundle/ShopBundle/spec/EventListener/UserCartRecalculationListenerSpec.php
index 3da2caa308a..f70da692151 100644
--- a/src/Sylius/Bundle/ShopBundle/spec/EventListener/UserCartRecalculationListenerSpec.php
+++ b/src/Sylius/Bundle/ShopBundle/spec/EventListener/UserCartRecalculationListenerSpec.php
@@ -31,7 +31,7 @@ final class UserCartRecalculationListenerSpec extends ObjectBehavior
function let(
CartContextInterface $cartContext,
OrderProcessorInterface $orderProcessor,
- SectionProviderInterface $uriBasedSectionContext
+ SectionProviderInterface $uriBasedSectionContext,
): void {
$this->beConstructedWith($cartContext, $orderProcessor, $uriBasedSectionContext);
}
@@ -43,7 +43,7 @@ function it_recalculates_cart_for_logged_in_user_and_interactive_login_event(
Request $request,
TokenInterface $token,
OrderInterface $order,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$uriBasedSectionContext->getSection()->willReturn($shopSection);
$cartContext->getCart()->willReturn($order);
@@ -58,7 +58,7 @@ function it_recalculates_cart_for_logged_in_user_and_user_event(
SectionProviderInterface $uriBasedSectionContext,
UserEvent $event,
OrderInterface $order,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$uriBasedSectionContext->getSection()->willReturn($shopSection);
$cartContext->getCart()->willReturn($order);
@@ -73,7 +73,7 @@ function it_does_nothing_if_cannot_find_cart_for_interactive_login_event(
SectionProviderInterface $uriBasedSectionContext,
Request $request,
TokenInterface $token,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$uriBasedSectionContext->getSection()->willReturn($shopSection);
$cartContext->getCart()->willThrow(CartNotFoundException::class);
@@ -87,7 +87,7 @@ function it_does_nothing_if_cannot_find_cart_for_user_event(
OrderProcessorInterface $orderProcessor,
SectionProviderInterface $uriBasedSectionContext,
UserEvent $event,
- ShopSection $shopSection
+ ShopSection $shopSection,
): void {
$uriBasedSectionContext->getSection()->willReturn($shopSection);
$cartContext->getCart()->willThrow(CartNotFoundException::class);
@@ -100,7 +100,7 @@ function it_does_nothing_if_section_is_different_than_shop_section(
CartContextInterface $cartContext,
OrderProcessorInterface $orderProcessor,
SectionProviderInterface $uriBasedSectionContext,
- UserEvent $event
+ UserEvent $event,
): void {
$uriBasedSectionContext->getSection()->willReturn(null);
$cartContext->getCart()->shouldNotBeCalled();
diff --git a/src/Sylius/Bundle/ShopBundle/spec/EventListener/UserImpersonatedListenerSpec.php b/src/Sylius/Bundle/ShopBundle/spec/EventListener/UserImpersonatedListenerSpec.php
index 5fa5a4c1639..ab9a6a158e9 100644
--- a/src/Sylius/Bundle/ShopBundle/spec/EventListener/UserImpersonatedListenerSpec.php
+++ b/src/Sylius/Bundle/ShopBundle/spec/EventListener/UserImpersonatedListenerSpec.php
@@ -29,7 +29,7 @@ final class UserImpersonatedListenerSpec extends ObjectBehavior
function let(
CartStorageInterface $cartStorage,
ChannelContextInterface $channelContext,
- OrderRepositoryInterface $orderRepository
+ OrderRepositoryInterface $orderRepository,
): void {
$this->beConstructedWith($cartStorage, $channelContext, $orderRepository);
}
@@ -42,7 +42,7 @@ function it_sets_cart_id_of_an_impersonated_customer_in_session(
ShopUserInterface $user,
CustomerInterface $customer,
ChannelInterface $channel,
- OrderInterface $cart
+ OrderInterface $cart,
): void {
$event->getUser()->willReturn($user);
$user->getCustomer()->willReturn($customer);
@@ -63,7 +63,7 @@ function it_removes_the_current_cart_id_if_an_impersonated_customer_has_no_cart(
UserEvent $event,
ShopUserInterface $user,
CustomerInterface $customer,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$event->getUser()->willReturn($user);
$user->getCustomer()->willReturn($customer);
@@ -79,7 +79,7 @@ function it_removes_the_current_cart_id_if_an_impersonated_customer_has_no_cart(
function it_does_nothing_when_the_user_is_not_a_shop_user_type(
UserEvent $event,
- UserInterface $user
+ UserInterface $user,
): void {
$event->getUser()->willReturn($user);
diff --git a/src/Sylius/Bundle/ShopBundle/spec/EventListener/UserRegistrationListenerSpec.php b/src/Sylius/Bundle/ShopBundle/spec/EventListener/UserRegistrationListenerSpec.php
index 6f3c0f6d307..bb5f233d282 100644
--- a/src/Sylius/Bundle/ShopBundle/spec/EventListener/UserRegistrationListenerSpec.php
+++ b/src/Sylius/Bundle/ShopBundle/spec/EventListener/UserRegistrationListenerSpec.php
@@ -33,7 +33,7 @@ function let(
GeneratorInterface $tokenGenerator,
EventDispatcherInterface $eventDispatcher,
ChannelContextInterface $channelContext,
- UserLoginInterface $userLogin
+ UserLoginInterface $userLogin,
): void {
$this->beConstructedWith(
$userManager,
@@ -41,7 +41,7 @@ function let(
$eventDispatcher,
$channelContext,
$userLogin,
- 'shop'
+ 'shop',
);
}
@@ -53,7 +53,7 @@ function it_sends_an_user_verification_email(
GenericEvent $event,
CustomerInterface $customer,
ShopUserInterface $user,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$event->getSubject()->willReturn($customer);
$customer->getUser()->willReturn($user);
@@ -84,7 +84,7 @@ function it_enables_and_signs_in_user(
GenericEvent $event,
CustomerInterface $customer,
ShopUserInterface $user,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$event->getSubject()->willReturn($customer);
$customer->getUser()->willReturn($user);
@@ -119,7 +119,7 @@ function it_does_not_send_verification_email_if_it_is_not_required_on_channel(
GenericEvent $event,
CustomerInterface $customer,
ShopUserInterface $user,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$event->getSubject()->willReturn($customer);
$customer->getUser()->willReturn($user);
@@ -147,7 +147,7 @@ function it_does_not_send_verification_email_if_it_is_not_required_on_channel(
function it_throws_an_invalid_argument_exception_if_event_subject_is_not_customer_type(
GenericEvent $event,
- \stdClass $customer
+ \stdClass $customer,
): void {
$event->getSubject()->willReturn($customer);
@@ -156,7 +156,7 @@ function it_throws_an_invalid_argument_exception_if_event_subject_is_not_custome
function it_throws_an_invalid_argument_exception_if_user_is_null(
GenericEvent $event,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$event->getSubject()->willReturn($customer);
$customer->getUser()->willReturn(null);
diff --git a/src/Sylius/Bundle/ShopBundle/spec/Router/LocaleStrippingRouterSpec.php b/src/Sylius/Bundle/ShopBundle/spec/Router/LocaleStrippingRouterSpec.php
index b531612a093..2fdcec74367 100644
--- a/src/Sylius/Bundle/ShopBundle/spec/Router/LocaleStrippingRouterSpec.php
+++ b/src/Sylius/Bundle/ShopBundle/spec/Router/LocaleStrippingRouterSpec.php
@@ -40,7 +40,7 @@ function it_is_warmable(): void
function it_strips_locale_from_the_generated_url_if_locale_is_the_same_as_the_one_from_context(
RouterInterface $decoratedRouter,
- LocaleContextInterface $localeContext
+ LocaleContextInterface $localeContext,
): void {
$localeContext->getLocaleCode()->willReturn('pl_PL');
@@ -50,7 +50,7 @@ function it_strips_locale_from_the_generated_url_if_locale_is_the_same_as_the_on
'http://generated.url/?_locale=pl_PL',
'http://generated.url/?foo=bar&_locale=pl_PL',
'http://generated.url/?_locale=pl_PL&foo=bar',
- 'http://generated.url/?bar=foo&_locale=pl_PL&foo=bar'
+ 'http://generated.url/?bar=foo&_locale=pl_PL&foo=bar',
)
;
@@ -62,7 +62,7 @@ function it_strips_locale_from_the_generated_url_if_locale_is_the_same_as_the_on
function it_does_not_strip_locale_from_the_generated_url_if_locale_is_different_than_the_one_from_context(
RouterInterface $decoratedRouter,
- LocaleContextInterface $localeContext
+ LocaleContextInterface $localeContext,
): void {
$localeContext->getLocaleCode()->willReturn('en_US');
@@ -75,7 +75,7 @@ function it_does_not_strip_locale_from_the_generated_url_if_locale_is_different_
}
function it_does_not_stirp_locale_from_the_generated_url_if_there_is_no_locale_parameter(
- RouterInterface $decoratedRouter
+ RouterInterface $decoratedRouter,
): void {
$decoratedRouter
->generate('route_name', [], UrlGeneratorInterface::ABSOLUTE_PATH)
diff --git a/src/Sylius/Bundle/TaxationBundle/Form/Type/TaxCategoryChoiceType.php b/src/Sylius/Bundle/TaxationBundle/Form/Type/TaxCategoryChoiceType.php
index d2f8f311c30..3cfb8c9c3b2 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/Tests/DependencyInjection/Compiler/RegisterCalculatorsPassTest.php b/src/Sylius/Bundle/TaxationBundle/Tests/DependencyInjection/Compiler/RegisterCalculatorsPassTest.php
index 0d834cb9b39..92f6b897497 100644
--- a/src/Sylius/Bundle/TaxationBundle/Tests/DependencyInjection/Compiler/RegisterCalculatorsPassTest.php
+++ b/src/Sylius/Bundle/TaxationBundle/Tests/DependencyInjection/Compiler/RegisterCalculatorsPassTest.php
@@ -29,7 +29,7 @@ public function it_registers_calculators_in_the_registry(): void
'custom_calc',
(new Definition())
->addTag('sylius.tax_calculator', ['calculator' => 'calc1'])
- ->addTag('sylius.tax_calculator', ['calculator' => 'calc2'])
+ ->addTag('sylius.tax_calculator', ['calculator' => 'calc2']),
);
$this->compile();
@@ -37,12 +37,12 @@ public function it_registers_calculators_in_the_registry(): void
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.registry.tax_calculator',
'register',
- ['calc1', new Reference('custom_calc')]
+ ['calc1', new Reference('custom_calc')],
);
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
'sylius.registry.tax_calculator',
'register',
- ['calc2', new Reference('custom_calc')]
+ ['calc2', new Reference('custom_calc')],
);
}
@@ -54,14 +54,14 @@ public function it_creates_parameter_which_maps_calculators(): void
'custom_calc',
(new Definition())
->addTag('sylius.tax_calculator', ['calculator' => 'calc1'])
- ->addTag('sylius.tax_calculator', ['calculator' => 'calc2'])
+ ->addTag('sylius.tax_calculator', ['calculator' => 'calc2']),
);
$this->compile();
$this->assertContainerBuilderHasParameter(
'sylius.tax_calculators',
- ['calc1' => 'calc1', 'calc2' => 'calc2']
+ ['calc1' => 'calc1', 'calc2' => 'calc2'],
);
}
diff --git a/src/Sylius/Bundle/TaxationBundle/spec/DependencyInjection/Compiler/RegisterCalculatorsPassSpec.php b/src/Sylius/Bundle/TaxationBundle/spec/DependencyInjection/Compiler/RegisterCalculatorsPassSpec.php
index 6837b865b46..1df763caa29 100644
--- a/src/Sylius/Bundle/TaxationBundle/spec/DependencyInjection/Compiler/RegisterCalculatorsPassSpec.php
+++ b/src/Sylius/Bundle/TaxationBundle/spec/DependencyInjection/Compiler/RegisterCalculatorsPassSpec.php
@@ -41,12 +41,12 @@ function it_processes_the_calculators_services(ContainerBuilder $container, Defi
$calculator->addMethodCall(
'register',
- Argument::type('array')
+ Argument::type('array'),
)->shouldBeCalled();
$container->setParameter(
'sylius.tax_calculators',
- ['calculator_name' => 'calculator_name']
+ ['calculator_name' => 'calculator_name'],
)->shouldBeCalled();
$this->process($container);
diff --git a/src/Sylius/Bundle/TaxationBundle/test/src/Tests/SyliusTaxationBundleTest.php b/src/Sylius/Bundle/TaxationBundle/test/src/Tests/SyliusTaxationBundleTest.php
index 8fb87d9d124..7ef84db40ad 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/Controller/TaxonSlugController.php b/src/Sylius/Bundle/TaxonomyBundle/Controller/TaxonSlugController.php
index 84ed208ae99..cf5329ffe13 100644
--- a/src/Sylius/Bundle/TaxonomyBundle/Controller/TaxonSlugController.php
+++ b/src/Sylius/Bundle/TaxonomyBundle/Controller/TaxonSlugController.php
@@ -32,7 +32,7 @@ final class TaxonSlugController
public function __construct(
TaxonSlugGeneratorInterface $taxonSlugGenerator,
RepositoryInterface $taxonRepository,
- FactoryInterface $taxonFactory
+ FactoryInterface $taxonFactory,
) {
$this->taxonSlugGenerator = $taxonSlugGenerator;
$this->taxonRepository = $taxonRepository;
diff --git a/src/Sylius/Bundle/TaxonomyBundle/Tests/Functional/SyliusTaxonomyBundleTest.php b/src/Sylius/Bundle/TaxonomyBundle/Tests/Functional/SyliusTaxonomyBundleTest.php
index f8b72fbec2e..d31e768532c 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/Block/BlockEventListener.php b/src/Sylius/Bundle/UiBundle/Block/BlockEventListener.php
index 9a92473c94d..4dbe2d3d03f 100644
--- a/src/Sylius/Bundle/UiBundle/Block/BlockEventListener.php
+++ b/src/Sylius/Bundle/UiBundle/Block/BlockEventListener.php
@@ -27,7 +27,7 @@ public function __construct(string $template)
{
@trigger_error(
sprintf('Using "%s" to add blocks to the templates is deprecated since Sylius 1.7 and will be removed in Sylius 2.0. Use "sylius_ui" configuration instead.', self::class),
- \E_USER_DEPRECATED
+ \E_USER_DEPRECATED,
);
$this->template = $template;
diff --git a/src/Sylius/Bundle/UiBundle/Command/DebugTemplateEventCommand.php b/src/Sylius/Bundle/UiBundle/Command/DebugTemplateEventCommand.php
index d0a3c405efd..f5872455c3b 100644
--- a/src/Sylius/Bundle/UiBundle/Command/DebugTemplateEventCommand.php
+++ b/src/Sylius/Bundle/UiBundle/Command/DebugTemplateEventCommand.php
@@ -63,14 +63,14 @@ 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(),
$templateBlock->isEnabled() ? 'TRUE' : 'FALSE',
],
- $this->templateBlockRegistry->all()[$eventName] ?? []
- )
+ $this->templateBlockRegistry->all()[$eventName] ?? [],
+ ),
);
return 0;
diff --git a/src/Sylius/Bundle/UiBundle/Controller/SecurityController.php b/src/Sylius/Bundle/UiBundle/Controller/SecurityController.php
index 229d30bd79d..e78f4415855 100644
--- a/src/Sylius/Bundle/UiBundle/Controller/SecurityController.php
+++ b/src/Sylius/Bundle/UiBundle/Controller/SecurityController.php
@@ -45,7 +45,7 @@ public function __construct(
FormFactoryInterface $formFactory,
object $templatingEngine,
AuthorizationCheckerInterface $authorizationChecker,
- RouterInterface $router
+ RouterInterface $router,
) {
$this->authenticationUtils = $authenticationUtils;
$this->formFactory = $formFactory;
diff --git a/src/Sylius/Bundle/UiBundle/DataCollector/TemplateBlockDataCollector.php b/src/Sylius/Bundle/UiBundle/DataCollector/TemplateBlockDataCollector.php
index a732fec5b1e..2e848bd73d7 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/Compiler/LegacySonataBlockPass.php b/src/Sylius/Bundle/UiBundle/DependencyInjection/Compiler/LegacySonataBlockPass.php
index 6830f946e0f..3ba09e1df00 100644
--- a/src/Sylius/Bundle/UiBundle/DependencyInjection/Compiler/LegacySonataBlockPass.php
+++ b/src/Sylius/Bundle/UiBundle/DependencyInjection/Compiler/LegacySonataBlockPass.php
@@ -34,7 +34,7 @@ public function process(ContainerBuilder $container): void
$whitelistedVariables = array_merge(
$whitelistedVariables,
- array_keys($config['blocks']['sonata.block.service.template']['settings'])
+ array_keys($config['blocks']['sonata.block.service.template']['settings']),
);
}
diff --git a/src/Sylius/Bundle/UiBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/UiBundle/DependencyInjection/Configuration.php
index ffb17b4f38f..7b3bd10b678 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/TemplateBlock.php b/src/Sylius/Bundle/UiBundle/Registry/TemplateBlock.php
index 38a4a23f7c1..5405354a244 100644
--- a/src/Sylius/Bundle/UiBundle/Registry/TemplateBlock.php
+++ b/src/Sylius/Bundle/UiBundle/Registry/TemplateBlock.php
@@ -36,7 +36,7 @@ public function __construct(
?string $template,
?array $context,
?int $priority,
- ?bool $enabled
+ ?bool $enabled,
) {
$this->name = $name;
$this->eventName = $eventName;
@@ -62,7 +62,7 @@ public function getTemplate(): string
throw new \DomainException(sprintf(
'There is no template defined for block "%s" in event "%s".',
$this->name,
- $this->eventName
+ $this->eventName,
));
}
@@ -90,7 +90,7 @@ public function overwriteWith(self $block): self
throw new \DomainException(sprintf(
'Trying to overwrite block "%s" with block "%s".',
$this->name,
- $block->name
+ $block->name,
));
}
@@ -100,7 +100,7 @@ public function overwriteWith(self $block): self
$block->template ?? $this->template,
$block->context ?? $this->context,
$block->priority ?? $this->priority,
- $block->enabled ?? $this->enabled
+ $block->enabled ?? $this->enabled,
);
}
}
diff --git a/src/Sylius/Bundle/UiBundle/Registry/TemplateBlockRegistry.php b/src/Sylius/Bundle/UiBundle/Registry/TemplateBlockRegistry.php
index 6efda450bf1..991ec343662 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/HtmlDebugTemplateBlockRenderer.php b/src/Sylius/Bundle/UiBundle/Renderer/HtmlDebugTemplateBlockRenderer.php
index d15c44be9e3..c6cfcdd3e7b 100644
--- a/src/Sylius/Bundle/UiBundle/Renderer/HtmlDebugTemplateBlockRenderer.php
+++ b/src/Sylius/Bundle/UiBundle/Renderer/HtmlDebugTemplateBlockRenderer.php
@@ -39,7 +39,7 @@ public function render(TemplateBlock $templateBlock, array $context = []): strin
$templateBlock->getEventName(),
$templateBlock->getName(),
$templateBlock->getTemplate(),
- $templateBlock->getPriority()
+ $templateBlock->getPriority(),
);
}
@@ -49,7 +49,7 @@ public function render(TemplateBlock $templateBlock, array $context = []): strin
$renderedParts[] = sprintf(
'',
$templateBlock->getEventName(),
- $templateBlock->getName()
+ $templateBlock->getName(),
);
}
diff --git a/src/Sylius/Bundle/UiBundle/Renderer/HtmlDebugTemplateEventRenderer.php b/src/Sylius/Bundle/UiBundle/Renderer/HtmlDebugTemplateEventRenderer.php
index f26c674a259..00bdcae0dba 100644
--- a/src/Sylius/Bundle/UiBundle/Renderer/HtmlDebugTemplateEventRenderer.php
+++ b/src/Sylius/Bundle/UiBundle/Renderer/HtmlDebugTemplateEventRenderer.php
@@ -40,7 +40,7 @@ public function render(array $eventNames, array $context = []): string
if ($shouldRenderHtmlDebug) {
$renderedParts[] = sprintf(
'',
- implode(', ', $eventNames)
+ implode(', ', $eventNames),
);
}
@@ -49,7 +49,7 @@ public function render(array $eventNames, array $context = []): string
if ($shouldRenderHtmlDebug) {
$renderedParts[] = sprintf(
'',
- implode(', ', $eventNames)
+ implode(', ', $eventNames),
);
}
@@ -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/Renderer/TwigTemplateBlockRenderer.php b/src/Sylius/Bundle/UiBundle/Renderer/TwigTemplateBlockRenderer.php
index ae4e86125a3..5f633fed562 100644
--- a/src/Sylius/Bundle/UiBundle/Renderer/TwigTemplateBlockRenderer.php
+++ b/src/Sylius/Bundle/UiBundle/Renderer/TwigTemplateBlockRenderer.php
@@ -32,7 +32,7 @@ public function render(TemplateBlock $templateBlock, array $context = []): strin
{
return $this->twig->render(
$templateBlock->getTemplate(),
- array_replace($templateBlock->getContext(), $context)
+ array_replace($templateBlock->getContext(), $context),
);
}
}
diff --git a/src/Sylius/Bundle/UiBundle/Tests/DependencyInjection/ConfigurationTest.php b/src/Sylius/Bundle/UiBundle/Tests/DependencyInjection/ConfigurationTest.php
index 5f4060c0533..b3be1963362 100644
--- a/src/Sylius/Bundle/UiBundle/Tests/DependencyInjection/ConfigurationTest.php
+++ b/src/Sylius/Bundle/UiBundle/Tests/DependencyInjection/ConfigurationTest.php
@@ -51,7 +51,7 @@ public function consecutive_event_configuration_are_merged(): void
['events' => ['second_event' => []]],
],
['events' => ['first_event' => ['blocks' => []], 'second_event' => ['blocks' => []]]],
- 'events'
+ 'events',
);
}
@@ -60,7 +60,7 @@ public function event_configuration_has_block_configuration(): void
{
$this->assertConfigurationIsValid(
[['events' => ['event_name' => ['blocks' => ['block_name' => ['template' => 'block.html.twig']]]]]],
- 'events'
+ 'events',
);
}
@@ -72,7 +72,7 @@ public function multiple_blocks_can_be_configured_for_an_event(): void
'first_block' => ['template' => 'block.html.twig'],
'second_block' => ['template' => 'block.html.twig'],
]]]]],
- 'events'
+ 'events',
);
}
@@ -82,7 +82,7 @@ public function block_has_default_priority_set_to_zero(): void
$this->assertProcessedConfigurationEquals(
[['events' => ['event_name' => ['blocks' => ['block_name' => []]]]]],
['events' => ['event_name' => ['blocks' => ['block_name' => ['priority' => 0]]]]],
- 'events.*.blocks.*.priority'
+ 'events.*.blocks.*.priority',
);
}
@@ -92,7 +92,7 @@ public function block_priority_is_set_within_its_configuration(): void
$this->assertProcessedConfigurationEquals(
[['events' => ['event_name' => ['blocks' => ['block_name' => ['priority' => 100]]]]]],
['events' => ['event_name' => ['blocks' => ['block_name' => ['priority' => 100]]]]],
- 'events.*.blocks.*.priority'
+ 'events.*.blocks.*.priority',
);
}
@@ -102,7 +102,7 @@ public function block_is_null_by_default(): void
$this->assertProcessedConfigurationEquals(
[['events' => ['event_name' => ['blocks' => ['block_name' => []]]]]],
['events' => ['event_name' => ['blocks' => ['block_name' => ['enabled' => null]]]]],
- 'events.*.blocks.*.enabled'
+ 'events.*.blocks.*.enabled',
);
}
@@ -112,7 +112,7 @@ public function block_can_be_disabled_within_its_configuration(): void
$this->assertProcessedConfigurationEquals(
[['events' => ['event_name' => ['blocks' => ['block_name' => ['enabled' => false]]]]]],
['events' => ['event_name' => ['blocks' => ['block_name' => ['enabled' => false]]]]],
- 'events.*.blocks.*.enabled'
+ 'events.*.blocks.*.enabled',
);
}
@@ -122,7 +122,7 @@ public function block_configuration_can_be_shortened_to_template_string_only():
$this->assertProcessedConfigurationEquals(
[['events' => ['event_name' => ['blocks' => ['block_name' => 'template.html.twig']]]]],
['events' => ['event_name' => ['blocks' => ['block_name' => ['template' => 'template.html.twig']]]]],
- 'events.*.blocks.*.template'
+ 'events.*.blocks.*.template',
);
}
@@ -135,7 +135,7 @@ public function consecutive_block_configurations_can_change_the_template(): void
['events' => ['event_name' => ['blocks' => ['block_name' => ['template' => 'another_template.html.twig']]]]],
],
['events' => ['event_name' => ['blocks' => ['block_name' => ['template' => 'another_template.html.twig']]]]],
- 'events.*.blocks.*.template'
+ 'events.*.blocks.*.template',
);
}
@@ -148,7 +148,7 @@ public function consecutive_block_configurations_can_change_the_priority(): void
['events' => ['event_name' => ['blocks' => ['block_name' => ['priority' => 13]]]]],
],
['events' => ['event_name' => ['blocks' => ['block_name' => ['priority' => 13]]]]],
- 'events.*.blocks.*.priority'
+ 'events.*.blocks.*.priority',
);
}
@@ -161,7 +161,7 @@ public function consecutive_block_configurations_can_disable_it(): void
['events' => ['event_name' => ['blocks' => ['block_name' => ['enabled' => false]]]]],
],
['events' => ['event_name' => ['blocks' => ['block_name' => ['enabled' => false]]]]],
- 'events.*.blocks.*.enabled'
+ 'events.*.blocks.*.enabled',
);
}
@@ -177,7 +177,7 @@ public function consecutive_block_configurations_are_merged(): void
'first_block' => ['template' => 'first.html.twig'],
'second_block' => ['template' => 'second.html.twig'],
]]]],
- 'events.*.blocks.*.template'
+ 'events.*.blocks.*.template',
);
}
@@ -187,7 +187,7 @@ public function context_can_be_passed_to_the_block(): void
$this->assertProcessedConfigurationEquals(
[['events' => ['event_name' => ['blocks' => ['block_name' => ['context' => ['foo' => 'bar']]]]]]],
['events' => ['event_name' => ['blocks' => ['block_name' => ['context' => ['foo' => 'bar']]]]]],
- 'events.*.blocks.*.context'
+ 'events.*.blocks.*.context',
);
}
@@ -200,7 +200,7 @@ public function consecutive_block_context_configuration_is_shallowly_merged(): v
['events' => ['event_name' => ['blocks' => ['block_name' => ['context' => ['bar' => 'baz']]]]]],
],
['events' => ['event_name' => ['blocks' => ['block_name' => ['context' => ['foo' => 'bar', 'bar' => 'baz']]]]]],
- 'events.*.blocks.*.context'
+ 'events.*.blocks.*.context',
);
$this->assertProcessedConfigurationEquals(
@@ -209,7 +209,7 @@ public function consecutive_block_context_configuration_is_shallowly_merged(): v
['events' => ['event_name' => ['blocks' => ['block_name' => ['context' => ['foo' => ['baz']]]]]]],
],
['events' => ['event_name' => ['blocks' => ['block_name' => ['context' => ['foo' => ['baz']]]]]]],
- 'events.*.blocks.*.context'
+ 'events.*.blocks.*.context',
);
}
diff --git a/src/Sylius/Bundle/UiBundle/Tests/DependencyInjection/SyliusUiExtensionTest.php b/src/Sylius/Bundle/UiBundle/Tests/DependencyInjection/SyliusUiExtensionTest.php
index c568e9dcd92..badf7c5dec3 100644
--- a/src/Sylius/Bundle/UiBundle/Tests/DependencyInjection/SyliusUiExtensionTest.php
+++ b/src/Sylius/Bundle/UiBundle/Tests/DependencyInjection/SyliusUiExtensionTest.php
@@ -47,7 +47,7 @@ public function it_configures_the_multiple_event_block_listener_service_with_eve
'second_event' => [
'another_block' => new Definition(TemplateBlock::class, ['another_block', 'second_event', 'another.html.twig', [], 0, true]),
],
- ]
+ ],
);
}
@@ -73,7 +73,7 @@ public function it_sorts_blocks_by_their_priority_and_uses_fifo_ordering(): void
'second_block' => new Definition(TemplateBlock::class, ['second_block', 'event_name', 'second.html.twig', [], 0, true]),
'third_block' => new Definition(TemplateBlock::class, ['third_block', 'event_name', 'third.html.twig', [], 0, true]),
'fourth_block' => new Definition(TemplateBlock::class, ['fourth_block', 'event_name', 'fourth.html.twig', [], -5, true]),
- ]]
+ ]],
);
}
diff --git a/src/Sylius/Bundle/UiBundle/Tests/Functional/Kernel.php b/src/Sylius/Bundle/UiBundle/Tests/Functional/Kernel.php
index b375d19f456..e980e328d1b 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;
@@ -49,7 +49,7 @@ protected function configureContainer(ContainerBuilder $containerBuilder, Loader
$containerBuilder->loadFromExtension(
'sonata_block',
- ['blocks' => ['sonata.block.service.template' => ['settings' => ['context' => null]]]]
+ ['blocks' => ['sonata.block.service.template' => ['settings' => ['context' => null]]]],
);
$containerBuilder->loadFromExtension('sylius_ui', ['events' => [
diff --git a/src/Sylius/Bundle/UiBundle/Tests/Functional/TemplateEventTest.php b/src/Sylius/Bundle/UiBundle/Tests/Functional/TemplateEventTest.php
index 6baa2659f3b..4f962342cc4 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 a27feb63b3a..8669885768e 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/UiBundle/Twig/SortByExtension.php b/src/Sylius/Bundle/UiBundle/Twig/SortByExtension.php
index 2dd1938fb7e..1aef3ef3fd8 100644
--- a/src/Sylius/Bundle/UiBundle/Twig/SortByExtension.php
+++ b/src/Sylius/Bundle/UiBundle/Twig/SortByExtension.php
@@ -52,7 +52,7 @@ function ($firstElement, $secondElement) use ($field, $order) {
}
return $result;
- }
+ },
);
return $array;
diff --git a/src/Sylius/Bundle/UiBundle/Twig/TestFormAttributeExtension.php b/src/Sylius/Bundle/UiBundle/Twig/TestFormAttributeExtension.php
index 01c68ea278b..424900b3cf3 100644
--- a/src/Sylius/Bundle/UiBundle/Twig/TestFormAttributeExtension.php
+++ b/src/Sylius/Bundle/UiBundle/Twig/TestFormAttributeExtension.php
@@ -40,7 +40,7 @@ function (string $name, ?string $value = null): array {
return [];
},
- ['is_safe' => ['html']]
+ ['is_safe' => ['html']],
),
];
}
diff --git a/src/Sylius/Bundle/UiBundle/Twig/TestHtmlAttributeExtension.php b/src/Sylius/Bundle/UiBundle/Twig/TestHtmlAttributeExtension.php
index 8af65b7617f..fbee110c71b 100644
--- a/src/Sylius/Bundle/UiBundle/Twig/TestHtmlAttributeExtension.php
+++ b/src/Sylius/Bundle/UiBundle/Twig/TestHtmlAttributeExtension.php
@@ -40,7 +40,7 @@ function (string $name, ?string $value = null): string {
return '';
},
- ['is_safe' => ['html']]
+ ['is_safe' => ['html']],
),
];
}
diff --git a/src/Sylius/Bundle/UiBundle/spec/Controller/SecurityControllerSpec.php b/src/Sylius/Bundle/UiBundle/spec/Controller/SecurityControllerSpec.php
index 4022ec6333b..fb085b58566 100644
--- a/src/Sylius/Bundle/UiBundle/spec/Controller/SecurityControllerSpec.php
+++ b/src/Sylius/Bundle/UiBundle/spec/Controller/SecurityControllerSpec.php
@@ -33,7 +33,7 @@ function let(
FormFactoryInterface $formFactory,
Environment $templatingEngine,
AuthorizationCheckerInterface $authorizationChecker,
- RouterInterface $router
+ RouterInterface $router,
): void {
$this->beConstructedWith($authenticationUtils, $formFactory, $templatingEngine, $authorizationChecker, $router);
}
@@ -47,7 +47,7 @@ function it_renders_login_form(
FormView $formView,
Environment $templatingEngine,
AuthorizationCheckerInterface $authorizationChecker,
- Response $response
+ Response $response,
): void {
$authorizationChecker->isGranted('IS_AUTHENTICATED_FULLY')->willReturn(false);
@@ -79,7 +79,7 @@ function it_redirects_when_user_is_logged_in(
Request $request,
ParameterBag $requestAttributes,
AuthorizationCheckerInterface $authorizationChecker,
- RouterInterface $router
+ RouterInterface $router,
): void {
$request->attributes = $requestAttributes;
$requestAttributes->get('_sylius')->willReturn(['logged_in_route' => 'foo_bar']);
@@ -93,13 +93,15 @@ function it_throws_an_exception_when_check_action_is_accessed(Request $request):
{
$this
->shouldThrow(new \RuntimeException('You must configure the check path to be handled by the firewall.'))
- ->during('checkAction', [$request]);
+ ->during('checkAction', [$request])
+ ;
}
function it_throws_an_exception_when_logout_action_is_accessed(Request $request): void
{
$this
->shouldThrow(new \RuntimeException('You must configure the logout path to be handled by the firewall.'))
- ->during('logoutAction', [$request]);
+ ->during('logoutAction', [$request])
+ ;
}
}
diff --git a/src/Sylius/Bundle/UiBundle/spec/Renderer/DelegatingTemplateEventRendererSpec.php b/src/Sylius/Bundle/UiBundle/spec/Renderer/DelegatingTemplateEventRendererSpec.php
index 99340243ae6..e3f504c32a8 100644
--- a/src/Sylius/Bundle/UiBundle/spec/Renderer/DelegatingTemplateEventRendererSpec.php
+++ b/src/Sylius/Bundle/UiBundle/spec/Renderer/DelegatingTemplateEventRendererSpec.php
@@ -34,7 +34,7 @@ function it_is_a_template_event_renderer(): void
function it_renders_template_events(
TemplateBlockRegistryInterface $templateBlockRegistry,
- TemplateBlockRendererInterface $templateBlockRenderer
+ TemplateBlockRendererInterface $templateBlockRenderer,
): void {
$firstTemplateBlock = new TemplateBlock('first_block', 'best_event_ever', 'firstBlock.txt.twig', [], 0, true);
$secondTemplateBlock = new TemplateBlock('second_block', 'best_event_ever', 'secondBlock.txt.twig', [], 0, true);
@@ -49,7 +49,7 @@ function it_renders_template_events(
function it_returns_an_empty_string_if_no_blocks_are_found_for_an_event(
TemplateBlockRegistryInterface $templateBlockRegistry,
- TemplateBlockRendererInterface $templateBlockRenderer
+ TemplateBlockRendererInterface $templateBlockRenderer,
): void {
$templateBlockRegistry->findEnabledForEvents(['best_event_ever'])->willReturn([]);
diff --git a/src/Sylius/Bundle/UiBundle/spec/Renderer/HtmlDebugTemplateBlockRendererSpec.php b/src/Sylius/Bundle/UiBundle/spec/Renderer/HtmlDebugTemplateBlockRendererSpec.php
index 445546926e4..29d17315014 100644
--- a/src/Sylius/Bundle/UiBundle/spec/Renderer/HtmlDebugTemplateBlockRendererSpec.php
+++ b/src/Sylius/Bundle/UiBundle/spec/Renderer/HtmlDebugTemplateBlockRendererSpec.php
@@ -31,28 +31,28 @@ function it_is_a_template_block_renderer(): void
}
function it_renders_html_debug_comment_prepending_the_block_if_rendering_html_template(
- TemplateBlockRendererInterface $templateBlockRenderer
+ TemplateBlockRendererInterface $templateBlockRenderer,
): void {
$templateBlockRenderer->render(Argument::cetera())->willReturn('Block content');
$this->render(
new TemplateBlock('block_name', 'event_name', 'block.html.twig', [], 0, true),
- ['foo' => 'bar']
+ ['foo' => 'bar'],
)->shouldReturn(
'' . "\n" .
'Block content' . "\n" .
- ''
+ '',
);
}
function it_does_not_render_html_debug_comment_prepending_the_block_if_rendering_non_html_template(
- TemplateBlockRendererInterface $templateBlockRenderer
+ TemplateBlockRendererInterface $templateBlockRenderer,
): void {
$templateBlockRenderer->render(Argument::cetera())->willReturn('Block content');
$this->render(
new TemplateBlock('block_name', 'event_name', 'block.txt.twig', [], 0, true),
- ['foo' => 'bar']
+ ['foo' => 'bar'],
)->shouldReturn('Block content');
}
}
diff --git a/src/Sylius/Bundle/UiBundle/spec/Renderer/HtmlDebugTemplateEventRendererSpec.php b/src/Sylius/Bundle/UiBundle/spec/Renderer/HtmlDebugTemplateEventRendererSpec.php
index a51da6347ef..51aea670626 100644
--- a/src/Sylius/Bundle/UiBundle/spec/Renderer/HtmlDebugTemplateEventRendererSpec.php
+++ b/src/Sylius/Bundle/UiBundle/spec/Renderer/HtmlDebugTemplateEventRendererSpec.php
@@ -33,7 +33,7 @@ function it_is_a_template_event_renderer(): void
function it_renders_html_debug_comment_if_at_least_one_template_is_a_html_one(
TemplateEventRendererInterface $templateEventRenderer,
- TemplateBlockRegistryInterface $templateBlockRegistry
+ TemplateBlockRegistryInterface $templateBlockRegistry,
): void {
$firstTemplateBlock = new TemplateBlock('first_block', 'event_block', 'firstBlock.txt.twig', [], 0, true);
$secondTemplateBlock = new TemplateBlock('second_block', 'event_block', 'secondBlock.html.twig', [], 0, true);
@@ -46,13 +46,13 @@ function it_renders_html_debug_comment_if_at_least_one_template_is_a_html_one(
'' . "\n" .
'First block' . "\n" .
'Second block' . "\n" .
- ''
+ '',
);
}
function it_does_not_render_html_debug_comment_if_no_html_templates_are_found(
TemplateEventRendererInterface $templateEventRenderer,
- TemplateBlockRegistryInterface $templateBlockRegistry
+ TemplateBlockRegistryInterface $templateBlockRegistry,
): void {
$firstTemplateBlock = new TemplateBlock('first_block', 'event_block', 'firstBlock.txt.twig', [], 0, true);
$secondTemplateBlock = new TemplateBlock('second_block', 'event_block', 'secondBlock.txt.twig', [], 0, true);
@@ -66,7 +66,7 @@ function it_does_not_render_html_debug_comment_if_no_html_templates_are_found(
function it_returns_html_debug_comment_if_no_blocks_are_found_for_an_event(
TemplateEventRendererInterface $templateEventRenderer,
- TemplateBlockRegistryInterface $templateBlockRegistry
+ TemplateBlockRegistryInterface $templateBlockRegistry,
): void {
$templateBlockRegistry->findEnabledForEvents(['best_event_ever'])->willReturn([]);
@@ -75,7 +75,7 @@ function it_returns_html_debug_comment_if_no_blocks_are_found_for_an_event(
$this->render(['best_event_ever'])->shouldReturn(
'' . "\n" .
"\n" .
- ''
+ '',
);
}
}
diff --git a/src/Sylius/Bundle/UiBundle/spec/Renderer/TwigTemplateBlockRendererSpec.php b/src/Sylius/Bundle/UiBundle/spec/Renderer/TwigTemplateBlockRendererSpec.php
index e774bdcf316..5dc716b286a 100644
--- a/src/Sylius/Bundle/UiBundle/spec/Renderer/TwigTemplateBlockRendererSpec.php
+++ b/src/Sylius/Bundle/UiBundle/spec/Renderer/TwigTemplateBlockRendererSpec.php
@@ -36,7 +36,7 @@ function it_renders_a_template_block(Environment $twig): void
$this->render(
new TemplateBlock('block_name', 'event_name', 'block.txt.twig', [], 0, true),
- ['foo' => 'bar']
+ ['foo' => 'bar'],
)->shouldReturn('Block content');
}
@@ -46,7 +46,7 @@ function it_merges_template_block_context_with_passed_context(Environment $twig)
$this->render(
new TemplateBlock('block_name', 'event_name', 'block.txt.twig', ['sample' => 'Hi', 'switch' => true], 0, true),
- ['sample' => 'Hello']
+ ['sample' => 'Hello'],
)->shouldReturn('Block content');
}
}
diff --git a/src/Sylius/Bundle/UiBundle/spec/Twig/SortByExtensionSpec.php b/src/Sylius/Bundle/UiBundle/spec/Twig/SortByExtensionSpec.php
index d0973c6fc2b..481ce1adf4e 100644
--- a/src/Sylius/Bundle/UiBundle/spec/Twig/SortByExtensionSpec.php
+++ b/src/Sylius/Bundle/UiBundle/spec/Twig/SortByExtensionSpec.php
@@ -28,7 +28,7 @@ function it_extends_twig_extensions(): void
function it_sorts_in_ascending_order_by_default(
SampleInterface $firstSample,
SampleInterface $secondSample,
- SampleInterface $thirdSample
+ SampleInterface $thirdSample,
): void {
$firstSample->getInt()->willReturn(3);
$secondSample->getInt()->willReturn(5);
@@ -45,14 +45,14 @@ function it_sorts_in_ascending_order_by_default(
$thirdSample,
$firstSample,
$secondSample,
- ]
+ ],
);
}
function it_sorts_an_array_of_objects_by_various_properties(
SampleInterface $firstSample,
SampleInterface $secondSample,
- SampleInterface $thirdSample
+ SampleInterface $thirdSample,
): void {
$firstSample->getInt()->willReturn(3);
$secondSample->getInt()->willReturn(5);
@@ -77,7 +77,7 @@ function it_sorts_an_array_of_objects_by_various_properties(
$thirdSample,
$firstSample,
$secondSample,
- ]
+ ],
);
$this->sortBy($arrayBeforeSorting, 'string')->shouldReturn(
@@ -85,7 +85,7 @@ function it_sorts_an_array_of_objects_by_various_properties(
$secondSample,
$thirdSample,
$firstSample,
- ]
+ ],
);
$this->sortBy($arrayBeforeSorting, 'bizarrelyNamedProperty')->shouldReturn(
@@ -93,14 +93,14 @@ function it_sorts_an_array_of_objects_by_various_properties(
$thirdSample,
$secondSample,
$firstSample,
- ]
+ ],
);
}
function it_sorts_an_array_of_objects_in_descending_order_by_a_property(
SampleInterface $firstSample,
SampleInterface $secondSample,
- SampleInterface $thirdSample
+ SampleInterface $thirdSample,
): void {
$firstSample->getInt()->willReturn(3);
$secondSample->getInt()->willReturn(5);
@@ -117,7 +117,7 @@ function it_sorts_an_array_of_objects_in_descending_order_by_a_property(
$secondSample,
$firstSample,
$thirdSample,
- ]
+ ],
);
}
@@ -127,7 +127,7 @@ function it_sorts_an_array_of_objects_by_a_nested_property(
SampleInterface $thirdSample,
SampleInterface $firstInnerSample,
SampleInterface $secondInnerSample,
- SampleInterface $thirdInnerSample
+ SampleInterface $thirdInnerSample,
): void {
$firstInnerSample->getString()->willReturn('m');
$secondInnerSample->getString()->willReturn('Z');
@@ -148,14 +148,14 @@ function it_sorts_an_array_of_objects_by_a_nested_property(
$thirdSample,
$firstSample,
$secondSample,
- ]
+ ],
);
}
function it_throws_an_exception_if_the_property_is_not_found_on_objects(
SampleInterface $firstSample,
SampleInterface $secondSample,
- SampleInterface $thirdSample
+ SampleInterface $thirdSample,
): void {
$arrayBeforeSorting = [
$firstSample,
diff --git a/src/Sylius/Bundle/UserBundle/Command/AbstractRoleCommand.php b/src/Sylius/Bundle/UserBundle/Command/AbstractRoleCommand.php
index bd2028b85af..71f749ba58a 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/Command/DemoteUserCommand.php b/src/Sylius/Bundle/UserBundle/Command/DemoteUserCommand.php
index 8c7ed232c5c..17a02ccde8d 100644
--- a/src/Sylius/Bundle/UserBundle/Command/DemoteUserCommand.php
+++ b/src/Sylius/Bundle/UserBundle/Command/DemoteUserCommand.php
@@ -39,7 +39,8 @@ protected function configure(): void
php app/console sylius:user:demote matthieu@email.com
EOT
- );
+ )
+ ;
}
protected function executeRoleCommand(InputInterface $input, OutputInterface $output, UserInterface $user, array $securityRoles): void
diff --git a/src/Sylius/Bundle/UserBundle/Command/PromoteUserCommand.php b/src/Sylius/Bundle/UserBundle/Command/PromoteUserCommand.php
index 814ebd3644e..4a9ddbf426f 100644
--- a/src/Sylius/Bundle/UserBundle/Command/PromoteUserCommand.php
+++ b/src/Sylius/Bundle/UserBundle/Command/PromoteUserCommand.php
@@ -39,7 +39,8 @@ protected function configure(): void
php app/console sylius:user:promote matthieu@email.com
EOT
- );
+ )
+ ;
}
protected function executeRoleCommand(InputInterface $input, OutputInterface $output, UserInterface $user, array $securityRoles): void
diff --git a/src/Sylius/Bundle/UserBundle/Controller/UserController.php b/src/Sylius/Bundle/UserBundle/Controller/UserController.php
index 8ab3875b36c..cc98372e1eb 100644
--- a/src/Sylius/Bundle/UserBundle/Controller/UserController.php
+++ b/src/Sylius/Bundle/UserBundle/Controller/UserController.php
@@ -61,7 +61,7 @@ public function changePasswordAction(Request $request): Response
return new Response($this->container->get('twig')->render(
$configuration->getTemplate('changePassword.html'),
- ['form' => $form->createView()]
+ ['form' => $form->createView()],
));
}
@@ -113,7 +113,7 @@ public function resetPasswordAction(Request $request, string $token): Response
[
'form' => $form->createView(),
'user' => $user,
- ]
+ ],
));
}
@@ -236,7 +236,7 @@ protected function prepareResetPasswordRequest(Request $request, GeneratorInterf
return $this->redirectHandler->redirectToRoute(
$configuration,
$configuration->getParameters()->get('redirect')['route'],
- $configuration->getParameters()->get('redirect')['parameters']
+ $configuration->getParameters()->get('redirect')['parameters'],
);
}
@@ -251,7 +251,7 @@ protected function prepareResetPasswordRequest(Request $request, GeneratorInterf
$template,
[
'form' => $form->createView(),
- ]
+ ],
));
}
@@ -267,7 +267,7 @@ protected function addTranslatedFlash(string $type, string $message): void
protected function createResourceForm(
RequestConfiguration $configuration,
string $type,
- $object
+ $object,
): FormInterface {
if (!$configuration->isHtmlRequest()) {
return $this->container->get('form.factory')->createNamed('', $type, $object, ['csrf_protection' => false]);
@@ -298,7 +298,7 @@ protected function handleExpiredToken(Request $request, RequestConfiguration $co
protected function handleResetPasswordRequest(
GeneratorInterface $generator,
UserInterface $user,
- string $senderEvent
+ string $senderEvent,
): void {
$user->setPasswordResetToken($generator->generate());
$user->setPasswordRequestedAt(new \DateTime());
@@ -316,7 +316,7 @@ protected function handleResetPassword(
Request $request,
RequestConfiguration $configuration,
UserInterface $user,
- string $newPassword
+ string $newPassword,
): Response {
$user->setPlainPassword($newPassword);
$user->setPasswordResetToken(null);
@@ -344,7 +344,7 @@ protected function handleChangePassword(
Request $request,
RequestConfiguration $configuration,
UserInterface $user,
- string $newPassword
+ string $newPassword,
): Response {
$user->setPlainPassword($newPassword);
diff --git a/src/Sylius/Bundle/UserBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/UserBundle/DependencyInjection/Configuration.php
index 899dda7f526..8960e95a00a 100644
--- a/src/Sylius/Bundle/UserBundle/DependencyInjection/Configuration.php
+++ b/src/Sylius/Bundle/UserBundle/DependencyInjection/Configuration.php
@@ -75,7 +75,7 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
/** @param mixed $tokenFieldName */
function ($tokenFieldName) {
return !is_string($tokenFieldName);
- }
+ },
)
->thenInvalid('Invalid resetting token field "%s"')
->end()
@@ -96,7 +96,7 @@ function ($tokenFieldName) {
/** @param mixed $passwordResetToken */
function ($passwordResetToken) {
return !is_string($passwordResetToken);
- }
+ },
)
->thenInvalid('Invalid resetting pin field "%s"')
->end()
@@ -122,7 +122,7 @@ function ($passwordResetToken) {
/** @param mixed $emailVerificationToken */
function ($emailVerificationToken) {
return !is_string($emailVerificationToken);
- }
+ },
)
->thenInvalid('Invalid verification token field "%s"')
->end()
diff --git a/src/Sylius/Bundle/UserBundle/DependencyInjection/SyliusUserExtension.php b/src/Sylius/Bundle/UserBundle/DependencyInjection/SyliusUserExtension.php
index 3543592f1e6..03040f9a759 100644
--- a/src/Sylius/Bundle/UserBundle/DependencyInjection/SyliusUserExtension.php
+++ b/src/Sylius/Bundle/UserBundle/DependencyInjection/SyliusUserExtension.php
@@ -107,8 +107,8 @@ private function createTokenGenerators(string $userType, array $config, Containe
new Reference('sylius.random_generator'),
new Reference(sprintf('sylius.%s_user.token_uniqueness_checker.password_reset', $userType)),
$config['resetting']['token']['length'],
- ]
- )
+ ],
+ ),
)->setPublic(true);
$container->setDefinition(
@@ -119,8 +119,8 @@ private function createTokenGenerators(string $userType, array $config, Containe
new Reference('sylius.random_generator'),
new Reference(sprintf('sylius.%s_user.pin_uniqueness_checker.password_reset', $userType)),
$config['resetting']['pin']['length'],
- ]
- )
+ ],
+ ),
)->setPublic(true);
$container->setDefinition(
@@ -131,8 +131,8 @@ private function createTokenGenerators(string $userType, array $config, Containe
new Reference('sylius.random_generator'),
new Reference(sprintf('sylius.%s_user.token_uniqueness_checker.email_verification', $userType)),
$config['verification']['token']['length'],
- ]
- )
+ ],
+ ),
)->setPublic(true);
}
@@ -153,7 +153,7 @@ private function createUniquenessCheckers(string $userType, array $config, Conta
$resetPasswordTokenUniquenessCheckerDefinition->addArgument($config['resetting']['token']['field_name']);
$container->setDefinition(
sprintf('sylius.%s_user.token_uniqueness_checker.password_reset', $userType),
- $resetPasswordTokenUniquenessCheckerDefinition
+ $resetPasswordTokenUniquenessCheckerDefinition,
);
$resetPasswordPinUniquenessCheckerDefinition = new Definition(TokenUniquenessChecker::class);
@@ -161,7 +161,7 @@ private function createUniquenessCheckers(string $userType, array $config, Conta
$resetPasswordPinUniquenessCheckerDefinition->addArgument($config['resetting']['pin']['field_name']);
$container->setDefinition(
sprintf('sylius.%s_user.pin_uniqueness_checker.password_reset', $userType),
- $resetPasswordPinUniquenessCheckerDefinition
+ $resetPasswordPinUniquenessCheckerDefinition,
);
$emailVerificationTokenUniquenessCheckerDefinition = new Definition(TokenUniquenessChecker::class);
@@ -169,7 +169,7 @@ private function createUniquenessCheckers(string $userType, array $config, Conta
$emailVerificationTokenUniquenessCheckerDefinition->addArgument($config['verification']['token']['field_name']);
$container->setDefinition(
sprintf('sylius.%s_user.token_uniqueness_checker.email_verification', $userType),
- $emailVerificationTokenUniquenessCheckerDefinition
+ $emailVerificationTokenUniquenessCheckerDefinition,
);
}
@@ -251,7 +251,7 @@ private function overwriteResourceFactoryWithEncoderAwareFactory(ContainerBuilde
[
$container->getDefinition($factoryServiceId),
$encoder,
- ]
+ ],
);
$factoryDefinition->setPublic(true);
@@ -271,7 +271,7 @@ private function registerUpdateUserEncoderListener(ContainerBuilder $container,
$container->setDefinition(
sprintf('sylius.%s_user.listener.update_user_encoder', $userType),
- $updateUserEncoderListenerDefinition
+ $updateUserEncoderListenerDefinition,
);
}
}
diff --git a/src/Sylius/Bundle/UserBundle/EventListener/UpdateUserEncoderListener.php b/src/Sylius/Bundle/UserBundle/EventListener/UpdateUserEncoderListener.php
index 8f4d3f7b287..25b04240839 100644
--- a/src/Sylius/Bundle/UserBundle/EventListener/UpdateUserEncoderListener.php
+++ b/src/Sylius/Bundle/UserBundle/EventListener/UpdateUserEncoderListener.php
@@ -34,7 +34,7 @@ public function __construct(
string $recommendedEncoderName,
string $className,
string $interfaceName,
- string $passwordParameter
+ string $passwordParameter,
) {
$this->objectManager = $objectManager;
$this->recommendedEncoderName = $recommendedEncoderName;
diff --git a/src/Sylius/Bundle/UserBundle/Provider/AbstractUserProvider.php b/src/Sylius/Bundle/UserBundle/Provider/AbstractUserProvider.php
index f03f202fd5a..ae4979d9ca5 100644
--- a/src/Sylius/Bundle/UserBundle/Provider/AbstractUserProvider.php
+++ b/src/Sylius/Bundle/UserBundle/Provider/AbstractUserProvider.php
@@ -37,7 +37,7 @@ abstract class AbstractUserProvider implements UserProviderInterface
public function __construct(
string $supportedUserClass,
UserRepositoryInterface $userRepository,
- CanonicalizerInterface $canonicalizer
+ CanonicalizerInterface $canonicalizer,
) {
$this->supportedUserClass = $supportedUserClass;
$this->userRepository = $userRepository;
@@ -51,7 +51,7 @@ public function loadUserByUsername($username): UserInterface
if (null === $user) {
throw new UsernameNotFoundException(
- sprintf('Username "%s" does not exist.', $username)
+ sprintf('Username "%s" does not exist.', $username),
);
}
@@ -62,13 +62,13 @@ public function refreshUser(UserInterface $user): UserInterface
{
if (!$user instanceof SyliusUserInterface) {
throw new UnsupportedUserException(
- sprintf('User must implement "%s".', SyliusUserInterface::class)
+ sprintf('User must implement "%s".', SyliusUserInterface::class),
);
}
if (!$this->supportsClass(get_class($user))) {
throw new UnsupportedUserException(
- sprintf('Instances of "%s" are not supported.', get_class($user))
+ sprintf('Instances of "%s" are not supported.', get_class($user)),
);
}
@@ -76,7 +76,7 @@ public function refreshUser(UserInterface $user): UserInterface
$reloadedUser = $this->userRepository->find($user->getId());
if (null === $reloadedUser) {
throw new UsernameNotFoundException(
- sprintf('User with ID "%d" could not be refreshed.', $user->getId())
+ sprintf('User with ID "%d" could not be refreshed.', $user->getId()),
);
}
diff --git a/src/Sylius/Bundle/UserBundle/Security/UserLogin.php b/src/Sylius/Bundle/UserBundle/Security/UserLogin.php
index 8d33cc4d170..13b6fd7e430 100644
--- a/src/Sylius/Bundle/UserBundle/Security/UserLogin.php
+++ b/src/Sylius/Bundle/UserBundle/Security/UserLogin.php
@@ -33,7 +33,7 @@ class UserLogin implements UserLoginInterface
public function __construct(
TokenStorageInterface $tokenStorage,
UserCheckerInterface $userChecker,
- EventDispatcherInterface $eventDispatcher
+ EventDispatcherInterface $eventDispatcher,
) {
$this->tokenStorage = $tokenStorage;
$this->userChecker = $userChecker;
@@ -63,7 +63,7 @@ protected function createToken(UserInterface $user, string $firewallName): Usern
return new UsernamePasswordToken(
$user,
$firewallName,
- array_map(/** @param object|string $role */ static function ($role): string { return (string) $role; }, $user->getRoles())
+ array_map(/** @param object|string $role */ static function ($role): string { return (string) $role; }, $user->getRoles()),
);
}
@@ -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 da29714feac..dc5c9bc2c30 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/Authentication/AuthenticationFailureHandlerSpec.php b/src/Sylius/Bundle/UserBundle/spec/Authentication/AuthenticationFailureHandlerSpec.php
index ab4816766e2..e0774050dac 100644
--- a/src/Sylius/Bundle/UserBundle/spec/Authentication/AuthenticationFailureHandlerSpec.php
+++ b/src/Sylius/Bundle/UserBundle/spec/Authentication/AuthenticationFailureHandlerSpec.php
@@ -41,7 +41,7 @@ function it_is_a_authentication_failure_handler(): void
function it_returns_json_response_if_request_is_xml_based(
Request $request,
- AuthenticationException $authenticationException
+ AuthenticationException $authenticationException,
): void {
$request->isXmlHttpRequest()->willReturn(true);
$authenticationException->getMessageKey()->willReturn('Invalid credentials.');
diff --git a/src/Sylius/Bundle/UserBundle/spec/EventListener/PasswordUpdaterListenerSpec.php b/src/Sylius/Bundle/UserBundle/spec/EventListener/PasswordUpdaterListenerSpec.php
index 6789bfe4021..2dbdf9d6240 100644
--- a/src/Sylius/Bundle/UserBundle/spec/EventListener/PasswordUpdaterListenerSpec.php
+++ b/src/Sylius/Bundle/UserBundle/spec/EventListener/PasswordUpdaterListenerSpec.php
@@ -30,7 +30,7 @@ function let(PasswordUpdaterInterface $passwordUpdater): void
function it_updates_password_for_generic_event(
PasswordUpdaterInterface $passwordUpdater,
GenericEvent $event,
- UserInterface $user
+ UserInterface $user,
): void {
$event->getSubject()->willReturn($user);
@@ -54,7 +54,7 @@ function it_allows_to_update_password_for_generic_event_for_user_interface_imple
function it_updates_password_on_pre_persist_doctrine_event(
PasswordUpdaterInterface $passwordUpdater,
LifecycleEventArgs $event,
- UserInterface $user
+ UserInterface $user,
): void {
$event->getEntity()->willReturn($user);
@@ -68,7 +68,7 @@ function it_updates_password_on_pre_persist_doctrine_event(
function it_updates_password_on_pre_update_doctrine_event(
PasswordUpdaterInterface $passwordUpdater,
LifecycleEventArgs $event,
- UserInterface $user
+ UserInterface $user,
): void {
$event->getEntity()->willReturn($user);
@@ -81,9 +81,8 @@ 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
- {
+ LifecycleEventArgs $event,
+ ): void {
$event->getEntity()->willReturn('user');
$passwordUpdater->updatePassword(Argument::any())->shouldNotBeCalled();
@@ -92,7 +91,7 @@ function it_updates_password_on_pre_persist_doctrine_event_for_user_interface_im
function it_updates_password_on_pre_update_doctrine_event_for_user_interface_implementation_only(
PasswordUpdaterInterface $passwordUpdater,
- LifecycleEventArgs $event
+ LifecycleEventArgs $event,
): void {
$event->getEntity()->willReturn('user');
$passwordUpdater->updatePassword(Argument::any())->shouldNotBeCalled();
diff --git a/src/Sylius/Bundle/UserBundle/spec/EventListener/UpdateUserEncoderListenerSpec.php b/src/Sylius/Bundle/UserBundle/spec/EventListener/UpdateUserEncoderListenerSpec.php
index a43a5d592b8..1e101edb0a6 100644
--- a/src/Sylius/Bundle/UserBundle/spec/EventListener/UpdateUserEncoderListenerSpec.php
+++ b/src/Sylius/Bundle/UserBundle/spec/EventListener/UpdateUserEncoderListenerSpec.php
@@ -33,7 +33,7 @@ function let(ObjectManager $objectManager): void
function it_does_nothing_if_user_does_not_implement_user_interface(
ObjectManager $objectManager,
Request $request,
- TokenInterface $token
+ TokenInterface $token,
): void {
$user = new \stdClass();
@@ -49,7 +49,7 @@ function it_does_nothing_if_user_does_not_implement_specified_class_or_interface
ObjectManager $objectManager,
Request $request,
TokenInterface $token,
- User $user
+ User $user,
): void {
$token->getUser()->willReturn($user);
@@ -63,7 +63,7 @@ function it_does_nothing_if_user_uses_the_recommended_encoder(
ObjectManager $objectManager,
Request $request,
TokenInterface $token,
- FixtureUser $user
+ FixtureUser $user,
): void {
$token->getUser()->willReturn($user);
@@ -81,7 +81,7 @@ function it_does_nothing_if_user_uses_the_recommended_encoder(
function it_does_nothing_if_plain_password_could_not_be_resolved(
ObjectManager $objectManager,
TokenInterface $token,
- FixtureUser $user
+ FixtureUser $user,
): void {
$request = new Request();
@@ -101,7 +101,7 @@ function it_does_nothing_if_plain_password_could_not_be_resolved(
function it_does_nothing_if_resolved_plain_password_is_null(
ObjectManager $objectManager,
TokenInterface $token,
- FixtureUser $user
+ FixtureUser $user,
): void {
$request = new Request();
$request->request->set('_password', null);
@@ -122,7 +122,7 @@ function it_does_nothing_if_resolved_plain_password_is_null(
function it_does_nothing_if_resolved_plain_password_is_empty(
ObjectManager $objectManager,
TokenInterface $token,
- FixtureUser $user
+ FixtureUser $user,
): void {
$request = new Request();
$request->request->set('_password', '');
@@ -143,7 +143,7 @@ function it_does_nothing_if_resolved_plain_password_is_empty(
function it_updates_the_encoder_and_plain_password_if_using_old_encoder_and_plain_password_could_be_resolved(
ObjectManager $objectManager,
TokenInterface $token,
- FixtureUser $user
+ FixtureUser $user,
): void {
$request = new Request();
$request->request->set('_password', 'plainpassword');
@@ -164,7 +164,7 @@ function it_updates_the_encoder_and_plain_password_if_using_old_encoder_and_plai
function it_updates_the_encoder_and_plain_password_if_using_default_null_encoder_and_plain_password_could_be_resolved(
ObjectManager $objectManager,
TokenInterface $token,
- FixtureUser $user
+ FixtureUser $user,
): void {
$request = new Request();
$request->request->set('_password', 'plainpassword');
diff --git a/src/Sylius/Bundle/UserBundle/spec/EventListener/UserDeleteListenerSpec.php b/src/Sylius/Bundle/UserBundle/spec/EventListener/UserDeleteListenerSpec.php
index efd3578f110..3fe035159be 100644
--- a/src/Sylius/Bundle/UserBundle/spec/EventListener/UserDeleteListenerSpec.php
+++ b/src/Sylius/Bundle/UserBundle/spec/EventListener/UserDeleteListenerSpec.php
@@ -37,7 +37,7 @@ function it_deletes_user_if_it_is_different_than_currently_logged_one(
ResourceControllerEvent $event,
UserInterface $userToBeDeleted,
UserInterface $currentlyLoggedUser,
- TokenInterface $tokenInterface
+ TokenInterface $tokenInterface,
): void {
$event->getSubject()->willReturn($userToBeDeleted);
$userToBeDeleted->getId()->willReturn(11);
@@ -59,7 +59,7 @@ function it_deletes_user_if_no_user_is_logged_in(
FlashBagInterface $flashBag,
ResourceControllerEvent $event,
UserInterface $userToBeDeleted,
- TokenInterface $tokenInterface
+ TokenInterface $tokenInterface,
): void {
$event->getSubject()->willReturn($userToBeDeleted);
$userToBeDeleted->getId()->willReturn(11);
@@ -80,7 +80,7 @@ function it_deletes_user_if_there_is_no_token(
TokenStorageInterface $tokenStorage,
FlashBagInterface $flashBag,
ResourceControllerEvent $event,
- UserInterface $userToBeDeleted
+ UserInterface $userToBeDeleted,
): void {
$event->getSubject()->willReturn($userToBeDeleted);
$userToBeDeleted->getId()->willReturn(11);
@@ -102,7 +102,7 @@ function it_does_not_allow_to_delete_currently_logged_user(
UserInterface $currentlyLoggedInUser,
$tokenStorage,
$flashBag,
- TokenInterface $token
+ TokenInterface $token,
): void {
$event->getSubject()->willReturn($userToBeDeleted);
$userToBeDeleted->getId()->willReturn(1);
@@ -127,7 +127,7 @@ function it_deletes_shop_user_even_if_admin_user_has_same_id(
UserInterface $currentlyLoggedInUser,
$tokenStorage,
$flashBag,
- TokenInterface $token
+ TokenInterface $token,
): void {
$event->getSubject()->willReturn($userToBeDeleted);
$userToBeDeleted->getId()->willReturn(1);
diff --git a/src/Sylius/Bundle/UserBundle/spec/EventListener/UserLastLoginSubscriberSpec.php b/src/Sylius/Bundle/UserBundle/spec/EventListener/UserLastLoginSubscriberSpec.php
index 736c720a215..925466afd0e 100644
--- a/src/Sylius/Bundle/UserBundle/spec/EventListener/UserLastLoginSubscriberSpec.php
+++ b/src/Sylius/Bundle/UserBundle/spec/EventListener/UserLastLoginSubscriberSpec.php
@@ -50,7 +50,7 @@ function it_updates_user_last_login_on_security_interactive_login(
ObjectManager $userManager,
Request $request,
TokenInterface $token,
- UserInterface $user
+ UserInterface $user,
): void {
$token->getUser()->willReturn($user);
@@ -65,7 +65,7 @@ function it_updates_user_last_login_on_security_interactive_login(
function it_updates_user_last_login_on_implicit_login(
ObjectManager $userManager,
UserEvent $event,
- UserInterface $user
+ UserInterface $user,
): void {
$event->getUser()->willReturn($user);
@@ -80,7 +80,7 @@ function it_updates_user_last_login_on_implicit_login(
function it_updates_only_sylius_user_specified_in_constructor(
ObjectManager $userManager,
UserEvent $event,
- UserInterface $user
+ UserInterface $user,
): void {
$this->beConstructedWith($userManager, 'FakeBundle\User\Model\User');
@@ -98,7 +98,7 @@ function it_updates_only_user_specified_in_constructor(
UserEvent $event,
Request $request,
TokenInterface $token,
- SymfonyUserInterface $user
+ SymfonyUserInterface $user,
): void {
$this->beConstructedWith($userManager, 'FakeBundle\User\Model\User');
@@ -116,7 +116,7 @@ function it_throws_exception_if_subscriber_is_used_for_class_other_than_sylius_u
ObjectManager $userManager,
Request $request,
TokenInterface $token,
- SymfonyUserInterface $user
+ SymfonyUserInterface $user,
): void {
$this->beConstructedWith($userManager, SymfonyUserInterface::class);
diff --git a/src/Sylius/Bundle/UserBundle/spec/EventListener/UserReloaderListenerSpec.php b/src/Sylius/Bundle/UserBundle/spec/EventListener/UserReloaderListenerSpec.php
index acdf749d332..44629b060c7 100644
--- a/src/Sylius/Bundle/UserBundle/spec/EventListener/UserReloaderListenerSpec.php
+++ b/src/Sylius/Bundle/UserBundle/spec/EventListener/UserReloaderListenerSpec.php
@@ -37,7 +37,7 @@ function it_reloads_user(UserReloaderInterface $userReloader, GenericEvent $even
function it_throws_exception_when_reloading_not_a_user_interface(
UserReloaderInterface $userReloader,
- GenericEvent $event
+ GenericEvent $event,
): void {
$event->getSubject()->willReturn('user');
diff --git a/src/Sylius/Bundle/UserBundle/spec/Provider/EmailProviderSpec.php b/src/Sylius/Bundle/UserBundle/spec/Provider/EmailProviderSpec.php
index 4f29929428b..d254ee5f5ea 100644
--- a/src/Sylius/Bundle/UserBundle/spec/Provider/EmailProviderSpec.php
+++ b/src/Sylius/Bundle/UserBundle/spec/Provider/EmailProviderSpec.php
@@ -47,7 +47,7 @@ function it_supports_sylius_user_model(): void
function it_loads_user_by_email(
UserRepositoryInterface $userRepository,
CanonicalizerInterface $canonicalizer,
- User $user
+ User $user,
): void {
$canonicalizer->canonicalize('test@user.com')->willReturn('test@user.com');
@@ -66,7 +66,7 @@ function it_updates_user_by_user_name(UserRepositoryInterface $userRepository, U
}
function it_should_throw_exception_when_unsupported_user_is_used(
- UserInterface $user
+ UserInterface $user,
): void {
$this->shouldThrow(UnsupportedUserException::class)->during('refreshUser', [$user]);
}
diff --git a/src/Sylius/Bundle/UserBundle/spec/Provider/UsernameOrEmailProviderSpec.php b/src/Sylius/Bundle/UserBundle/spec/Provider/UsernameOrEmailProviderSpec.php
index aa75484cf5b..f1c94b19f01 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;
@@ -56,7 +55,7 @@ function it_does_not_support_other_classes(): void
function it_loads_user_by_username(
UserRepositoryInterface $userRepository,
CanonicalizerInterface $canonicalizer,
- UserInterface $user
+ UserInterface $user,
): void {
$canonicalizer->canonicalize('testUser')->willReturn('testuser');
@@ -67,7 +66,7 @@ function it_loads_user_by_username(
function it_throws_exception_when_there_is_no_user_with_given_username_or_email(
UserRepositoryInterface $userRepository,
- CanonicalizerInterface $canonicalizer
+ CanonicalizerInterface $canonicalizer,
): void {
$canonicalizer->canonicalize('testUser')->willReturn('testuser');
@@ -80,7 +79,7 @@ function it_throws_exception_when_there_is_no_user_with_given_username_or_email(
function it_loads_user_by_email(
UserRepositoryInterface $userRepository,
CanonicalizerInterface $canonicalizer,
- UserInterface $user
+ UserInterface $user,
): void {
$canonicalizer->canonicalize('test@user.com')->willReturn('test@user.com');
@@ -99,7 +98,7 @@ function it_refreshes_user(UserRepositoryInterface $userRepository, User $user,
}
function it_should_throw_exception_when_unsupported_user_is_used(
- CoreUserInterface $user
+ CoreUserInterface $user,
): void {
$this->shouldThrow(UnsupportedUserException::class)->during('refreshUser', [$user]);
}
diff --git a/src/Sylius/Bundle/UserBundle/spec/Provider/UsernameProviderSpec.php b/src/Sylius/Bundle/UserBundle/spec/Provider/UsernameProviderSpec.php
index f3935fc6c0c..4cf9b5cfbd8 100644
--- a/src/Sylius/Bundle/UserBundle/spec/Provider/UsernameProviderSpec.php
+++ b/src/Sylius/Bundle/UserBundle/spec/Provider/UsernameProviderSpec.php
@@ -47,7 +47,7 @@ function it_supports_sylius_user_model(): void
function it_loads_user_by_user_name(
UserRepositoryInterface $userRepository,
CanonicalizerInterface $canonicalizer,
- User $user
+ User $user,
): void {
$canonicalizer->canonicalize('testUser')->willReturn('testuser');
@@ -66,7 +66,7 @@ function it_updates_user_by_user_name(UserRepositoryInterface $userRepository, U
}
function it_should_throw_exception_when_unsupported_user_is_used(
- UserInterface $user
+ UserInterface $user,
): void {
$this->shouldThrow(UnsupportedUserException::class)->during('refreshUser', [$user]);
}
diff --git a/src/Sylius/Bundle/UserBundle/spec/Security/UserLoginSpec.php b/src/Sylius/Bundle/UserBundle/spec/Security/UserLoginSpec.php
index 6d6390ff3dc..497034f2461 100644
--- a/src/Sylius/Bundle/UserBundle/spec/Security/UserLoginSpec.php
+++ b/src/Sylius/Bundle/UserBundle/spec/Security/UserLoginSpec.php
@@ -43,7 +43,7 @@ function it_throws_exception_and_does_not_log_user_in_when_user_is_disabled(
TokenStorageInterface $tokenStorage,
UserCheckerInterface $userChecker,
EventDispatcherInterface $eventDispatcher,
- UserInterface $user
+ UserInterface $user,
): void {
$user->getRoles()->willReturn(['ROLE_TEST']);
$userChecker->checkPreAuth($user)->willThrow(DisabledException::class);
@@ -58,7 +58,7 @@ function it_throws_exception_and_does_not_log_user_in_when_user_account_status_i
TokenStorageInterface $tokenStorage,
UserCheckerInterface $userChecker,
EventDispatcherInterface $eventDispatcher,
- UserInterface $user
+ UserInterface $user,
): void {
$user->getRoles()->willReturn(['ROLE_TEST']);
$userChecker->checkPreAuth($user)->shouldBeCalled();
@@ -74,7 +74,7 @@ function it_throws_exception_and_does_not_log_user_in_when_user_has_no_roles(
TokenStorageInterface $tokenStorage,
UserCheckerInterface $userChecker,
EventDispatcherInterface $eventDispatcher,
- UserInterface $user
+ UserInterface $user,
): void {
$user->getRoles()->willReturn([]);
$userChecker->checkPreAuth($user)->shouldBeCalled();
@@ -90,7 +90,7 @@ function it_logs_user_in(
TokenStorageInterface $tokenStorage,
UserCheckerInterface $userChecker,
EventDispatcherInterface $eventDispatcher,
- UserInterface $user
+ UserInterface $user,
): void {
$user->getRoles()->willReturn(['ROLE_TEST']);
diff --git a/src/Sylius/Bundle/UserBundle/spec/Security/UserPasswordEncoderSpec.php b/src/Sylius/Bundle/UserBundle/spec/Security/UserPasswordEncoderSpec.php
index 4c1d825f309..950e0817bc7 100644
--- a/src/Sylius/Bundle/UserBundle/spec/Security/UserPasswordEncoderSpec.php
+++ b/src/Sylius/Bundle/UserBundle/spec/Security/UserPasswordEncoderSpec.php
@@ -34,7 +34,7 @@ function it_implements_password_updater_interface(): void
function it_encodes_password(
EncoderFactoryInterface $encoderFactory,
PasswordEncoderInterface $passwordEncoder,
- CredentialsHolderInterface $user
+ CredentialsHolderInterface $user,
): void {
$user->getPlainPassword()->willReturn('topSecretPlainPassword');
$user->getSalt()->willReturn('typicalSalt');
diff --git a/src/Sylius/Component/Addressing/Converter/CountryNameConverter.php b/src/Sylius/Component/Addressing/Converter/CountryNameConverter.php
index fcad0607592..62618fad47d 100644
--- a/src/Sylius/Component/Addressing/Converter/CountryNameConverter.php
+++ b/src/Sylius/Component/Addressing/Converter/CountryNameConverter.php
@@ -26,7 +26,7 @@ public function convertToCode(string $name, string $locale = 'en'): string
throw new \InvalidArgumentException(sprintf(
'Country "%s" not found! Available names: %s.',
$name,
- implode(', ', $names)
+ implode(', ', $names),
));
}
diff --git a/src/Sylius/Component/Addressing/Model/Address.php b/src/Sylius/Component/Addressing/Model/Address.php
index b7d753ca03e..89d46c54284 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 806fb0f41cd..6bbb88baefa 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 3052eca5c06..f66827dedb4 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 14044cf9ba1..9a5ddbc88ae 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 970f745fc10..c43c16c077c 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/Addressing/spec/Factory/ZoneFactorySpec.php b/src/Sylius/Component/Addressing/spec/Factory/ZoneFactorySpec.php
index e771b415426..7dfeedd8f2b 100644
--- a/src/Sylius/Component/Addressing/spec/Factory/ZoneFactorySpec.php
+++ b/src/Sylius/Component/Addressing/spec/Factory/ZoneFactorySpec.php
@@ -55,7 +55,7 @@ function it_creates_zone_with_members(
FactoryInterface $zoneMemberFactory,
ZoneInterface $zone,
ZoneMemberInterface $zoneMember1,
- ZoneMemberInterface $zoneMember2
+ ZoneMemberInterface $zoneMember2,
): void {
$factory->createNew()->willReturn($zone);
$zoneMemberFactory->createNew()->willReturn($zoneMember1, $zoneMember2);
diff --git a/src/Sylius/Component/Addressing/spec/Matcher/ZoneMatcherSpec.php b/src/Sylius/Component/Addressing/spec/Matcher/ZoneMatcherSpec.php
index 25e223b1038..9fb2dad1ce0 100644
--- a/src/Sylius/Component/Addressing/spec/Matcher/ZoneMatcherSpec.php
+++ b/src/Sylius/Component/Addressing/spec/Matcher/ZoneMatcherSpec.php
@@ -46,7 +46,7 @@ function it_should_match_address_by_province(
ProvinceInterface $province,
AddressInterface $address,
ZoneMemberInterface $memberProvince,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$province->getCode()->willReturn('DU');
$repository->findAll()->willReturn([$zone]);
@@ -65,7 +65,7 @@ function it_should_match_address_by_province_and_scope(
ProvinceInterface $province,
AddressInterface $address,
ZoneMemberInterface $memberProvince,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$repository->findBy(['scope' => ['shipping', 'all']])->shouldBeCalled()->willReturn([$zone]);
$province->getCode()->willReturn('TX');
@@ -83,7 +83,7 @@ function it_should_match_address_by_country(
CountryInterface $country,
AddressInterface $address,
ZoneMemberInterface $memberCountry,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$repository->findAll()->willReturn([$zone]);
$country->getCode()->willReturn('IE');
@@ -101,7 +101,7 @@ function it_should_match_address_by_country_and_scope(
CountryInterface $country,
AddressInterface $address,
ZoneMemberInterface $memberCountry,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$repository->findBy(['scope' => ['shipping', 'all']])->willReturn([$zone]);
$country->getCode()->willReturn('IE');
@@ -121,7 +121,7 @@ function it_should_match_address_for_nested_zones(
ZoneMemberInterface $memberCountry,
ZoneMemberInterface $memberZone,
ZoneInterface $subZone,
- ZoneInterface $rootZone
+ ZoneInterface $rootZone,
): void {
$country->getCode()->willReturn('IE');
@@ -149,7 +149,7 @@ function it_should_match_address_for_nested_zones_and_scope(
ZoneMemberInterface $memberCountry,
ZoneMemberInterface $memberZone,
ZoneInterface $subZone,
- ZoneInterface $rootZone
+ ZoneInterface $rootZone,
): void {
$country->getCode()->willReturn('IE');
$address->getCountryCode()->willReturn('IE');
@@ -179,7 +179,7 @@ function it_matches_address_from_province_when_many_are_found(
ZoneMemberInterface $memberCountry,
ZoneMemberInterface $memberProvince,
ZoneInterface $zoneCountry,
- ZoneInterface $zoneProvince
+ ZoneInterface $zoneProvince,
): void {
$province->getCode()->willReturn('DU');
$country->getCode()->willReturn('IE');
@@ -208,7 +208,7 @@ function it_matches_address_from_province_when_many_are_found_by_scope(
ZoneMemberInterface $memberCountry,
ZoneMemberInterface $memberProvince,
ZoneInterface $zoneCountry,
- ZoneInterface $zoneProvince
+ ZoneInterface $zoneProvince,
): void {
$address->getCountryCode()->willReturn('IE');
$memberCountry->getCode()->willReturn('IE');
@@ -237,7 +237,7 @@ function it_matches_all_zones_with_given_address(
ZoneMemberInterface $memberZone,
ZoneInterface $zoneProvince,
ZoneInterface $zoneCountry,
- ZoneInterface $zoneZone
+ ZoneInterface $zoneZone,
): void {
$repository->findAll()->willReturn([$zoneProvince, $zoneCountry, $zoneZone]);
@@ -270,7 +270,7 @@ function it_matches_all_zones_by_scope_when_one_zone_for_address_is_defined(
RepositoryInterface $repository,
AddressInterface $address,
ZoneMemberInterface $memberCountry,
- ZoneInterface $zoneCountry
+ ZoneInterface $zoneCountry,
): void {
$repository->findBy(['scope' => ['shipping', 'all']])->willReturn([$zoneCountry]);
diff --git a/src/Sylius/Component/Addressing/spec/Provider/ProvinceNamingProviderSpec.php b/src/Sylius/Component/Addressing/spec/Provider/ProvinceNamingProviderSpec.php
index 1eadbd1df6d..0cbed940b89 100644
--- a/src/Sylius/Component/Addressing/spec/Provider/ProvinceNamingProviderSpec.php
+++ b/src/Sylius/Component/Addressing/spec/Provider/ProvinceNamingProviderSpec.php
@@ -39,7 +39,7 @@ function it_implements_province_name_provider_interface(): void
function it_throws_invalid_argument_exception_when_province_with_given_code_is_not_found(
RepositoryInterface $provinceRepository,
- AddressInterface $address
+ AddressInterface $address,
): void {
$address->getProvinceName()->willReturn(null);
$address->getProvinceCode()->willReturn('ZZ-TOP');
@@ -52,7 +52,7 @@ function it_throws_invalid_argument_exception_when_province_with_given_code_is_n
function it_gets_province_name_if_province_with_given_code_exist_in_database(
RepositoryInterface $provinceRepository,
ProvinceInterface $province,
- AddressInterface $address
+ AddressInterface $address,
): void {
$address->getProvinceCode()->willReturn('IE-UL');
$address->getProvinceName()->willReturn(null);
@@ -81,7 +81,7 @@ function it_returns_nothing_if_province_name_and_code_are_not_given_in_an_addres
function it_gets_province_abbreviation_by_its_code_if_province_exists_in_database(
RepositoryInterface $provinceRepository,
ProvinceInterface $province,
- AddressInterface $address
+ AddressInterface $address,
): void {
$address->getProvinceName()->willReturn(null);
$address->getProvinceCode()->willReturn('IE-UL');
@@ -94,7 +94,7 @@ function it_gets_province_abbreviation_by_its_code_if_province_exists_in_databas
function it_gets_province_name_if_its_abbreviation_is_not_set_but_province_exists_in_database(
RepositoryInterface $provinceRepository,
ProvinceInterface $province,
- AddressInterface $address
+ AddressInterface $address,
): void {
$address->getProvinceName()->willReturn(null);
$address->getProvinceCode()->willReturn('IE-UL');
diff --git a/src/Sylius/Component/Attribute/AttributeType/AttributeTypeInterface.php b/src/Sylius/Component/Attribute/AttributeType/AttributeTypeInterface.php
index 6f207e9a69b..51f7c9d6d69 100644
--- a/src/Sylius/Component/Attribute/AttributeType/AttributeTypeInterface.php
+++ b/src/Sylius/Component/Attribute/AttributeType/AttributeTypeInterface.php
@@ -25,6 +25,6 @@ public function getType(): string;
public function validate(
AttributeValueInterface $attributeValue,
ExecutionContextInterface $context,
- array $configuration
+ array $configuration,
): void;
}
diff --git a/src/Sylius/Component/Attribute/AttributeType/CheckboxAttributeType.php b/src/Sylius/Component/Attribute/AttributeType/CheckboxAttributeType.php
index f5d32ac845f..6059af84269 100644
--- a/src/Sylius/Component/Attribute/AttributeType/CheckboxAttributeType.php
+++ b/src/Sylius/Component/Attribute/AttributeType/CheckboxAttributeType.php
@@ -33,7 +33,7 @@ public function getType(): string
public function validate(
AttributeValueInterface $attributeValue,
ExecutionContextInterface $context,
- array $configuration
+ array $configuration,
): void {
}
}
diff --git a/src/Sylius/Component/Attribute/AttributeType/DateAttributeType.php b/src/Sylius/Component/Attribute/AttributeType/DateAttributeType.php
index ce3b3693a13..b589daae0be 100644
--- a/src/Sylius/Component/Attribute/AttributeType/DateAttributeType.php
+++ b/src/Sylius/Component/Attribute/AttributeType/DateAttributeType.php
@@ -33,7 +33,7 @@ public function getType(): string
public function validate(
AttributeValueInterface $attributeValue,
ExecutionContextInterface $context,
- array $configuration
+ array $configuration,
): void {
}
}
diff --git a/src/Sylius/Component/Attribute/AttributeType/DatetimeAttributeType.php b/src/Sylius/Component/Attribute/AttributeType/DatetimeAttributeType.php
index 166adc8bc16..bdb006ef071 100644
--- a/src/Sylius/Component/Attribute/AttributeType/DatetimeAttributeType.php
+++ b/src/Sylius/Component/Attribute/AttributeType/DatetimeAttributeType.php
@@ -33,7 +33,7 @@ public function getType(): string
public function validate(
AttributeValueInterface $attributeValue,
ExecutionContextInterface $context,
- array $configuration
+ array $configuration,
): void {
}
}
diff --git a/src/Sylius/Component/Attribute/AttributeType/IntegerAttributeType.php b/src/Sylius/Component/Attribute/AttributeType/IntegerAttributeType.php
index add72e2787c..b6965234653 100644
--- a/src/Sylius/Component/Attribute/AttributeType/IntegerAttributeType.php
+++ b/src/Sylius/Component/Attribute/AttributeType/IntegerAttributeType.php
@@ -35,7 +35,7 @@ public function getType(): string
public function validate(
AttributeValueInterface $attributeValue,
ExecutionContextInterface $context,
- array $configuration
+ array $configuration,
): void {
if (!isset($configuration['required'])) {
return;
diff --git a/src/Sylius/Component/Attribute/AttributeType/PercentAttributeType.php b/src/Sylius/Component/Attribute/AttributeType/PercentAttributeType.php
index 9fa3bf57c0c..f9b9cf15dd4 100644
--- a/src/Sylius/Component/Attribute/AttributeType/PercentAttributeType.php
+++ b/src/Sylius/Component/Attribute/AttributeType/PercentAttributeType.php
@@ -35,7 +35,7 @@ public function getType(): string
public function validate(
AttributeValueInterface $attributeValue,
ExecutionContextInterface $context,
- array $configuration
+ array $configuration,
): void {
if (!isset($configuration['required'])) {
return;
diff --git a/src/Sylius/Component/Attribute/AttributeType/SelectAttributeType.php b/src/Sylius/Component/Attribute/AttributeType/SelectAttributeType.php
index 82995138744..b466e155c4a 100644
--- a/src/Sylius/Component/Attribute/AttributeType/SelectAttributeType.php
+++ b/src/Sylius/Component/Attribute/AttributeType/SelectAttributeType.php
@@ -38,7 +38,7 @@ public function getType(): string
public function validate(
AttributeValueInterface $attributeValue,
ExecutionContextInterface $context,
- array $configuration
+ array $configuration,
): void {
if (!isset($configuration['required']) && !isset($configuration['multiple'])) {
return;
@@ -58,7 +58,7 @@ public function validate(
private function getValidationErrors(
ExecutionContextInterface $context,
?array $value,
- array $validationConfiguration
+ array $validationConfiguration,
): ConstraintViolationListInterface {
$validator = $context->getValidator();
diff --git a/src/Sylius/Component/Attribute/AttributeType/TextAttributeType.php b/src/Sylius/Component/Attribute/AttributeType/TextAttributeType.php
index 666369905d9..3eea33e78b8 100644
--- a/src/Sylius/Component/Attribute/AttributeType/TextAttributeType.php
+++ b/src/Sylius/Component/Attribute/AttributeType/TextAttributeType.php
@@ -36,7 +36,7 @@ public function getType(): string
public function validate(
AttributeValueInterface $attributeValue,
ExecutionContextInterface $context,
- array $configuration
+ array $configuration,
): void {
if (!isset($configuration['required']) && (!isset($configuration['min']) || !isset($configuration['max']))) {
return;
@@ -56,7 +56,7 @@ public function validate(
private function getValidationErrors(
ExecutionContextInterface $context,
?string $value,
- array $validationConfiguration
+ array $validationConfiguration,
): ConstraintViolationListInterface {
$validator = $context->getValidator();
$constraints = [];
@@ -70,13 +70,13 @@ private function getValidationErrors(
[
'min' => $validationConfiguration['min'],
'max' => $validationConfiguration['max'],
- ]
+ ],
);
}
return $validator->validate(
$value,
- $constraints
+ $constraints,
);
}
}
diff --git a/src/Sylius/Component/Attribute/AttributeType/TextareaAttributeType.php b/src/Sylius/Component/Attribute/AttributeType/TextareaAttributeType.php
index a9b1d2206f5..851f1575df7 100644
--- a/src/Sylius/Component/Attribute/AttributeType/TextareaAttributeType.php
+++ b/src/Sylius/Component/Attribute/AttributeType/TextareaAttributeType.php
@@ -35,7 +35,7 @@ public function getType(): string
public function validate(
AttributeValueInterface $attributeValue,
ExecutionContextInterface $context,
- array $configuration
+ array $configuration,
): void {
if (!isset($configuration['required'])) {
return;
@@ -54,7 +54,7 @@ public function validate(
private function getValidationErrors(
ExecutionContextInterface $context,
- ?string $value
+ ?string $value,
): ConstraintViolationListInterface {
$validator = $context->getValidator();
@@ -62,7 +62,7 @@ private function getValidationErrors(
$value,
[
new NotBlank([]),
- ]
+ ],
);
}
}
diff --git a/src/Sylius/Component/Attribute/Model/Attribute.php b/src/Sylius/Component/Attribute/Model/Attribute.php
index 245044b78aa..b6b9a34e66d 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/AttributeSubjectInterface.php b/src/Sylius/Component/Attribute/Model/AttributeSubjectInterface.php
index 5cafac67a51..bd8e6c53ae9 100644
--- a/src/Sylius/Component/Attribute/Model/AttributeSubjectInterface.php
+++ b/src/Sylius/Component/Attribute/Model/AttributeSubjectInterface.php
@@ -32,7 +32,7 @@ public function getAttributes(): Collection;
public function getAttributesByLocale(
string $localeCode,
string $fallbackLocaleCode,
- ?string $baseLocaleCode = null
+ ?string $baseLocaleCode = null,
): Collection;
public function addAttribute(AttributeValueInterface $attribute): void;
diff --git a/src/Sylius/Component/Attribute/Model/AttributeTranslation.php b/src/Sylius/Component/Attribute/Model/AttributeTranslation.php
index 28c7e41a3ac..ec56a8f785a 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 dece87daac0..5928356a27f 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/Attribute/spec/AttributeType/IntegerAttributeTypeSpec.php b/src/Sylius/Component/Attribute/spec/AttributeType/IntegerAttributeTypeSpec.php
index b6bdc5682f2..a8ba6567f2b 100644
--- a/src/Sylius/Component/Attribute/spec/AttributeType/IntegerAttributeTypeSpec.php
+++ b/src/Sylius/Component/Attribute/spec/AttributeType/IntegerAttributeTypeSpec.php
@@ -55,7 +55,7 @@ function it_checks_if_attribute_value_is_valid(
ConstraintViolationInterface $constraintViolation,
ConstraintViolationListInterface $constraintViolationList,
ExecutionContextInterface $context,
- ValidatorInterface $validator
+ ValidatorInterface $validator,
): void {
$attributeValue->getAttribute()->willReturn($attribute);
diff --git a/src/Sylius/Component/Attribute/spec/AttributeType/PercentAttributeTypeSpec.php b/src/Sylius/Component/Attribute/spec/AttributeType/PercentAttributeTypeSpec.php
index 0ba696765cc..6dea96ccfd7 100644
--- a/src/Sylius/Component/Attribute/spec/AttributeType/PercentAttributeTypeSpec.php
+++ b/src/Sylius/Component/Attribute/spec/AttributeType/PercentAttributeTypeSpec.php
@@ -55,7 +55,7 @@ function it_checks_if_attribute_value_is_valid(
ConstraintViolationInterface $constraintViolation,
ConstraintViolationListInterface $constraintViolationList,
ExecutionContextInterface $context,
- ValidatorInterface $validator
+ ValidatorInterface $validator,
): void {
$attributeValue->getAttribute()->willReturn($attribute);
diff --git a/src/Sylius/Component/Attribute/spec/AttributeType/SelectAttributeTypeSpec.php b/src/Sylius/Component/Attribute/spec/AttributeType/SelectAttributeTypeSpec.php
index e4d63865fd0..3ebee398879 100644
--- a/src/Sylius/Component/Attribute/spec/AttributeType/SelectAttributeTypeSpec.php
+++ b/src/Sylius/Component/Attribute/spec/AttributeType/SelectAttributeTypeSpec.php
@@ -55,7 +55,7 @@ function it_checks_if_attribute_value_is_valid(
ConstraintViolationInterface $constraintViolation,
ConstraintViolationListInterface $constraintViolationList,
ExecutionContextInterface $context,
- ValidatorInterface $validator
+ ValidatorInterface $validator,
): void {
$attributeValue->getAttribute()->willReturn($attribute);
diff --git a/src/Sylius/Component/Attribute/spec/AttributeType/TextAttributeTypeSpec.php b/src/Sylius/Component/Attribute/spec/AttributeType/TextAttributeTypeSpec.php
index 4c3fddc8992..00f51e6ec90 100644
--- a/src/Sylius/Component/Attribute/spec/AttributeType/TextAttributeTypeSpec.php
+++ b/src/Sylius/Component/Attribute/spec/AttributeType/TextAttributeTypeSpec.php
@@ -56,7 +56,7 @@ function it_checks_if_attribute_value_is_valid_according_to_min_and_max_constrai
ConstraintViolationInterface $constraintViolation,
ConstraintViolationListInterface $constraintViolationList,
ExecutionContextInterface $context,
- ValidatorInterface $validator
+ ValidatorInterface $validator,
): void {
$attributeValue->getAttribute()->willReturn($attribute);
@@ -86,7 +86,7 @@ function it_checks_if_attribute_value_is_valid_according_to_required_constraint(
ConstraintViolationInterface $constraintViolation,
ConstraintViolationListInterface $constraintViolationList,
ExecutionContextInterface $context,
- ValidatorInterface $validator
+ ValidatorInterface $validator,
) {
$attributeValue->getAttribute()->willReturn($attribute);
diff --git a/src/Sylius/Component/Attribute/spec/AttributeType/TextareaAttributeTypeSpec.php b/src/Sylius/Component/Attribute/spec/AttributeType/TextareaAttributeTypeSpec.php
index 77a90c3bda0..8cef340bb3f 100644
--- a/src/Sylius/Component/Attribute/spec/AttributeType/TextareaAttributeTypeSpec.php
+++ b/src/Sylius/Component/Attribute/spec/AttributeType/TextareaAttributeTypeSpec.php
@@ -55,7 +55,7 @@ function it_checks_if_attribute_value_is_valid(
ConstraintViolationInterface $constraintViolation,
ConstraintViolationListInterface $constraintViolationList,
ExecutionContextInterface $context,
- ValidatorInterface $validator
+ ValidatorInterface $validator,
): void {
$attributeValue->getAttribute()->willReturn($attribute);
diff --git a/src/Sylius/Component/Attribute/spec/Factory/AttributeFactorySpec.php b/src/Sylius/Component/Attribute/spec/Factory/AttributeFactorySpec.php
index ba785fe6e7b..b2739c5f7f8 100644
--- a/src/Sylius/Component/Attribute/spec/Factory/AttributeFactorySpec.php
+++ b/src/Sylius/Component/Attribute/spec/Factory/AttributeFactorySpec.php
@@ -40,7 +40,7 @@ function it_implements_attribute_factory_interface(): void
function it_creates_untyped_attribute(
FactoryInterface $factory,
- Attribute $untypedAttribute
+ Attribute $untypedAttribute,
): void {
$factory->createNew()->willReturn($untypedAttribute);
@@ -51,7 +51,7 @@ function it_creates_typed_attribute(
Attribute $typedAttribute,
AttributeTypeInterface $attributeType,
FactoryInterface $factory,
- ServiceRegistryInterface $attributeTypesRegistry
+ ServiceRegistryInterface $attributeTypesRegistry,
): void {
$factory->createNew()->willReturn($typedAttribute);
diff --git a/src/Sylius/Component/Channel/Context/CachedPerRequestChannelContext.php b/src/Sylius/Component/Channel/Context/CachedPerRequestChannelContext.php
index 636dbfe3e6c..7dde11a56d2 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 08f2f75ce0c..bd8d4c82973 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/Channel/spec/Context/CachedPerRequestChannelContextSpec.php b/src/Sylius/Component/Channel/spec/Context/CachedPerRequestChannelContextSpec.php
index 6d66236caa5..7bcd6a8ca54 100644
--- a/src/Sylius/Component/Channel/spec/Context/CachedPerRequestChannelContextSpec.php
+++ b/src/Sylius/Component/Channel/spec/Context/CachedPerRequestChannelContextSpec.php
@@ -36,7 +36,7 @@ function it_caches_channels_for_the_same_request(
ChannelContextInterface $decoratedChannelContext,
RequestStack $requestStack,
Request $request,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$requestStack->getMasterRequest()->willReturn($request, $request);
@@ -52,7 +52,7 @@ function it_does_not_cache_channels_for_different_requests(
Request $firstRequest,
Request $secondRequest,
ChannelInterface $firstChannel,
- ChannelInterface $secondChannel
+ ChannelInterface $secondChannel,
): void {
$requestStack->getMasterRequest()->willReturn($firstRequest, $secondRequest);
@@ -68,7 +68,7 @@ function it_caches_channels_for_the_same_request_even_if_there_are_other_request
Request $firstRequest,
Request $secondRequest,
ChannelInterface $firstChannel,
- ChannelInterface $secondChannel
+ ChannelInterface $secondChannel,
): void {
$requestStack->getMasterRequest()->willReturn($firstRequest, $secondRequest, $firstRequest);
@@ -83,7 +83,7 @@ function it_does_not_cache_results_while_there_are_no_master_requests(
ChannelContextInterface $decoratedChannelContext,
RequestStack $requestStack,
ChannelInterface $firstChannel,
- ChannelInterface $secondChannel
+ ChannelInterface $secondChannel,
): void {
$requestStack->getMasterRequest()->willReturn(null, null);
@@ -96,7 +96,7 @@ function it_does_not_cache_results_while_there_are_no_master_requests(
function it_caches_channel_not_found_exceptions_for_the_same_request(
ChannelContextInterface $decoratedChannelContext,
RequestStack $requestStack,
- Request $request
+ Request $request,
): void {
$requestStack->getMasterRequest()->willReturn($request, $request);
@@ -109,7 +109,7 @@ function it_caches_channel_not_found_exceptions_for_the_same_request(
function it_does_not_cache_channel_not_found_exceptions_for_null_master_requests(
ChannelContextInterface $decoratedChannelContext,
RequestStack $requestStack,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$requestStack->getMasterRequest()->willReturn(null, null);
diff --git a/src/Sylius/Component/Channel/spec/Context/CompositeChannelContextSpec.php b/src/Sylius/Component/Channel/spec/Context/CompositeChannelContextSpec.php
index 8b8ef3bd085..45f3dfbb68a 100644
--- a/src/Sylius/Component/Channel/spec/Context/CompositeChannelContextSpec.php
+++ b/src/Sylius/Component/Channel/spec/Context/CompositeChannelContextSpec.php
@@ -31,7 +31,7 @@ function it_throws_a_channel_not_found_exception_if_there_are_no_nested_channel_
}
function it_throws_a_channel_not_found_exception_if_none_of_nested_channel_contexts_returned_a_channel(
- ChannelContextInterface $channelContext
+ ChannelContextInterface $channelContext,
): void {
$channelContext->getChannel()->willThrow(ChannelNotFoundException::class);
@@ -44,7 +44,7 @@ function it_returns_first_result_returned_by_nested_request_resolvers(
ChannelContextInterface $firstChannelContext,
ChannelContextInterface $secondChannelContext,
ChannelContextInterface $thirdChannelContext,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$firstChannelContext->getChannel()->willThrow(ChannelNotFoundException::class);
$secondChannelContext->getChannel()->willReturn($channel);
@@ -61,7 +61,7 @@ function its_nested_request_resolvers_can_have_priority(
ChannelContextInterface $firstChannelContext,
ChannelContextInterface $secondChannelContext,
ChannelContextInterface $thirdChannelContext,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$firstChannelContext->getChannel()->shouldNotBeCalled();
$secondChannelContext->getChannel()->willReturn($channel);
diff --git a/src/Sylius/Component/Channel/spec/Context/RequestBased/ChannelContextSpec.php b/src/Sylius/Component/Channel/spec/Context/RequestBased/ChannelContextSpec.php
index f8b254b5c1d..e88fb3969e1 100644
--- a/src/Sylius/Component/Channel/spec/Context/RequestBased/ChannelContextSpec.php
+++ b/src/Sylius/Component/Channel/spec/Context/RequestBased/ChannelContextSpec.php
@@ -37,7 +37,7 @@ function it_proxies_master_request_to_request_resolver(
RequestResolverInterface $requestResolver,
RequestStack $requestStack,
Request $masterRequest,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$requestStack->getMasterRequest()->willReturn($masterRequest);
@@ -49,7 +49,7 @@ function it_proxies_master_request_to_request_resolver(
function it_throws_a_channel_not_found_exception_if_request_resolver_returns_null(
RequestResolverInterface $requestResolver,
RequestStack $requestStack,
- Request $masterRequest
+ Request $masterRequest,
): void {
$requestStack->getMasterRequest()->willReturn($masterRequest);
@@ -59,7 +59,7 @@ function it_throws_a_channel_not_found_exception_if_request_resolver_returns_nul
}
function it_throws_a_channel_not_found_exception_if_there_is_no_master_request(
- RequestStack $requestStack
+ RequestStack $requestStack,
): void {
$requestStack->getMasterRequest()->willReturn(null);
diff --git a/src/Sylius/Component/Channel/spec/Context/RequestBased/CompositeRequestResolverSpec.php b/src/Sylius/Component/Channel/spec/Context/RequestBased/CompositeRequestResolverSpec.php
index 3d70220bff3..df97e9bcddd 100644
--- a/src/Sylius/Component/Channel/spec/Context/RequestBased/CompositeRequestResolverSpec.php
+++ b/src/Sylius/Component/Channel/spec/Context/RequestBased/CompositeRequestResolverSpec.php
@@ -32,7 +32,7 @@ function it_returns_null_if_there_are_no_nested_request_resolvers_added(Request
function it_returns_null_if_none_of_nested_request_resolvers_returned_channel(
Request $request,
- RequestResolverInterface $requestResolver
+ RequestResolverInterface $requestResolver,
): void {
$requestResolver->findChannel($request)->willReturn(null);
@@ -46,7 +46,7 @@ function it_returns_first_result_returned_by_nested_request_resolvers(
RequestResolverInterface $firstRequestResolver,
RequestResolverInterface $secondRequestResolver,
RequestResolverInterface $thirdRequestResolver,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$firstRequestResolver->findChannel($request)->willReturn(null);
$secondRequestResolver->findChannel($request)->willReturn($channel);
@@ -64,7 +64,7 @@ function its_nested_request_resolvers_can_have_priority(
RequestResolverInterface $firstRequestResolver,
RequestResolverInterface $secondRequestResolver,
RequestResolverInterface $thirdRequestResolver,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$firstRequestResolver->findChannel($request)->shouldNotBeCalled();
$secondRequestResolver->findChannel($request)->willReturn($channel);
diff --git a/src/Sylius/Component/Channel/spec/Context/RequestBased/HostnameBasedRequestResolverSpec.php b/src/Sylius/Component/Channel/spec/Context/RequestBased/HostnameBasedRequestResolverSpec.php
index 26e1528ba31..416eb3f2b1b 100644
--- a/src/Sylius/Component/Channel/spec/Context/RequestBased/HostnameBasedRequestResolverSpec.php
+++ b/src/Sylius/Component/Channel/spec/Context/RequestBased/HostnameBasedRequestResolverSpec.php
@@ -34,7 +34,7 @@ function it_implements_request_resolver_interface(): void
function it_finds_the_channel_by_request_hostname(
ChannelRepositoryInterface $channelRepository,
Request $request,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$request->getHost()->willReturn('example.org');
@@ -45,7 +45,7 @@ function it_finds_the_channel_by_request_hostname(
function it_returns_null_if_channel_was_not_found(
ChannelRepositoryInterface $channelRepository,
- Request $request
+ Request $request,
): void {
$request->getHost()->willReturn('example.org');
diff --git a/src/Sylius/Component/Channel/spec/Context/SingleChannelContextSpec.php b/src/Sylius/Component/Channel/spec/Context/SingleChannelContextSpec.php
index f4384e84ab0..7a331f8669d 100644
--- a/src/Sylius/Component/Channel/spec/Context/SingleChannelContextSpec.php
+++ b/src/Sylius/Component/Channel/spec/Context/SingleChannelContextSpec.php
@@ -33,7 +33,7 @@ function it_implements_channel_context_interface(): void
function it_returns_a_channel_if_it_is_the_only_one_defined(
ChannelRepositoryInterface $channelRepository,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$channelRepository->findAll()->willReturn([$channel]);
@@ -41,7 +41,7 @@ function it_returns_a_channel_if_it_is_the_only_one_defined(
}
function it_throws_a_channel_not_found_exception_if_there_are_no_channels_defined(
- ChannelRepositoryInterface $channelRepository
+ ChannelRepositoryInterface $channelRepository,
): void {
$channelRepository->findAll()->willReturn([]);
@@ -51,7 +51,7 @@ function it_throws_a_channel_not_found_exception_if_there_are_no_channels_define
function it_throws_a_channel_not_found_exception_if_there_are_many_channels_defined(
ChannelRepositoryInterface $channelRepository,
ChannelInterface $firstChannel,
- ChannelInterface $secondChannel
+ ChannelInterface $secondChannel,
): void {
$channelRepository->findAll()->willReturn([$firstChannel, $secondChannel]);
diff --git a/src/Sylius/Component/Core/Cart/Context/ShopBasedCartContext.php b/src/Sylius/Component/Core/Cart/Context/ShopBasedCartContext.php
index 4f51d3afa04..055d39e16d0 100644
--- a/src/Sylius/Component/Core/Cart/Context/ShopBasedCartContext.php
+++ b/src/Sylius/Component/Core/Cart/Context/ShopBasedCartContext.php
@@ -39,7 +39,7 @@ final class ShopBasedCartContext implements CartContextInterface
public function __construct(
CartContextInterface $cartContext,
ShopperContextInterface $shopperContext,
- ?CreatedByGuestFlagResolverInterface $createdByGuestFlagResolver = null
+ ?CreatedByGuestFlagResolverInterface $createdByGuestFlagResolver = null,
) {
$this->cartContext = $cartContext;
$this->shopperContext = $shopperContext;
diff --git a/src/Sylius/Component/Core/Context/ShopperContext.php b/src/Sylius/Component/Core/Context/ShopperContext.php
index 724203651d5..81aaa797a47 100644
--- a/src/Sylius/Component/Core/Context/ShopperContext.php
+++ b/src/Sylius/Component/Core/Context/ShopperContext.php
@@ -37,7 +37,7 @@ public function __construct(
ChannelContextInterface $channelContext,
CurrencyContextInterface $currencyContext,
LocaleContextInterface $localeContext,
- CustomerContextInterface $customerContext
+ CustomerContextInterface $customerContext,
) {
$this->channelContext = $channelContext;
$this->currencyContext = $currencyContext;
diff --git a/src/Sylius/Component/Core/Currency/Context/ChannelAwareCurrencyContext.php b/src/Sylius/Component/Core/Currency/Context/ChannelAwareCurrencyContext.php
index 1abcf7baaf2..325485bc299 100644
--- a/src/Sylius/Component/Core/Currency/Context/ChannelAwareCurrencyContext.php
+++ b/src/Sylius/Component/Core/Currency/Context/ChannelAwareCurrencyContext.php
@@ -55,7 +55,7 @@ private function isAvailableCurrency(string $currencyCode, ChannelInterface $cha
function (CurrencyInterface $currency) {
return $currency->getCode();
},
- $channel->getCurrencies()->toArray()
+ $channel->getCurrencies()->toArray(),
);
return in_array($currencyCode, $availableCurrencies, true);
diff --git a/src/Sylius/Component/Core/Currency/CurrencyStorage.php b/src/Sylius/Component/Core/Currency/CurrencyStorage.php
index 5356c1adeea..3cb96d1e056 100644
--- a/src/Sylius/Component/Core/Currency/CurrencyStorage.php
+++ b/src/Sylius/Component/Core/Currency/CurrencyStorage.php
@@ -58,7 +58,7 @@ private function isAvailableCurrency(string $currencyCode, ChannelInterface $cha
function (CurrencyInterface $currency) {
return $currency->getCode();
},
- $channel->getCurrencies()->toArray()
+ $channel->getCurrencies()->toArray(),
);
return in_array($currencyCode, $availableCurrencies, true);
diff --git a/src/Sylius/Component/Core/Customer/Statistics/CustomerStatisticsProvider.php b/src/Sylius/Component/Core/Customer/Statistics/CustomerStatisticsProvider.php
index 36db05b89fe..32418f337d3 100644
--- a/src/Sylius/Component/Core/Customer/Statistics/CustomerStatisticsProvider.php
+++ b/src/Sylius/Component/Core/Customer/Statistics/CustomerStatisticsProvider.php
@@ -50,7 +50,7 @@ public function getCustomerStatistics(CustomerInterface $customer): CustomerStat
$perChannelCustomerStatisticsArray[] = new PerChannelCustomerStatistics(
count($channelOrders),
$this->getOrdersSummedTotal($channelOrders),
- $channel
+ $channel,
);
}
@@ -65,7 +65,7 @@ private function getOrdersSummedTotal(array $orders): int
return array_sum(
array_map(function (OrderInterface $order) {
return $order->getTotal();
- }, $orders)
+ }, $orders),
);
}
diff --git a/src/Sylius/Component/Core/Dashboard/DashboardStatisticsProvider.php b/src/Sylius/Component/Core/Dashboard/DashboardStatisticsProvider.php
index e10e0e13d9f..43a14099b9c 100644
--- a/src/Sylius/Component/Core/Dashboard/DashboardStatisticsProvider.php
+++ b/src/Sylius/Component/Core/Dashboard/DashboardStatisticsProvider.php
@@ -25,7 +25,7 @@ class DashboardStatisticsProvider implements DashboardStatisticsProviderInterfac
public function __construct(
OrderRepositoryInterface $orderRepository,
- CustomerRepositoryInterface $customerRepository
+ CustomerRepositoryInterface $customerRepository,
) {
$this->orderRepository = $orderRepository;
$this->customerRepository = $customerRepository;
@@ -37,19 +37,19 @@ public function getStatisticsForChannel(ChannelInterface $channel): DashboardSta
$this->orderRepository->getTotalPaidSalesForChannel($channel),
$this->orderRepository->countPaidByChannel($channel),
$this->customerRepository->countCustomers(),
- $channel
+ $channel,
);
}
public function getStatisticsForChannelInPeriod(
ChannelInterface $channel,
\DateTimeInterface $startDate,
- \DateTimeInterface $endDate
+ \DateTimeInterface $endDate,
): DashboardStatistics {
return new DashboardStatistics(
$this->orderRepository->getTotalPaidSalesForChannelInPeriod($channel, $startDate, $endDate),
$this->orderRepository->countPaidForChannelInPeriod($channel, $startDate, $endDate),
- $this->customerRepository->countCustomersInPeriod($startDate, $endDate)
+ $this->customerRepository->countCustomersInPeriod($startDate, $endDate),
);
}
}
diff --git a/src/Sylius/Component/Core/Dashboard/DashboardStatisticsProviderInterface.php b/src/Sylius/Component/Core/Dashboard/DashboardStatisticsProviderInterface.php
index 980391ef45c..7513fa1ab29 100644
--- a/src/Sylius/Component/Core/Dashboard/DashboardStatisticsProviderInterface.php
+++ b/src/Sylius/Component/Core/Dashboard/DashboardStatisticsProviderInterface.php
@@ -22,6 +22,6 @@ public function getStatisticsForChannel(ChannelInterface $channel): DashboardSta
public function getStatisticsForChannelInPeriod(
ChannelInterface $channel,
\DateTimeInterface $startDate,
- \DateTimeInterface $endDate
+ \DateTimeInterface $endDate,
): DashboardStatistics;
}
diff --git a/src/Sylius/Component/Core/Dashboard/SalesDataProvider.php b/src/Sylius/Component/Core/Dashboard/SalesDataProvider.php
index 8f1d12dba02..dc7b4242f79 100644
--- a/src/Sylius/Component/Core/Dashboard/SalesDataProvider.php
+++ b/src/Sylius/Component/Core/Dashboard/SalesDataProvider.php
@@ -33,7 +33,7 @@ public function getSalesSummary(
ChannelInterface $channel,
\DateTimeInterface $startDate,
\DateTimeInterface $endDate,
- Interval $interval
+ Interval $interval,
): SalesSummaryInterface {
$queryBuilder = $this->orderRepository->createQueryBuilder('o')
->select('SUM(o.total) AS total')
@@ -70,7 +70,7 @@ public function getSalesSummary(
'YEAR(o.checkoutCompletedAt) = :startYear AND YEAR(o.checkoutCompletedAt) = :endYear AND MONTH(o.checkoutCompletedAt) >= :startMonth AND MONTH(o.checkoutCompletedAt) <= :endMonth',
'YEAR(o.checkoutCompletedAt) = :startYear AND YEAR(o.checkoutCompletedAt) != :endYear AND MONTH(o.checkoutCompletedAt) >= :startMonth',
'YEAR(o.checkoutCompletedAt) = :endYear AND YEAR(o.checkoutCompletedAt) != :startYear AND MONTH(o.checkoutCompletedAt) <= :endMonth',
- 'YEAR(o.checkoutCompletedAt) > :startYear AND YEAR(o.checkoutCompletedAt) < :endYear'
+ 'YEAR(o.checkoutCompletedAt) > :startYear AND YEAR(o.checkoutCompletedAt) < :endYear',
))
->setParameter('startYear', $startDate->format('Y'))
->setParameter('startMonth', $startDate->format('n'))
@@ -95,7 +95,7 @@ public function getSalesSummary(
'YEAR(o.checkoutCompletedAt) = :startYear AND YEAR(o.checkoutCompletedAt) = :endYear AND WEEK(o.checkoutCompletedAt) >= :startWeek AND WEEK(o.checkoutCompletedAt) <= :endWeek',
'YEAR(o.checkoutCompletedAt) = :startYear AND YEAR(o.checkoutCompletedAt) != :endYear AND WEEK(o.checkoutCompletedAt) >= :startWeek',
'YEAR(o.checkoutCompletedAt) = :endYear AND YEAR(o.checkoutCompletedAt) != :startYear AND WEEK(o.checkoutCompletedAt) <= :endWeek',
- 'YEAR(o.checkoutCompletedAt) > :startYear AND YEAR(o.checkoutCompletedAt) < :endYear'
+ 'YEAR(o.checkoutCompletedAt) > :startYear AND YEAR(o.checkoutCompletedAt) < :endYear',
))
->setParameter('startYear', $startDate->format('Y'))
->setParameter('startWeek', (ltrim($startDate->format('W'), '0') ?: '0'))
@@ -127,7 +127,7 @@ public function getSalesSummary(
'YEAR(o.checkoutCompletedAt) = :startYear AND YEAR(o.checkoutCompletedAt) != :endYear AND MONTH(o.checkoutCompletedAt) > :startMonth',
'YEAR(o.checkoutCompletedAt) = :endYear AND YEAR(o.checkoutCompletedAt) != :startYear AND MONTH(o.checkoutCompletedAt) = :endMonth AND DAY(o.checkoutCompletedAt) <= :endDay',
'YEAR(o.checkoutCompletedAt) = :endYear AND YEAR(o.checkoutCompletedAt) != :startYear AND MONTH(o.checkoutCompletedAt) < :endMonth',
- 'YEAR(o.checkoutCompletedAt) > :startYear AND YEAR(o.checkoutCompletedAt) < :endYear'
+ 'YEAR(o.checkoutCompletedAt) > :startYear AND YEAR(o.checkoutCompletedAt) < :endYear',
))
->setParameter('startYear', $startDate->format('Y'))
->setParameter('startMonth', $startDate->format('n'))
@@ -165,7 +165,7 @@ public function getSalesSummary(
static function (int $total): string {
return number_format(abs($total / 100), 2, '.', '');
},
- $salesData
+ $salesData,
);
return new SalesSummary($salesData);
diff --git a/src/Sylius/Component/Core/Dashboard/SalesDataProviderInterface.php b/src/Sylius/Component/Core/Dashboard/SalesDataProviderInterface.php
index df0afcf41af..4e5c4cfcc2e 100644
--- a/src/Sylius/Component/Core/Dashboard/SalesDataProviderInterface.php
+++ b/src/Sylius/Component/Core/Dashboard/SalesDataProviderInterface.php
@@ -21,6 +21,6 @@ public function getSalesSummary(
ChannelInterface $channel,
\DateTimeInterface $startDate,
\DateTimeInterface $endDate,
- Interval $interval
+ Interval $interval,
): SalesSummaryInterface;
}
diff --git a/src/Sylius/Component/Core/Dashboard/SalesSummary.php b/src/Sylius/Component/Core/Dashboard/SalesSummary.php
index 18d22dc72e8..83446e5ee8f 100644
--- a/src/Sylius/Component/Core/Dashboard/SalesSummary.php
+++ b/src/Sylius/Component/Core/Dashboard/SalesSummary.php
@@ -22,7 +22,7 @@ final class SalesSummary implements SalesSummaryInterface
private array $intervalsSalesMap = [];
public function __construct(
- array $salesData
+ array $salesData,
) {
$this->intervalsSalesMap = $salesData;
}
diff --git a/src/Sylius/Component/Core/Exception/HandleException.php b/src/Sylius/Component/Core/Exception/HandleException.php
index 83b22cfcfa1..10fe5973e2b 100644
--- a/src/Sylius/Component/Core/Exception/HandleException.php
+++ b/src/Sylius/Component/Core/Exception/HandleException.php
@@ -21,10 +21,10 @@ public function __construct(string $handlerName, string $message, ?\Exception $p
sprintf(
'%s was unable to handle this request. %s',
$handlerName,
- $message
+ $message,
),
0,
- $previousException
+ $previousException,
);
}
}
diff --git a/src/Sylius/Component/Core/Factory/ChannelFactory.php b/src/Sylius/Component/Core/Factory/ChannelFactory.php
index ba5e5fd3158..0208f58f137 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/Factory/PromotionActionFactory.php b/src/Sylius/Component/Core/Factory/PromotionActionFactory.php
index 4fbfd31c0a0..099e9f3e9ba 100644
--- a/src/Sylius/Component/Core/Factory/PromotionActionFactory.php
+++ b/src/Sylius/Component/Core/Factory/PromotionActionFactory.php
@@ -39,7 +39,7 @@ public function createFixedDiscount(int $amount, string $channelCode): Promotion
{
return $this->createAction(
FixedDiscountPromotionActionCommand::TYPE,
- [$channelCode => ['amount' => $amount]]
+ [$channelCode => ['amount' => $amount]],
);
}
@@ -47,7 +47,7 @@ public function createUnitFixedDiscount(int $amount, string $channelCode): Promo
{
return $this->createAction(
UnitFixedDiscountPromotionActionCommand::TYPE,
- [$channelCode => ['amount' => $amount]]
+ [$channelCode => ['amount' => $amount]],
);
}
@@ -55,7 +55,7 @@ public function createPercentageDiscount(float $percentage): PromotionActionInte
{
return $this->createAction(
PercentageDiscountPromotionActionCommand::TYPE,
- ['percentage' => $percentage]
+ ['percentage' => $percentage],
);
}
@@ -63,7 +63,7 @@ public function createUnitPercentageDiscount(float $percentage, string $channelC
{
return $this->createAction(
UnitPercentageDiscountPromotionActionCommand::TYPE,
- [$channelCode => ['percentage' => $percentage]]
+ [$channelCode => ['percentage' => $percentage]],
);
}
@@ -71,7 +71,7 @@ public function createShippingPercentageDiscount(float $percentage): PromotionAc
{
return $this->createAction(
ShippingPercentageDiscountPromotionActionCommand::TYPE,
- ['percentage' => $percentage]
+ ['percentage' => $percentage],
);
}
diff --git a/src/Sylius/Component/Core/Factory/PromotionRuleFactory.php b/src/Sylius/Component/Core/Factory/PromotionRuleFactory.php
index f06f3fe94db..f54cefb817e 100644
--- a/src/Sylius/Component/Core/Factory/PromotionRuleFactory.php
+++ b/src/Sylius/Component/Core/Factory/PromotionRuleFactory.php
@@ -55,7 +55,7 @@ public function createItemsFromTaxonTotal(string $channelCode, string $taxonCode
{
return $this->createPromotionRule(
TotalOfItemsFromTaxonRuleChecker::TYPE,
- [$channelCode => ['taxon' => $taxonCode, 'amount' => $amount]]
+ [$channelCode => ['taxon' => $taxonCode, 'amount' => $amount]],
)
;
}
diff --git a/src/Sylius/Component/Core/Inventory/Operator/OrderInventoryOperator.php b/src/Sylius/Component/Core/Inventory/Operator/OrderInventoryOperator.php
index a70003905ec..12db8d1f840 100644
--- a/src/Sylius/Component/Core/Inventory/Operator/OrderInventoryOperator.php
+++ b/src/Sylius/Component/Core/Inventory/Operator/OrderInventoryOperator.php
@@ -25,7 +25,7 @@ public function cancel(OrderInterface $order): void
if (in_array(
$order->getPaymentState(),
[OrderPaymentStates::STATE_PAID, OrderPaymentStates::STATE_REFUNDED],
- true
+ true,
)) {
$this->giveBack($order);
@@ -64,8 +64,8 @@ public function sell(OrderInterface $order): void
0,
sprintf(
'Not enough units to decrease on hold quantity from the inventory of a variant "%s".',
- $variant->getName()
- )
+ $variant->getName(),
+ ),
);
Assert::greaterThanEq(
@@ -73,8 +73,8 @@ public function sell(OrderInterface $order): void
0,
sprintf(
'Not enough units to decrease on hand quantity from the inventory of a variant "%s".',
- $variant->getName()
- )
+ $variant->getName(),
+ ),
);
$variant->setOnHold($variant->getOnHold() - $orderItem->getQuantity());
@@ -100,8 +100,8 @@ private function release(OrderInterface $order): void
0,
sprintf(
'Not enough units to decrease on hold quantity from the inventory of a variant "%s".',
- $variant->getName()
- )
+ $variant->getName(),
+ ),
);
$variant->setOnHold($variant->getOnHold() - $orderItem->getQuantity());
diff --git a/src/Sylius/Component/Core/Locale/Context/StorageBasedLocaleContext.php b/src/Sylius/Component/Core/Locale/Context/StorageBasedLocaleContext.php
index c030e44509b..7ae702d82dd 100644
--- a/src/Sylius/Component/Core/Locale/Context/StorageBasedLocaleContext.php
+++ b/src/Sylius/Component/Core/Locale/Context/StorageBasedLocaleContext.php
@@ -31,7 +31,7 @@ final class StorageBasedLocaleContext implements LocaleContextInterface
public function __construct(
ChannelContextInterface $channelContext,
LocaleStorageInterface $localeStorage,
- LocaleProviderInterface $localeProvider
+ LocaleProviderInterface $localeProvider,
) {
$this->channelContext = $channelContext;
$this->localeStorage = $localeStorage;
diff --git a/src/Sylius/Component/Core/Model/Adjustment.php b/src/Sylius/Component/Core/Model/Adjustment.php
index 04e5f7f8d40..7ce5a03df18 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 cf7f5a172c6..cfbe775b400 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 10138cc4701..8d61bdb246b 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 ff990a385f2..8dcf0f95163 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 a60dadef3aa..cd510475e73 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 0ec557eae6c..b3cd589aa22 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 86d76db6252..2b67f07ca89 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 5f0bb31d3f6..c6b60cd63b4 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 eadcd336369..6b648e03804 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 6976cfaaa61..a5309732446 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 5e6eb76cc8d..ac18fb03ec8 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;
/**
@@ -95,7 +88,7 @@ public function setVariantSelectionMethod(?string $variantSelectionMethod): void
Assert::oneOf(
$variantSelectionMethod,
[self::VARIANT_SELECTION_CHOICE, self::VARIANT_SELECTION_MATCH],
- sprintf('Wrong variant selection method "%s" given.', $variantSelectionMethod)
+ sprintf('Wrong variant selection method "%s" given.', $variantSelectionMethod),
);
$this->variantSelectionMethod = $variantSelectionMethod;
diff --git a/src/Sylius/Component/Core/Model/ProductTaxon.php b/src/Sylius/Component/Core/Model/ProductTaxon.php
index 8cc64ab7ae3..3def5036ce7 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 3e851917ccf..1d2a95f91af 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 ac9afa861ed..2ada188c603 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 fcd305cd264..06298985cb8 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 064b69ee2b1..7d9af9acc65 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 b79d098f351..4d6e10ca9c3 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 8bf059a4ed2..d253ae97818 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 00eada171f2..c46d3030354 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/OrderProcessing/OrderAdjustmentsClearer.php b/src/Sylius/Component/Core/OrderProcessing/OrderAdjustmentsClearer.php
index 081cf873292..ab6c7221a23 100644
--- a/src/Sylius/Component/Core/OrderProcessing/OrderAdjustmentsClearer.php
+++ b/src/Sylius/Component/Core/OrderProcessing/OrderAdjustmentsClearer.php
@@ -26,7 +26,7 @@ public function __construct(array $adjustmentsToRemove = [])
if (0 === func_num_args()) {
@trigger_error(
'Not passing adjustments types explicitly is deprecated since 1.2 and will be prohibited in 2.0',
- \E_USER_DEPRECATED
+ \E_USER_DEPRECATED,
);
$adjustmentsToRemove = [
diff --git a/src/Sylius/Component/Core/OrderProcessing/OrderPaymentProcessor.php b/src/Sylius/Component/Core/OrderProcessing/OrderPaymentProcessor.php
index 71980b62abb..edb64f65996 100644
--- a/src/Sylius/Component/Core/OrderProcessing/OrderPaymentProcessor.php
+++ b/src/Sylius/Component/Core/OrderProcessing/OrderPaymentProcessor.php
@@ -30,7 +30,7 @@ final class OrderPaymentProcessor implements OrderProcessorInterface
public function __construct(
OrderPaymentProviderInterface $orderPaymentProvider,
- string $targetState = PaymentInterface::STATE_CART
+ string $targetState = PaymentInterface::STATE_CART,
) {
$this->orderPaymentProvider = $orderPaymentProvider;
$this->targetState = $targetState;
diff --git a/src/Sylius/Component/Core/OrderProcessing/OrderPricesRecalculator.php b/src/Sylius/Component/Core/OrderProcessing/OrderPricesRecalculator.php
index 6ee1df5e2c3..c94ebd91915 100644
--- a/src/Sylius/Component/Core/OrderProcessing/OrderPricesRecalculator.php
+++ b/src/Sylius/Component/Core/OrderProcessing/OrderPricesRecalculator.php
@@ -42,7 +42,7 @@ public function process(BaseOrderInterface $order): void
$item->setUnitPrice($this->productVariantPriceCalculator->calculate(
$item->getVariant(),
- ['channel' => $channel]
+ ['channel' => $channel],
));
}
}
diff --git a/src/Sylius/Component/Core/OrderProcessing/OrderShipmentProcessor.php b/src/Sylius/Component/Core/OrderProcessing/OrderShipmentProcessor.php
index a162672017d..26188825abe 100644
--- a/src/Sylius/Component/Core/OrderProcessing/OrderShipmentProcessor.php
+++ b/src/Sylius/Component/Core/OrderProcessing/OrderShipmentProcessor.php
@@ -34,7 +34,7 @@ final class OrderShipmentProcessor implements OrderProcessorInterface
public function __construct(
DefaultShippingMethodResolverInterface $defaultShippingMethodResolver,
FactoryInterface $shipmentFactory,
- ?ShippingMethodsResolverInterface $shippingMethodsResolver = null
+ ?ShippingMethodsResolverInterface $shippingMethodsResolver = null,
) {
$this->defaultShippingMethodResolver = $defaultShippingMethodResolver;
$this->shipmentFactory = $shipmentFactory;
@@ -43,7 +43,7 @@ public function __construct(
if (2 === func_num_args() || null === $shippingMethodsResolver) {
@trigger_error(
'Not passing ShippingMethodsResolverInterface explicitly is deprecated since 1.2 and will be prohibited in 2.0',
- \E_USER_DEPRECATED
+ \E_USER_DEPRECATED,
);
}
}
diff --git a/src/Sylius/Component/Core/OrderProcessing/OrderTaxesProcessor.php b/src/Sylius/Component/Core/OrderProcessing/OrderTaxesProcessor.php
index facf9397acb..4446d97c0ed 100644
--- a/src/Sylius/Component/Core/OrderProcessing/OrderTaxesProcessor.php
+++ b/src/Sylius/Component/Core/OrderProcessing/OrderTaxesProcessor.php
@@ -38,7 +38,7 @@ final class OrderTaxesProcessor implements OrderProcessorInterface
public function __construct(
ZoneProviderInterface $defaultTaxZoneProvider,
ZoneMatcherInterface $zoneMatcher,
- PrioritizedServiceRegistryInterface $strategyRegistry
+ PrioritizedServiceRegistryInterface $strategyRegistry,
) {
$this->defaultTaxZoneProvider = $defaultTaxZoneProvider;
$this->zoneMatcher = $zoneMatcher;
diff --git a/src/Sylius/Component/Core/OrderProcessing/ShippingChargesProcessor.php b/src/Sylius/Component/Core/OrderProcessing/ShippingChargesProcessor.php
index 25c512ed4b2..707efb0d7c1 100644
--- a/src/Sylius/Component/Core/OrderProcessing/ShippingChargesProcessor.php
+++ b/src/Sylius/Component/Core/OrderProcessing/ShippingChargesProcessor.php
@@ -30,7 +30,7 @@ final class ShippingChargesProcessor implements OrderProcessorInterface
public function __construct(
FactoryInterface $adjustmentFactory,
- DelegatingCalculatorInterface $shippingChargesCalculator
+ DelegatingCalculatorInterface $shippingChargesCalculator,
) {
$this->adjustmentFactory = $adjustmentFactory;
$this->shippingChargesCalculator = $shippingChargesCalculator;
diff --git a/src/Sylius/Component/Core/Payment/Provider/OrderPaymentProvider.php b/src/Sylius/Component/Core/Payment/Provider/OrderPaymentProvider.php
index 0a0802f9294..557deffae36 100644
--- a/src/Sylius/Component/Core/Payment/Provider/OrderPaymentProvider.php
+++ b/src/Sylius/Component/Core/Payment/Provider/OrderPaymentProvider.php
@@ -35,7 +35,7 @@ final class OrderPaymentProvider implements OrderPaymentProviderInterface
public function __construct(
DefaultPaymentMethodResolverInterface $defaultPaymentMethodResolver,
PaymentFactoryInterface $paymentFactory,
- StateMachineFactoryInterface $stateMachineFactory
+ StateMachineFactoryInterface $stateMachineFactory,
) {
$this->defaultPaymentMethodResolver = $defaultPaymentMethodResolver;
$this->paymentFactory = $paymentFactory;
diff --git a/src/Sylius/Component/Core/Promotion/Action/DiscountPromotionActionCommand.php b/src/Sylius/Component/Core/Promotion/Action/DiscountPromotionActionCommand.php
index 49e6d415855..39729d6d508 100644
--- a/src/Sylius/Component/Core/Promotion/Action/DiscountPromotionActionCommand.php
+++ b/src/Sylius/Component/Core/Promotion/Action/DiscountPromotionActionCommand.php
@@ -57,7 +57,7 @@ protected function isSubjectValid(PromotionSubjectInterface $subject): bool
private function removeUnitOrderPromotionAdjustmentsByOrigin(
OrderItemUnitInterface $unit,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
foreach ($unit->getAdjustments(AdjustmentInterface::ORDER_PROMOTION_ADJUSTMENT) as $adjustment) {
if ($promotion->getCode() === $adjustment->getOriginCode()) {
diff --git a/src/Sylius/Component/Core/Promotion/Action/FixedDiscountPromotionActionCommand.php b/src/Sylius/Component/Core/Promotion/Action/FixedDiscountPromotionActionCommand.php
index 5d2a60c0114..911438dea40 100644
--- a/src/Sylius/Component/Core/Promotion/Action/FixedDiscountPromotionActionCommand.php
+++ b/src/Sylius/Component/Core/Promotion/Action/FixedDiscountPromotionActionCommand.php
@@ -30,7 +30,7 @@ final class FixedDiscountPromotionActionCommand extends DiscountPromotionActionC
public function __construct(
ProportionalIntegerDistributorInterface $proportionalIntegerDistributor,
- UnitsPromotionAdjustmentsApplicatorInterface $unitsPromotionAdjustmentsApplicator
+ UnitsPromotionAdjustmentsApplicatorInterface $unitsPromotionAdjustmentsApplicator,
) {
$this->proportionalDistributor = $proportionalIntegerDistributor;
$this->unitsPromotionAdjustmentsApplicator = $unitsPromotionAdjustmentsApplicator;
@@ -58,7 +58,7 @@ public function execute(PromotionSubjectInterface $subject, array $configuration
$promotionAmount = $this->calculateAdjustmentAmount(
$subject->getPromotionSubjectTotal(),
- $configuration[$channelCode]['amount']
+ $configuration[$channelCode]['amount'],
);
if (0 === $promotionAmount) {
diff --git a/src/Sylius/Component/Core/Promotion/Action/PercentageDiscountPromotionActionCommand.php b/src/Sylius/Component/Core/Promotion/Action/PercentageDiscountPromotionActionCommand.php
index a572cc4edb1..81d94f76701 100644
--- a/src/Sylius/Component/Core/Promotion/Action/PercentageDiscountPromotionActionCommand.php
+++ b/src/Sylius/Component/Core/Promotion/Action/PercentageDiscountPromotionActionCommand.php
@@ -31,7 +31,7 @@ final class PercentageDiscountPromotionActionCommand extends DiscountPromotionAc
public function __construct(
ProportionalIntegerDistributorInterface $distributor,
- UnitsPromotionAdjustmentsApplicatorInterface $unitsPromotionAdjustmentsApplicator
+ UnitsPromotionAdjustmentsApplicatorInterface $unitsPromotionAdjustmentsApplicator,
) {
$this->distributor = $distributor;
$this->unitsPromotionAdjustmentsApplicator = $unitsPromotionAdjustmentsApplicator;
diff --git a/src/Sylius/Component/Core/Promotion/Action/ShippingPercentageDiscountPromotionActionCommand.php b/src/Sylius/Component/Core/Promotion/Action/ShippingPercentageDiscountPromotionActionCommand.php
index 5f813fefdea..e47cc258408 100644
--- a/src/Sylius/Component/Core/Promotion/Action/ShippingPercentageDiscountPromotionActionCommand.php
+++ b/src/Sylius/Component/Core/Promotion/Action/ShippingPercentageDiscountPromotionActionCommand.php
@@ -99,7 +99,7 @@ public function revert(PromotionSubjectInterface $subject, array $configuration,
private function createAdjustment(
PromotionInterface $promotion,
- string $type = AdjustmentInterface::ORDER_SHIPPING_PROMOTION_ADJUSTMENT
+ string $type = AdjustmentInterface::ORDER_SHIPPING_PROMOTION_ADJUSTMENT,
): OrderAdjustmentInterface {
/** @var OrderAdjustmentInterface $adjustment */
$adjustment = $this->adjustmentFactory->createNew();
diff --git a/src/Sylius/Component/Core/Promotion/Action/UnitDiscountPromotionActionCommand.php b/src/Sylius/Component/Core/Promotion/Action/UnitDiscountPromotionActionCommand.php
index 85aaacf791e..bed8446a7c6 100644
--- a/src/Sylius/Component/Core/Promotion/Action/UnitDiscountPromotionActionCommand.php
+++ b/src/Sylius/Component/Core/Promotion/Action/UnitDiscountPromotionActionCommand.php
@@ -74,7 +74,7 @@ protected function addAdjustmentToUnit(OrderItemUnitInterface $unit, int $amount
protected function createAdjustment(
PromotionInterface $promotion,
- string $type = AdjustmentInterface::ORDER_PROMOTION_ADJUSTMENT
+ string $type = AdjustmentInterface::ORDER_PROMOTION_ADJUSTMENT,
): OrderAdjustmentInterface {
/** @var OrderAdjustmentInterface $adjustment */
$adjustment = $this->adjustmentFactory->createNew();
diff --git a/src/Sylius/Component/Core/Promotion/Action/UnitFixedDiscountPromotionActionCommand.php b/src/Sylius/Component/Core/Promotion/Action/UnitFixedDiscountPromotionActionCommand.php
index e8449730f0a..e00e695153d 100644
--- a/src/Sylius/Component/Core/Promotion/Action/UnitFixedDiscountPromotionActionCommand.php
+++ b/src/Sylius/Component/Core/Promotion/Action/UnitFixedDiscountPromotionActionCommand.php
@@ -35,7 +35,7 @@ public function __construct(
FactoryInterface $adjustmentFactory,
FilterInterface $priceRangeFilter,
FilterInterface $taxonFilter,
- FilterInterface $productFilter
+ FilterInterface $productFilter,
) {
parent::__construct($adjustmentFactory);
@@ -62,7 +62,7 @@ public function execute(PromotionSubjectInterface $subject, array $configuration
$filteredItems = $this->priceRangeFilter->filter(
$subject->getItems()->toArray(),
- array_merge(['channel' => $subject->getChannel()], $configuration[$channelCode])
+ array_merge(['channel' => $subject->getChannel()], $configuration[$channelCode]),
);
$filteredItems = $this->taxonFilter->filter($filteredItems, $configuration[$channelCode]);
$filteredItems = $this->productFilter->filter($filteredItems, $configuration[$channelCode]);
@@ -84,7 +84,7 @@ private function setUnitsAdjustments(OrderItemInterface $item, int $amount, Prom
$this->addAdjustmentToUnit(
$unit,
min($unit->getTotal(), $amount),
- $promotion
+ $promotion,
);
}
}
diff --git a/src/Sylius/Component/Core/Promotion/Action/UnitPercentageDiscountPromotionActionCommand.php b/src/Sylius/Component/Core/Promotion/Action/UnitPercentageDiscountPromotionActionCommand.php
index bc5dd415d22..63be63d15d3 100644
--- a/src/Sylius/Component/Core/Promotion/Action/UnitPercentageDiscountPromotionActionCommand.php
+++ b/src/Sylius/Component/Core/Promotion/Action/UnitPercentageDiscountPromotionActionCommand.php
@@ -35,7 +35,7 @@ public function __construct(
FactoryInterface $adjustmentFactory,
FilterInterface $priceRangeFilter,
FilterInterface $taxonFilter,
- FilterInterface $productFilter
+ FilterInterface $productFilter,
) {
parent::__construct($adjustmentFactory);
@@ -57,7 +57,7 @@ public function execute(PromotionSubjectInterface $subject, array $configuration
$filteredItems = $this->priceRangeFilter->filter(
$subject->getItems()->toArray(),
- array_merge(['channel' => $subject->getChannel()], $configuration[$channelCode])
+ array_merge(['channel' => $subject->getChannel()], $configuration[$channelCode]),
);
$filteredItems = $this->taxonFilter->filter($filteredItems, $configuration[$channelCode]);
$filteredItems = $this->productFilter->filter($filteredItems, $configuration[$channelCode]);
@@ -77,7 +77,7 @@ public function execute(PromotionSubjectInterface $subject, array $configuration
private function setUnitsAdjustments(
OrderItemInterface $item,
int $promotionAmount,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
foreach ($item->getUnits() as $unit) {
$this->addAdjustmentToUnit($unit, $promotionAmount, $promotion);
diff --git a/src/Sylius/Component/Core/Promotion/Applicator/UnitsPromotionAdjustmentsApplicator.php b/src/Sylius/Component/Core/Promotion/Applicator/UnitsPromotionAdjustmentsApplicator.php
index 13bf757ed3c..e6e41eecdd0 100644
--- a/src/Sylius/Component/Core/Promotion/Applicator/UnitsPromotionAdjustmentsApplicator.php
+++ b/src/Sylius/Component/Core/Promotion/Applicator/UnitsPromotionAdjustmentsApplicator.php
@@ -31,7 +31,7 @@ final class UnitsPromotionAdjustmentsApplicator implements UnitsPromotionAdjustm
public function __construct(
AdjustmentFactoryInterface $adjustmentFactory,
- IntegerDistributorInterface $distributor
+ IntegerDistributorInterface $distributor,
) {
$this->adjustmentFactory = $adjustmentFactory;
$this->distributor = $distributor;
@@ -58,7 +58,7 @@ public function apply(OrderInterface $order, PromotionInterface $promotion, arra
private function applyAdjustmentsOnItemUnits(
OrderItemInterface $item,
PromotionInterface $promotion,
- int $itemPromotionAmount
+ int $itemPromotionAmount,
): void {
$splitPromotionAmount = $this->distributor->distribute($itemPromotionAmount, $item->getQuantity());
diff --git a/src/Sylius/Component/Core/Promotion/Filter/TaxonFilter.php b/src/Sylius/Component/Core/Promotion/Filter/TaxonFilter.php
index 5aa684aee1f..acd8931d767 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/Provider/TranslationLocaleProvider.php b/src/Sylius/Component/Core/Provider/TranslationLocaleProvider.php
index 04632de8de4..74382e29fd3 100644
--- a/src/Sylius/Component/Core/Provider/TranslationLocaleProvider.php
+++ b/src/Sylius/Component/Core/Provider/TranslationLocaleProvider.php
@@ -37,7 +37,7 @@ public function getDefinedLocalesCodes(): array
function (LocaleInterface $locale) {
return (string) $locale->getCode();
},
- $locales
+ $locales,
);
}
diff --git a/src/Sylius/Component/Core/Repository/ProductRepositoryInterface.php b/src/Sylius/Component/Core/Repository/ProductRepositoryInterface.php
index 656c046c6fc..01b1874904d 100644
--- a/src/Sylius/Component/Core/Repository/ProductRepositoryInterface.php
+++ b/src/Sylius/Component/Core/Repository/ProductRepositoryInterface.php
@@ -29,7 +29,7 @@ public function createShopListQueryBuilder(
TaxonInterface $taxon,
string $locale,
array $sorting = [],
- bool $includeAllDescendants = false
+ bool $includeAllDescendants = false,
): QueryBuilder;
/**
diff --git a/src/Sylius/Component/Core/Resolver/EligibleDefaultShippingMethodResolver.php b/src/Sylius/Component/Core/Resolver/EligibleDefaultShippingMethodResolver.php
index 4d1a9913986..9440c143ab6 100644
--- a/src/Sylius/Component/Core/Resolver/EligibleDefaultShippingMethodResolver.php
+++ b/src/Sylius/Component/Core/Resolver/EligibleDefaultShippingMethodResolver.php
@@ -38,7 +38,7 @@ final class EligibleDefaultShippingMethodResolver implements DefaultShippingMeth
public function __construct(
ShippingMethodRepositoryInterface $shippingMethodRepository,
ShippingMethodEligibilityCheckerInterface $shippingMethodEligibilityChecker,
- ZoneMatcherInterface $zoneMatcher
+ ZoneMatcherInterface $zoneMatcher,
) {
$this->shippingMethodRepository = $shippingMethodRepository;
$this->shippingMethodEligibilityChecker = $shippingMethodEligibilityChecker;
diff --git a/src/Sylius/Component/Core/Resolver/ZoneAndChannelBasedShippingMethodsResolver.php b/src/Sylius/Component/Core/Resolver/ZoneAndChannelBasedShippingMethodsResolver.php
index 057b7c9d002..034acd97e98 100644
--- a/src/Sylius/Component/Core/Resolver/ZoneAndChannelBasedShippingMethodsResolver.php
+++ b/src/Sylius/Component/Core/Resolver/ZoneAndChannelBasedShippingMethodsResolver.php
@@ -34,7 +34,7 @@ class ZoneAndChannelBasedShippingMethodsResolver implements ShippingMethodsResol
public function __construct(
ShippingMethodRepositoryInterface $shippingMethodRepository,
ZoneMatcherInterface $zoneMatcher,
- ShippingMethodEligibilityCheckerInterface $eligibilityChecker
+ ShippingMethodEligibilityCheckerInterface $eligibilityChecker,
) {
$this->shippingMethodRepository = $shippingMethodRepository;
$this->zoneMatcher = $zoneMatcher;
diff --git a/src/Sylius/Component/Core/Shipping/Calculator/FlatRateCalculator.php b/src/Sylius/Component/Core/Shipping/Calculator/FlatRateCalculator.php
index 9d3492f5960..95112111f0b 100644
--- a/src/Sylius/Component/Core/Shipping/Calculator/FlatRateCalculator.php
+++ b/src/Sylius/Component/Core/Shipping/Calculator/FlatRateCalculator.php
@@ -34,7 +34,7 @@ public function calculate(BaseShipmentInterface $subject, array $configuration):
throw new MissingChannelConfigurationException(sprintf(
'Channel %s has no amount defined for shipping method %s',
$subject->getOrder()->getChannel()->getName(),
- $subject->getMethod()->getName()
+ $subject->getMethod()->getName(),
));
}
diff --git a/src/Sylius/Component/Core/Shipping/Calculator/PerUnitRateCalculator.php b/src/Sylius/Component/Core/Shipping/Calculator/PerUnitRateCalculator.php
index caeb245bb7c..adc25be182e 100644
--- a/src/Sylius/Component/Core/Shipping/Calculator/PerUnitRateCalculator.php
+++ b/src/Sylius/Component/Core/Shipping/Calculator/PerUnitRateCalculator.php
@@ -35,7 +35,7 @@ public function calculate(BaseShipmentInterface $subject, array $configuration):
throw new MissingChannelConfigurationException(sprintf(
'Channel %s has no amount defined for shipping method %s',
$subject->getOrder()->getChannel()->getName(),
- $subject->getMethod()->getName()
+ $subject->getMethod()->getName(),
));
}
diff --git a/src/Sylius/Component/Core/StateResolver/CheckoutStateResolver.php b/src/Sylius/Component/Core/StateResolver/CheckoutStateResolver.php
index 4add18b1789..95aaa64323d 100644
--- a/src/Sylius/Component/Core/StateResolver/CheckoutStateResolver.php
+++ b/src/Sylius/Component/Core/StateResolver/CheckoutStateResolver.php
@@ -31,7 +31,7 @@ final class CheckoutStateResolver implements StateResolverInterface
public function __construct(
FactoryInterface $stateMachineFactory,
OrderPaymentMethodSelectionRequirementCheckerInterface $orderPaymentMethodSelectionRequirementChecker,
- OrderShippingMethodSelectionRequirementCheckerInterface $orderShippingMethodSelectionRequirementChecker
+ OrderShippingMethodSelectionRequirementCheckerInterface $orderShippingMethodSelectionRequirementChecker,
) {
$this->stateMachineFactory = $stateMachineFactory;
$this->orderPaymentMethodSelectionRequirementChecker = $orderPaymentMethodSelectionRequirementChecker;
@@ -43,15 +43,15 @@ public function resolve(OrderInterface $order): void
$stateMachine = $this->stateMachineFactory->get($order, OrderCheckoutTransitions::GRAPH);
if (
- !$this->orderShippingMethodSelectionRequirementChecker->isShippingMethodSelectionRequired($order)
- && $stateMachine->can(OrderCheckoutTransitions::TRANSITION_SKIP_SHIPPING)
+ !$this->orderShippingMethodSelectionRequirementChecker->isShippingMethodSelectionRequired($order) &&
+ $stateMachine->can(OrderCheckoutTransitions::TRANSITION_SKIP_SHIPPING)
) {
$stateMachine->apply(OrderCheckoutTransitions::TRANSITION_SKIP_SHIPPING);
}
if (
- !$this->orderPaymentMethodSelectionRequirementChecker->isPaymentMethodSelectionRequired($order)
- && $stateMachine->can(OrderCheckoutTransitions::TRANSITION_SKIP_PAYMENT)
+ !$this->orderPaymentMethodSelectionRequirementChecker->isPaymentMethodSelectionRequired($order) &&
+ $stateMachine->can(OrderCheckoutTransitions::TRANSITION_SKIP_PAYMENT)
) {
$stateMachine->apply(OrderCheckoutTransitions::TRANSITION_SKIP_PAYMENT);
}
diff --git a/src/Sylius/Component/Core/StateResolver/OrderShippingStateResolver.php b/src/Sylius/Component/Core/StateResolver/OrderShippingStateResolver.php
index bee7c0cd112..fd9fbd0af52 100644
--- a/src/Sylius/Component/Core/StateResolver/OrderShippingStateResolver.php
+++ b/src/Sylius/Component/Core/StateResolver/OrderShippingStateResolver.php
@@ -67,7 +67,7 @@ private function countOrderShipmentsInState(OrderInterface $order, string $shipm
private function allShipmentsInStateButOrderStateNotUpdated(
OrderInterface $order,
string $shipmentState,
- string $orderShippingState
+ string $orderShippingState,
): bool {
$shipmentInStateAmount = $this->countOrderShipmentsInState($order, $shipmentState);
$shipmentAmount = $order->getShipments()->count();
diff --git a/src/Sylius/Component/Core/Taxation/Applicator/OrderItemUnitsTaxesApplicator.php b/src/Sylius/Component/Core/Taxation/Applicator/OrderItemUnitsTaxesApplicator.php
index 603ae481e49..06ecf8980be 100644
--- a/src/Sylius/Component/Core/Taxation/Applicator/OrderItemUnitsTaxesApplicator.php
+++ b/src/Sylius/Component/Core/Taxation/Applicator/OrderItemUnitsTaxesApplicator.php
@@ -33,7 +33,7 @@ class OrderItemUnitsTaxesApplicator implements OrderTaxesApplicatorInterface
public function __construct(
CalculatorInterface $calculator,
AdjustmentFactoryInterface $adjustmentFactory,
- TaxRateResolverInterface $taxRateResolver
+ TaxRateResolverInterface $taxRateResolver,
) {
$this->calculator = $calculator;
$this->adjustmentFactory = $adjustmentFactory;
@@ -71,7 +71,7 @@ private function addAdjustment(OrderItemUnitInterface $unit, int $taxAmount, Tax
'taxRateCode' => $taxRate->getCode(),
'taxRateName' => $taxRate->getName(),
'taxRateAmount' => $taxRate->getAmount(),
- ]
+ ],
);
$unit->addAdjustment($unitTaxAdjustment);
}
diff --git a/src/Sylius/Component/Core/Taxation/Applicator/OrderItemsTaxesApplicator.php b/src/Sylius/Component/Core/Taxation/Applicator/OrderItemsTaxesApplicator.php
index be62e68319f..4d60b8c1cc7 100644
--- a/src/Sylius/Component/Core/Taxation/Applicator/OrderItemsTaxesApplicator.php
+++ b/src/Sylius/Component/Core/Taxation/Applicator/OrderItemsTaxesApplicator.php
@@ -38,7 +38,7 @@ public function __construct(
CalculatorInterface $calculator,
AdjustmentFactoryInterface $adjustmentFactory,
IntegerDistributorInterface $distributor,
- TaxRateResolverInterface $taxRateResolver
+ TaxRateResolverInterface $taxRateResolver,
) {
$this->calculator = $calculator;
$this->adjustmentFactory = $adjustmentFactory;
@@ -87,7 +87,7 @@ private function addAdjustment(OrderItemUnitInterface $unit, int $taxAmount, Tax
'taxRateCode' => $taxRate->getCode(),
'taxRateName' => $taxRate->getName(),
'taxRateAmount' => $taxRate->getAmount(),
- ]
+ ],
);
$unit->addAdjustment($unitTaxAdjustment);
}
diff --git a/src/Sylius/Component/Core/Taxation/Applicator/OrderShipmentTaxesApplicator.php b/src/Sylius/Component/Core/Taxation/Applicator/OrderShipmentTaxesApplicator.php
index 2528c4d3923..0e8be596e33 100644
--- a/src/Sylius/Component/Core/Taxation/Applicator/OrderShipmentTaxesApplicator.php
+++ b/src/Sylius/Component/Core/Taxation/Applicator/OrderShipmentTaxesApplicator.php
@@ -35,7 +35,7 @@ class OrderShipmentTaxesApplicator implements OrderTaxesApplicatorInterface
public function __construct(
CalculatorInterface $calculator,
AdjustmentFactoryInterface $adjustmentFactory,
- TaxRateResolverInterface $taxRateResolver
+ TaxRateResolverInterface $taxRateResolver,
) {
$this->calculator = $calculator;
$this->adjustmentFactory = $adjustmentFactory;
@@ -74,7 +74,7 @@ private function addAdjustment(
ShipmentInterface $shipment,
int $taxAmount,
TaxRateInterface $taxRate,
- ShippingMethodInterface $shippingMethod
+ ShippingMethodInterface $shippingMethod,
): void {
$shipment->addAdjustment($this->adjustmentFactory->createWithData(
AdjustmentInterface::TAX_ADJUSTMENT,
@@ -87,7 +87,7 @@ private function addAdjustment(
'taxRateCode' => $taxRate->getCode(),
'taxRateName' => $taxRate->getName(),
'taxRateAmount' => $taxRate->getAmount(),
- ]
+ ],
));
}
diff --git a/src/Sylius/Component/Core/Test/Services/DefaultChannelFactory.php b/src/Sylius/Component/Core/Test/Services/DefaultChannelFactory.php
index 208aba2f2e5..52d89da3ad8 100644
--- a/src/Sylius/Component/Core/Test/Services/DefaultChannelFactory.php
+++ b/src/Sylius/Component/Core/Test/Services/DefaultChannelFactory.php
@@ -49,7 +49,7 @@ public function __construct(
RepositoryInterface $channelRepository,
RepositoryInterface $currencyRepository,
RepositoryInterface $localeRepository,
- string $defaultLocaleCode
+ string $defaultLocaleCode,
) {
$this->channelFactory = $channelFactory;
$this->currencyFactory = $currencyFactory;
diff --git a/src/Sylius/Component/Core/Test/Services/DefaultUnitedStatesChannelFactory.php b/src/Sylius/Component/Core/Test/Services/DefaultUnitedStatesChannelFactory.php
index 8f7a1facdf7..4ee20f2b117 100644
--- a/src/Sylius/Component/Core/Test/Services/DefaultUnitedStatesChannelFactory.php
+++ b/src/Sylius/Component/Core/Test/Services/DefaultUnitedStatesChannelFactory.php
@@ -70,7 +70,7 @@ public function __construct(
FactoryInterface $currencyFactory,
FactoryInterface $localeFactory,
ZoneFactoryInterface $zoneFactory,
- string $defaultLocaleCode
+ string $defaultLocaleCode,
) {
$this->channelRepository = $channelRepository;
$this->countryRepository = $countryRepository;
diff --git a/src/Sylius/Component/Core/Test/Services/EmailChecker.php b/src/Sylius/Component/Core/Test/Services/EmailChecker.php
index ce15f9efefc..7f7ed5b494b 100644
--- a/src/Sylius/Component/Core/Test/Services/EmailChecker.php
+++ b/src/Sylius/Component/Core/Test/Services/EmailChecker.php
@@ -95,7 +95,7 @@ private function assertRecipientIsValid(string $recipient): void
Assert::notEq(
false,
filter_var($recipient, \FILTER_VALIDATE_EMAIL),
- 'Given recipient is not a valid email address.'
+ 'Given recipient is not a valid email address.',
);
}
diff --git a/src/Sylius/Component/Core/Translation/TranslatableEntityLocaleAssigner.php b/src/Sylius/Component/Core/Translation/TranslatableEntityLocaleAssigner.php
index db633baf9fd..4cef4427a07 100644
--- a/src/Sylius/Component/Core/Translation/TranslatableEntityLocaleAssigner.php
+++ b/src/Sylius/Component/Core/Translation/TranslatableEntityLocaleAssigner.php
@@ -27,7 +27,7 @@ final class TranslatableEntityLocaleAssigner implements TranslatableEntityLocale
public function __construct(
LocaleContextInterface $localeContext,
- TranslationLocaleProviderInterface $translationLocaleProvider
+ TranslationLocaleProviderInterface $translationLocaleProvider,
) {
$this->localeContext = $localeContext;
$this->translationLocaleProvider = $translationLocaleProvider;
diff --git a/src/Sylius/Component/Core/Updater/UnpaidOrdersStateUpdater.php b/src/Sylius/Component/Core/Updater/UnpaidOrdersStateUpdater.php
index 6a3baf80e38..3b049d2c36e 100644
--- a/src/Sylius/Component/Core/Updater/UnpaidOrdersStateUpdater.php
+++ b/src/Sylius/Component/Core/Updater/UnpaidOrdersStateUpdater.php
@@ -34,7 +34,7 @@ public function __construct(
OrderRepositoryInterface $orderRepository,
Factory $stateMachineFactory,
string $expirationPeriod,
- LoggerInterface $logger = null
+ LoggerInterface $logger = null,
) {
$this->orderRepository = $orderRepository;
$this->stateMachineFactory = $stateMachineFactory;
@@ -42,7 +42,7 @@ public function __construct(
if (null === $logger) {
@trigger_error(
'Not passing a logger is deprecated since 1.7',
- \E_USER_DEPRECATED
+ \E_USER_DEPRECATED,
);
}
@@ -59,7 +59,7 @@ public function cancel(): void
if (null !== $this->logger) {
$this->logger->error(
sprintf('An error occurred while cancelling unpaid order #%s', $expiredUnpaidOrder->getId()),
- ['exception' => $e, 'message' => $e->getMessage()]
+ ['exception' => $e, 'message' => $e->getMessage()],
);
}
}
diff --git a/src/Sylius/Component/Core/Uploader/ImageUploader.php b/src/Sylius/Component/Core/Uploader/ImageUploader.php
index 0a214f7ede2..c710990091d 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 */
@@ -37,14 +38,14 @@ class ImageUploader implements ImageUploaderInterface
public function __construct(
Filesystem $filesystem,
- ?ImagePathGeneratorInterface $imagePathGenerator = null
+ ?ImagePathGeneratorInterface $imagePathGenerator = null,
) {
$this->filesystem = $filesystem;
if ($imagePathGenerator === null) {
@trigger_error(sprintf(
'Not passing an $imagePathGenerator to %s constructor is deprecated since Sylius 1.6 and will be not possible in Sylius 2.0.',
- self::class
+ self::class,
), \E_USER_DEPRECATED);
}
diff --git a/src/Sylius/Component/Core/spec/Calculator/ProductVariantPriceCalculatorSpec.php b/src/Sylius/Component/Core/spec/Calculator/ProductVariantPriceCalculatorSpec.php
index cc902ff2d5e..73c71a24060 100644
--- a/src/Sylius/Component/Core/spec/Calculator/ProductVariantPriceCalculatorSpec.php
+++ b/src/Sylius/Component/Core/spec/Calculator/ProductVariantPriceCalculatorSpec.php
@@ -30,7 +30,7 @@ function it_implements_product_variant_price_calculator_interface(): void
function it_gets_price_for_product_variant_in_given_channel(
ChannelInterface $channel,
ChannelPricingInterface $channelPricing,
- ProductVariantInterface $productVariant
+ ProductVariantInterface $productVariant,
): void {
$productVariant->getChannelPricingForChannel($channel)->willReturn($channelPricing);
$channelPricing->getPrice()->willReturn(1000);
@@ -40,7 +40,7 @@ function it_gets_price_for_product_variant_in_given_channel(
function it_throws_a_channel_not_defined_exception_if_there_is_no_channel_pricing(
ChannelInterface $channel,
- ProductVariantInterface $productVariant
+ ProductVariantInterface $productVariant,
): void {
$channel->getName()->willReturn('WEB');
@@ -56,7 +56,7 @@ function it_throws_a_channel_not_defined_exception_if_there_is_no_channel_pricin
function it_throws_a_channel_not_defined_exception_if_there_is_no_variant_price_for_given_channel(
ChannelInterface $channel,
ProductVariantInterface $productVariant,
- ChannelPricingInterface $channelPricing
+ ChannelPricingInterface $channelPricing,
): void {
$channel->getName()->willReturn('WEB');
@@ -81,7 +81,7 @@ function it_throws_exception_if_no_channel_is_defined_in_configuration(ProductVa
function it_gets_original_price_for_product_variant_in_given_channel(
ChannelInterface $channel,
ChannelPricingInterface $channelPricing,
- ProductVariantInterface $productVariant
+ ProductVariantInterface $productVariant,
): void {
$productVariant->getChannelPricingForChannel($channel)->willReturn($channelPricing);
$channelPricing->getOriginalPrice()->willReturn(1000);
@@ -92,7 +92,7 @@ function it_gets_original_price_for_product_variant_in_given_channel(
function it_gets_price_for_product_variant_if_it_has_no_original_price_in_given_channel(
ChannelInterface $channel,
ChannelPricingInterface $channelPricing,
- ProductVariantInterface $productVariant
+ ProductVariantInterface $productVariant,
): void {
$productVariant->getChannelPricingForChannel($channel)->willReturn($channelPricing);
$channelPricing->getPrice()->willReturn(1000);
@@ -103,7 +103,7 @@ function it_gets_price_for_product_variant_if_it_has_no_original_price_in_given_
function it_throws_a_channel_not_defined_exception_if_there_is_no_channel_pricing_when_calculating_original_price(
ChannelInterface $channel,
- ProductVariantInterface $productVariant
+ ProductVariantInterface $productVariant,
): void {
$channel->getName()->willReturn('WEB');
@@ -119,7 +119,7 @@ function it_throws_a_channel_not_defined_exception_if_there_is_no_channel_pricin
function it_throws_a_channel_not_defined_exception_if_there_is_no_variant_price_for_given_channel_when_calculating_original_price(
ChannelInterface $channel,
ProductVariantInterface $productVariant,
- ChannelPricingInterface $channelPricing
+ ChannelPricingInterface $channelPricing,
): void {
$channel->getName()->willReturn('WEB');
diff --git a/src/Sylius/Component/Core/spec/Cart/Context/ShopBasedCartContextSpec.php b/src/Sylius/Component/Core/spec/Cart/Context/ShopBasedCartContextSpec.php
index 0a47ef46d24..5aae388f311 100644
--- a/src/Sylius/Component/Core/spec/Cart/Context/ShopBasedCartContextSpec.php
+++ b/src/Sylius/Component/Core/spec/Cart/Context/ShopBasedCartContextSpec.php
@@ -45,7 +45,7 @@ function it_creates_a_cart_if_does_not_exist_with_shop_basic_configuration(
OrderInterface $cart,
ChannelInterface $channel,
CurrencyInterface $currency,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$cartContext->getCart()->willReturn($cart);
@@ -72,7 +72,7 @@ function it_creates_a_cart_if_does_not_exist_with_shop_basic_configuration_and_c
OrderInterface $cart,
ChannelInterface $channel,
CurrencyInterface $currency,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$cartContext->getCart()->willReturn($cart);
@@ -98,7 +98,7 @@ function it_creates_a_cart_if_does_not_exist_with_shop_basic_configuration_and_c
function it_throws_a_cart_not_found_exception_if_channel_is_undefined(
CartContextInterface $cartContext,
ShopperContextInterface $shopperContext,
- OrderInterface $cart
+ OrderInterface $cart,
): void {
$cartContext->getCart()->willReturn($cart);
$shopperContext->getChannel()->willThrow(ChannelNotFoundException::class);
@@ -114,7 +114,7 @@ function it_throws_a_cart_not_found_exception_if_locale_code_is_undefined(
ShopperContextInterface $shopperContext,
ChannelInterface $channel,
CurrencyInterface $currency,
- OrderInterface $cart
+ OrderInterface $cart,
): void {
$cartContext->getCart()->willReturn($cart);
$shopperContext->getChannel()->willReturn($channel);
@@ -134,7 +134,7 @@ function it_caches_a_cart(
OrderInterface $cart,
ChannelInterface $channel,
CurrencyInterface $currency,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$cartContext->getCart()->shouldBeCalledTimes(1)->willReturn($cart);
@@ -162,7 +162,7 @@ function it_recreates_a_cart_after_it_is_reset(
OrderInterface $secondCart,
ChannelInterface $channel,
CurrencyInterface $currency,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$cartContext->getCart()->shouldBeCalledTimes(2)->willReturn($firstCart, $secondCart);
@@ -196,7 +196,7 @@ function it_sets_created_by_guest_flag_as_false_if_order_is_created_by_logged_in
OrderInterface $cart,
ChannelInterface $channel,
CurrencyInterface $currency,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$this->beConstructedWith($cartContext, $shopperContext, $createdByGuestFlagResolver);
@@ -229,7 +229,7 @@ function it_sets_created_by_guest_flag_as_true_if_order_is_created_by_anonymous_
OrderInterface $cart,
ChannelInterface $channel,
CurrencyInterface $currency,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$this->beConstructedWith($cartContext, $shopperContext, $createdByGuestFlagResolver);
diff --git a/src/Sylius/Component/Core/spec/Cart/Modifier/LimitingOrderItemQuantityModifierSpec.php b/src/Sylius/Component/Core/spec/Cart/Modifier/LimitingOrderItemQuantityModifierSpec.php
index 7fdfcce9fe4..dd1e9c4dd69 100644
--- a/src/Sylius/Component/Core/spec/Cart/Modifier/LimitingOrderItemQuantityModifierSpec.php
+++ b/src/Sylius/Component/Core/spec/Cart/Modifier/LimitingOrderItemQuantityModifierSpec.php
@@ -31,7 +31,7 @@ function it_implements_order_item_modifier_interface(): void
function it_restricts_max_item_quantity_to_the_stated_limit(
OrderItemQuantityModifierInterface $itemQuantityModifier,
- OrderItemInterface $orderItem
+ OrderItemInterface $orderItem,
): void {
$orderItem->getQuantity()->willReturn(0);
diff --git a/src/Sylius/Component/Core/spec/Cart/Resolver/CreatedByGuestFlagResolverSpec.php b/src/Sylius/Component/Core/spec/Cart/Resolver/CreatedByGuestFlagResolverSpec.php
index 07e3554b2df..525de9a6773 100644
--- a/src/Sylius/Component/Core/spec/Cart/Resolver/CreatedByGuestFlagResolverSpec.php
+++ b/src/Sylius/Component/Core/spec/Cart/Resolver/CreatedByGuestFlagResolverSpec.php
@@ -34,7 +34,7 @@ function it_implements_a_created_by_guest_flag_resolver_interface(): void
function it_returns_false_if_there_is_logged_in_customer(
TokenStorageInterface $tokenStorage,
TokenInterface $token,
- UserInterface $user
+ UserInterface $user,
): void {
$tokenStorage->getToken()->willReturn($token);
$token->getUser()->willReturn($user);
@@ -44,7 +44,7 @@ function it_returns_false_if_there_is_logged_in_customer(
function it_returns_true_if_order_is_created_by_anonymous_user(
TokenStorageInterface $tokenStorage,
- TokenInterface $token
+ TokenInterface $token,
): void {
$tokenStorage->getToken()->willReturn($token);
$token->getUser()->willReturn(null);
diff --git a/src/Sylius/Component/Core/spec/Checker/OrderPaymentMethodSelectionRequirementCheckerSpec.php b/src/Sylius/Component/Core/spec/Checker/OrderPaymentMethodSelectionRequirementCheckerSpec.php
index 6731ebf2909..7173956585a 100644
--- a/src/Sylius/Component/Core/spec/Checker/OrderPaymentMethodSelectionRequirementCheckerSpec.php
+++ b/src/Sylius/Component/Core/spec/Checker/OrderPaymentMethodSelectionRequirementCheckerSpec.php
@@ -36,7 +36,7 @@ function it_implements_order_payment_necessity_checker_interface(): void
function it_says_that_payment_method_has_to_be_selected_if_order_total_is_bigger_than_0(
OrderInterface $order,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$order->getTotal()->willReturn(1000);
$order->getChannel()->willReturn($channel);
@@ -54,7 +54,7 @@ function it_says_that_payment_method_does_not_have_to_be_selected_if_order_total
function it_says_that_payment_method_has_to_be_selected_if_skipping_payment_step_is_disabled(
OrderInterface $order,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$order->getTotal()->willReturn(1000);
$order->getChannel()->willReturn($channel);
@@ -69,7 +69,7 @@ function it_says_that_payment_method_does_not_have_to_be_selected_if_skipping_pa
ChannelInterface $channel,
PaymentInterface $payment,
PaymentMethodInterface $paymentMethod,
- PaymentMethodsResolverInterface $paymentMethodsResolver
+ PaymentMethodsResolverInterface $paymentMethodsResolver,
): void {
$order->getTotal()->willReturn(1000);
$order->getChannel()->willReturn($channel);
@@ -87,7 +87,7 @@ function it_says_that_payment_method_has_to_be_selected_if_skipping_payment_step
PaymentInterface $payment,
PaymentMethodInterface $paymentMethod1,
PaymentMethodInterface $paymentMethod2,
- PaymentMethodsResolverInterface $paymentMethodsResolver
+ PaymentMethodsResolverInterface $paymentMethodsResolver,
): void {
$order->getTotal()->willReturn(1000);
$order->getChannel()->willReturn($channel);
diff --git a/src/Sylius/Component/Core/spec/Checker/OrderShippingMethodSelectionRequirementCheckerSpec.php b/src/Sylius/Component/Core/spec/Checker/OrderShippingMethodSelectionRequirementCheckerSpec.php
index b8add60b035..26f08734ca9 100644
--- a/src/Sylius/Component/Core/spec/Checker/OrderShippingMethodSelectionRequirementCheckerSpec.php
+++ b/src/Sylius/Component/Core/spec/Checker/OrderShippingMethodSelectionRequirementCheckerSpec.php
@@ -35,7 +35,7 @@ function it_implements_order_shipping_necessity_checker_interface(): void
}
function it_says_that_shipping_method_do_not_have_to_be_selected_if_none_of_variants_from_order_requires_shipping(
- OrderInterface $order
+ OrderInterface $order,
): void {
$order->isShippingRequired()->willReturn(false);
@@ -47,7 +47,7 @@ function it_says_that_shipping_method_do_not_have_to_be_selected_if_order_varian
OrderInterface $order,
ShipmentInterface $shipment,
ShippingMethodInterface $shippingMethod,
- ShippingMethodsResolverInterface $shippingMethodsResolver
+ ShippingMethodsResolverInterface $shippingMethodsResolver,
): void {
$order->hasShipments()->willReturn(true);
@@ -64,7 +64,7 @@ function it_says_that_shipping_method_do_not_have_to_be_selected_if_order_varian
}
function it_says_that_shipping_method_have_to_be_selected_if_order_variants_require_shipping_and_order_has_not_shipments_yet(
- OrderInterface $order
+ OrderInterface $order,
): void {
$order->isShippingRequired()->willReturn(true);
@@ -75,7 +75,7 @@ function it_says_that_shipping_method_have_to_be_selected_if_order_variants_requ
function it_says_that_shipping_method_have_to_be_selected_if_order_variants_require_shipping_and_channel_does_not_allow_to_skip_shipping_step(
ChannelInterface $channel,
- OrderInterface $order
+ OrderInterface $order,
): void {
$order->isShippingRequired()->willReturn(true);
@@ -93,7 +93,7 @@ function it_says_that_shipping_method_have_to_be_selected_if_order_variants_requ
ShipmentInterface $shipment,
ShippingMethodInterface $firstShippingMethod,
ShippingMethodInterface $secondShippingMethod,
- ShippingMethodsResolverInterface $shippingMethodsResolver
+ ShippingMethodsResolverInterface $shippingMethodsResolver,
): void {
$order->isShippingRequired()->willReturn(true);
diff --git a/src/Sylius/Component/Core/spec/Context/ShopperContextSpec.php b/src/Sylius/Component/Core/spec/Context/ShopperContextSpec.php
index 5ce2364b563..5104cfef179 100644
--- a/src/Sylius/Component/Core/spec/Context/ShopperContextSpec.php
+++ b/src/Sylius/Component/Core/spec/Context/ShopperContextSpec.php
@@ -28,7 +28,7 @@ function let(
ChannelContextInterface $channelContext,
CurrencyContextInterface $currencyContext,
LocaleContextInterface $localeContext,
- CustomerContextInterface $customerContext
+ CustomerContextInterface $customerContext,
): void {
$this->beConstructedWith($channelContext, $currencyContext, $localeContext, $customerContext);
}
@@ -40,7 +40,7 @@ function it_implements_a_shopper_context_interface(): void
function it_gets_a_current_channel_from_a_context(
ChannelContextInterface $channelContext,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$channelContext->getChannel()->willReturn($channel);
@@ -63,7 +63,7 @@ function it_gets_a_current_locale_code_from_a_context(LocaleContextInterface $lo
function it_gets_a_current_customer_from_a_context(
CustomerContextInterface $customerContext,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$customerContext->getCustomer()->willReturn($customer);
diff --git a/src/Sylius/Component/Core/spec/Currency/Context/ChannelAwareCurrencyContextSpec.php b/src/Sylius/Component/Core/spec/Currency/Context/ChannelAwareCurrencyContextSpec.php
index 048b72ea724..3be407c63a2 100644
--- a/src/Sylius/Component/Core/spec/Currency/Context/ChannelAwareCurrencyContextSpec.php
+++ b/src/Sylius/Component/Core/spec/Currency/Context/ChannelAwareCurrencyContextSpec.php
@@ -36,7 +36,7 @@ function it_is_a_currency_context(): void
function it_returns_the_currency_code_from_decorated_context_if_it_is_available_in_current_channel(
CurrencyContextInterface $currencyContext,
ChannelContextInterface $channelContext,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$eur = new Currency();
$eur->setCode('EUR');
@@ -55,7 +55,7 @@ function it_returns_the_currency_code_from_decorated_context_if_it_is_available_
function it_returns_the_channels_base_currency_if_the_one_from_context_is_not_available(
CurrencyContextInterface $currencyContext,
ChannelContextInterface $channelContext,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$eur = new Currency();
$eur->setCode('EUR');
@@ -72,7 +72,7 @@ function it_returns_the_channels_base_currency_if_the_one_from_context_is_not_av
function it_returns_the_channels_base_currency_if_currency_was_not_found(
CurrencyContextInterface $currencyContext,
ChannelContextInterface $channelContext,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$eur = new Currency();
$eur->setCode('EUR');
diff --git a/src/Sylius/Component/Core/spec/Currency/Context/StorageBasedCurrencyContextSpec.php b/src/Sylius/Component/Core/spec/Currency/Context/StorageBasedCurrencyContextSpec.php
index ef6411438f9..756364ac12f 100644
--- a/src/Sylius/Component/Core/spec/Currency/Context/StorageBasedCurrencyContextSpec.php
+++ b/src/Sylius/Component/Core/spec/Currency/Context/StorageBasedCurrencyContextSpec.php
@@ -35,7 +35,7 @@ function it_is_a_currency_context(): void
function it_returns_an_available_active_currency(
ChannelContextInterface $channelContext,
CurrencyStorageInterface $currencyStorage,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$channelContext->getChannel()->willReturn($channel);
@@ -47,7 +47,7 @@ function it_returns_an_available_active_currency(
function it_throws_an_exception_if_storage_does_not_have_currency_code(
ChannelContextInterface $channelContext,
CurrencyStorageInterface $currencyStorage,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$channelContext->getChannel()->willReturn($channel);
diff --git a/src/Sylius/Component/Core/spec/Currency/CurrencyStorageSpec.php b/src/Sylius/Component/Core/spec/Currency/CurrencyStorageSpec.php
index 3ec9da9fc70..907341e42ca 100644
--- a/src/Sylius/Component/Core/spec/Currency/CurrencyStorageSpec.php
+++ b/src/Sylius/Component/Core/spec/Currency/CurrencyStorageSpec.php
@@ -34,7 +34,7 @@ function it_is_a_currency_storage(): void
function it_gets_a_currency_for_a_given_channel(
StorageInterface $storage,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$channel->getCode()->willReturn('web');
@@ -45,7 +45,7 @@ function it_gets_a_currency_for_a_given_channel(
function it_sets_a_currency_for_a_given_channel_if_it_is_one_of_the_available_ones_but_not_the_base_one(
StorageInterface $storage,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$usd = new Currency();
$usd->setCode('USD');
@@ -64,7 +64,7 @@ function it_sets_a_currency_for_a_given_channel_if_it_is_one_of_the_available_on
function it_removes_a_currency_for_a_given_channel_if_it_is_the_base_one(
StorageInterface $storage,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$usd = new Currency();
$usd->setCode('USD');
@@ -84,7 +84,7 @@ function it_removes_a_currency_for_a_given_channel_if_it_is_the_base_one(
function it_removes_a_currency_for_a_given_channel_if_it_is_not_available(
StorageInterface $storage,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$usd = new Currency();
$usd->setCode('USD');
diff --git a/src/Sylius/Component/Core/spec/Customer/CustomerOrderAddressesSaverSpec.php b/src/Sylius/Component/Core/spec/Customer/CustomerOrderAddressesSaverSpec.php
index f3d25f8a198..162a2a4e305 100644
--- a/src/Sylius/Component/Core/spec/Customer/CustomerOrderAddressesSaverSpec.php
+++ b/src/Sylius/Component/Core/spec/Customer/CustomerOrderAddressesSaverSpec.php
@@ -40,7 +40,7 @@ function it_saves_addresses_from_given_order(
CustomerInterface $customer,
ShopUserInterface $user,
AddressInterface $shippingAddress,
- AddressInterface $billingAddress
+ AddressInterface $billingAddress,
): void {
$order->getCustomer()->willReturn($customer);
$customer->getUser()->willReturn($user);
@@ -57,7 +57,7 @@ function it_saves_addresses_from_given_order(
function it_does_not_save_addresses_for_guest_order(
CustomerAddressAdderInterface $addressAdder,
OrderInterface $order,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$order->getCustomer()->willReturn($customer);
$customer->getUser()->willReturn(null);
@@ -72,7 +72,7 @@ function it_does_not_save_empty_addresses(
CustomerAddressAdderInterface $addressAdder,
OrderInterface $order,
CustomerInterface $customer,
- ShopUserInterface $user
+ ShopUserInterface $user,
): void {
$order->getCustomer()->willReturn($customer);
$customer->getUser()->willReturn($user);
diff --git a/src/Sylius/Component/Core/spec/Customer/CustomerUniqueAddressAdderSpec.php b/src/Sylius/Component/Core/spec/Customer/CustomerUniqueAddressAdderSpec.php
index 4d144cdd02e..995d70f92be 100644
--- a/src/Sylius/Component/Core/spec/Customer/CustomerUniqueAddressAdderSpec.php
+++ b/src/Sylius/Component/Core/spec/Customer/CustomerUniqueAddressAdderSpec.php
@@ -38,7 +38,7 @@ function it_does_nothing_when_an_address_is_already_present_on_the_customer(
CustomerInterface $customer,
AddressInterface $address,
Collection $addresses,
- \Iterator $iterator
+ \Iterator $iterator,
): void {
$iterator->rewind()->shouldBeCalled();
$iterator->valid()->willReturn(true);
@@ -59,7 +59,7 @@ function it_adds_an_address_when_no_other_is_present_on_the_customer(
CustomerInterface $customer,
AddressInterface $address,
Collection $addresses,
- \Iterator $iterator
+ \Iterator $iterator,
): void {
$iterator->rewind()->shouldBeCalled();
$iterator->valid()->willReturn(false);
@@ -69,7 +69,7 @@ function it_adds_an_address_when_no_other_is_present_on_the_customer(
$addressComparator->equal(
Argument::type(AddressInterface::class),
- Argument::type(AddressInterface::class)
+ Argument::type(AddressInterface::class),
)->shouldNotBeCalled();
$customer->addAddress($address)->shouldBeCalled();
@@ -83,7 +83,7 @@ function it_adds_an_address_when_different_than_the_ones_present_on_the_customer
AddressInterface $customerAddress,
AddressInterface $newAddress,
Collection $addresses,
- \Iterator $iterator
+ \Iterator $iterator,
): void {
$iterator->rewind()->shouldBeCalled();
$iterator->valid()->willReturn(true);
diff --git a/src/Sylius/Component/Core/spec/Customer/Statistics/CustomerStatisticsProviderSpec.php b/src/Sylius/Component/Core/spec/Customer/Statistics/CustomerStatisticsProviderSpec.php
index 72ad79d7e18..e22cd1cb662 100644
--- a/src/Sylius/Component/Core/spec/Customer/Statistics/CustomerStatisticsProviderSpec.php
+++ b/src/Sylius/Component/Core/spec/Customer/Statistics/CustomerStatisticsProviderSpec.php
@@ -39,7 +39,7 @@ function it_returns_an_empty_statistic_if_given_customer_does_not_have_any_order
OrderRepositoryInterface $orderRepository,
RepositoryInterface $channelRepository,
ChannelInterface $channel,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$expectedStatistics = new CustomerStatistics([]);
@@ -56,7 +56,7 @@ function it_obtains_customer_statistics_from_a_single_channel(
ChannelInterface $channelWithoutOrders,
OrderInterface $firstOrder,
OrderInterface $secondOrder,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$firstOrder->getChannel()->willReturn($channel);
$secondOrder->getChannel()->willReturn($channel);
@@ -84,7 +84,7 @@ function it_obtains_customer_statistics_from_multiple_channels(
OrderInterface $thirdOrder,
OrderInterface $fourthOrder,
OrderInterface $fifthOrder,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$allOrders = [$firstOrder, $secondOrder, $thirdOrder, $fourthOrder, $fifthOrder];
diff --git a/src/Sylius/Component/Core/spec/Dashboard/DashboardStatisticsProviderSpec.php b/src/Sylius/Component/Core/spec/Dashboard/DashboardStatisticsProviderSpec.php
index 9082b380954..53cd85fad47 100644
--- a/src/Sylius/Component/Core/spec/Dashboard/DashboardStatisticsProviderSpec.php
+++ b/src/Sylius/Component/Core/spec/Dashboard/DashboardStatisticsProviderSpec.php
@@ -35,7 +35,7 @@ function it_implements_a_dashboard_statistics_provider_interface(): void
function it_obtains_order_and_customer_statistics_by_given_channel(
OrderRepositoryInterface $orderRepository,
CustomerRepositoryInterface $customerRepository,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$expectedStats = new DashboardStatistics(450, 2, 6, $channel->getWrappedObject());
@@ -49,7 +49,7 @@ function it_obtains_order_and_customer_statistics_by_given_channel(
function it_obtains_order_and_customer_statistics_by_given_channel_and_period(
OrderRepositoryInterface $orderRepository,
CustomerRepositoryInterface $customerRepository,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$expectedStats = new DashboardStatistics(450, 2, 6);
diff --git a/src/Sylius/Component/Core/spec/Dashboard/SalesSummarySpec.php b/src/Sylius/Component/Core/spec/Dashboard/SalesSummarySpec.php
index 3fd76b69d99..f189b647d08 100644
--- a/src/Sylius/Component/Core/spec/Dashboard/SalesSummarySpec.php
+++ b/src/Sylius/Component/Core/spec/Dashboard/SalesSummarySpec.php
@@ -20,21 +20,21 @@ final class SalesSummarySpec extends ObjectBehavior
function let(): void
{
$this->beConstructedWith(
- [9 => 1200, 10 => 400, 11 => 500]
+ [9 => 1200, 10 => 400, 11 => 500],
);
}
function it_has_intervals_list(): void
{
$this->getIntervals()->shouldReturn(
- [9, 10, 11]
+ [9, 10, 11],
);
}
function it_has_sales_list(): void
{
$this->getSales()->shouldReturn(
- [1200, 400, 500]
+ [1200, 400, 500],
);
}
}
diff --git a/src/Sylius/Component/Core/spec/Exception/HandleExceptionSpec.php b/src/Sylius/Component/Core/spec/Exception/HandleExceptionSpec.php
index b9ca3dcd978..3b506a72e07 100644
--- a/src/Sylius/Component/Core/spec/Exception/HandleExceptionSpec.php
+++ b/src/Sylius/Component/Core/spec/Exception/HandleExceptionSpec.php
@@ -33,8 +33,8 @@ function it_has_a_message(): void
$this->getMessage()->shouldReturn(
sprintf(
'%s was unable to handle this request. request does not have locale code',
- HandleException::class
- )
+ HandleException::class,
+ ),
);
}
}
diff --git a/src/Sylius/Component/Core/spec/Factory/AddressFactorySpec.php b/src/Sylius/Component/Core/spec/Factory/AddressFactorySpec.php
index d2d24f77665..48aac435886 100644
--- a/src/Sylius/Component/Core/spec/Factory/AddressFactorySpec.php
+++ b/src/Sylius/Component/Core/spec/Factory/AddressFactorySpec.php
@@ -46,7 +46,7 @@ function it_creates_a_new_address(FactoryInterface $decoratedFactory, AddressInt
function it_creates_a_new_address_with_customer(
FactoryInterface $decoratedFactory,
AddressInterface $address,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$decoratedFactory->createNew()->willReturn($address);
diff --git a/src/Sylius/Component/Core/spec/Factory/CartItemFactorySpec.php b/src/Sylius/Component/Core/spec/Factory/CartItemFactorySpec.php
index 68ca8c3411e..f2f89c1a463 100644
--- a/src/Sylius/Component/Core/spec/Factory/CartItemFactorySpec.php
+++ b/src/Sylius/Component/Core/spec/Factory/CartItemFactorySpec.php
@@ -51,7 +51,7 @@ function it_creates_a_cart_item_and_assigns_a_product_variant(
ProductVariantResolverInterface $variantResolver,
OrderItemInterface $cartItem,
ProductInterface $product,
- ProductVariantInterface $productVariant
+ ProductVariantInterface $productVariant,
): void {
$decoratedFactory->createNew()->willReturn($cartItem);
$variantResolver->getVariant($product)->willReturn($productVariant);
@@ -64,7 +64,7 @@ function it_creates_a_cart_item_and_assigns_a_product_variant(
function it_creates_a_cart_item_for_given_cart(
FactoryInterface $decoratedFactory,
OrderItemInterface $cartItem,
- OrderInterface $order
+ OrderInterface $order,
): void {
$decoratedFactory->createNew()->willReturn($cartItem);
diff --git a/src/Sylius/Component/Core/spec/Factory/CustomerAfterCheckoutFactorySpec.php b/src/Sylius/Component/Core/spec/Factory/CustomerAfterCheckoutFactorySpec.php
index dc57f152ab8..423dbe57e56 100644
--- a/src/Sylius/Component/Core/spec/Factory/CustomerAfterCheckoutFactorySpec.php
+++ b/src/Sylius/Component/Core/spec/Factory/CustomerAfterCheckoutFactorySpec.php
@@ -49,7 +49,7 @@ function it_creates_a_new_customer_after_checkout(
CustomerInterface $guest,
OrderInterface $order,
AddressInterface $address,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$order->getCustomer()->willReturn($guest);
$order->getBillingAddress()->willReturn($address);
diff --git a/src/Sylius/Component/Core/spec/Factory/PaymentMethodFactorySpec.php b/src/Sylius/Component/Core/spec/Factory/PaymentMethodFactorySpec.php
index 5f0416ed08a..1ce9344ee00 100644
--- a/src/Sylius/Component/Core/spec/Factory/PaymentMethodFactorySpec.php
+++ b/src/Sylius/Component/Core/spec/Factory/PaymentMethodFactorySpec.php
@@ -35,7 +35,7 @@ function it_creates_payment_method_with_specific_gateway(
FactoryInterface $decoratedFactory,
FactoryInterface $gatewayConfigFactory,
GatewayConfigInterface $gatewayConfig,
- PaymentMethodInterface $paymentMethod
+ PaymentMethodInterface $paymentMethod,
): void {
$gatewayConfigFactory->createNew()->willReturn($gatewayConfig);
$gatewayConfig->setFactoryName('offline')->shouldBeCalled();
diff --git a/src/Sylius/Component/Core/spec/Factory/PromotionActionFactorySpec.php b/src/Sylius/Component/Core/spec/Factory/PromotionActionFactorySpec.php
index fd2bc911edc..d77e93e1e67 100644
--- a/src/Sylius/Component/Core/spec/Factory/PromotionActionFactorySpec.php
+++ b/src/Sylius/Component/Core/spec/Factory/PromotionActionFactorySpec.php
@@ -37,7 +37,7 @@ function it_implements_an_action_factory_interface(): void
function it_creates_a_new_action_with_a_default_action_factory(
FactoryInterface $decoratedFactory,
- PromotionActionInterface $promotionAction
+ PromotionActionInterface $promotionAction,
): void {
$decoratedFactory->createNew()->willReturn($promotionAction);
@@ -46,7 +46,7 @@ function it_creates_a_new_action_with_a_default_action_factory(
function it_creates_a_new_fixed_discount_action_with_a_given_base_amount(
FactoryInterface $decoratedFactory,
- PromotionActionInterface $promotionAction
+ PromotionActionInterface $promotionAction,
): void {
$decoratedFactory->createNew()->willReturn($promotionAction);
@@ -58,7 +58,7 @@ function it_creates_a_new_fixed_discount_action_with_a_given_base_amount(
function it_creates_an_unit_fixed_discount_action_with_a_given_base_amount(
FactoryInterface $decoratedFactory,
- PromotionActionInterface $promotionAction
+ PromotionActionInterface $promotionAction,
): void {
$decoratedFactory->createNew()->willReturn($promotionAction);
@@ -70,7 +70,7 @@ function it_creates_an_unit_fixed_discount_action_with_a_given_base_amount(
function it_creates_a_percentage_discount_action_with_a_given_discount_rate(
FactoryInterface $decoratedFactory,
- PromotionActionInterface $promotionAction
+ PromotionActionInterface $promotionAction,
): void {
$decoratedFactory->createNew()->willReturn($promotionAction);
@@ -82,7 +82,7 @@ function it_creates_a_percentage_discount_action_with_a_given_discount_rate(
function it_creates_an_unit_percentage_discount_action_with_given_a_discount_rate(
FactoryInterface $decoratedFactory,
- PromotionActionInterface $promotionAction
+ PromotionActionInterface $promotionAction,
): void {
$decoratedFactory->createNew()->willReturn($promotionAction);
@@ -94,7 +94,7 @@ function it_creates_an_unit_percentage_discount_action_with_given_a_discount_rat
function it_creates_a_shipping_percentage_discount_action_with_a_given_discount_rate(
FactoryInterface $decoratedFactory,
- PromotionActionInterface $promotionAction
+ PromotionActionInterface $promotionAction,
): void {
$decoratedFactory->createNew()->willReturn($promotionAction);
diff --git a/src/Sylius/Component/Core/spec/Factory/PromotionRuleFactorySpec.php b/src/Sylius/Component/Core/spec/Factory/PromotionRuleFactorySpec.php
index 0983f86f23a..2f00ee4904f 100644
--- a/src/Sylius/Component/Core/spec/Factory/PromotionRuleFactorySpec.php
+++ b/src/Sylius/Component/Core/spec/Factory/PromotionRuleFactorySpec.php
@@ -38,7 +38,7 @@ function it_implements_a_rule_factory_interface(): void
function it_uses_a_decorated_factory_to_create_new_rule_object(
FactoryInterface $decoratedFactory,
- PromotionRuleInterface $rule
+ PromotionRuleInterface $rule,
): void {
$decoratedFactory->createNew()->willReturn($rule);
@@ -74,7 +74,7 @@ function it_creates_a_has_taxon_rule(FactoryInterface $decoratedFactory, Promoti
function it_creates_a_total_of_items_from_taxon_rule(
FactoryInterface $decoratedFactory,
- PromotionRuleInterface $rule
+ PromotionRuleInterface $rule,
): void {
$decoratedFactory->createNew()->willReturn($rule);
$rule->setType(TotalOfItemsFromTaxonRuleChecker::TYPE)->shouldBeCalled();
diff --git a/src/Sylius/Component/Core/spec/Inventory/Operator/OrderInventoryOperatorSpec.php b/src/Sylius/Component/Core/spec/Inventory/Operator/OrderInventoryOperatorSpec.php
index 452916ff814..6395ae90884 100644
--- a/src/Sylius/Component/Core/spec/Inventory/Operator/OrderInventoryOperatorSpec.php
+++ b/src/Sylius/Component/Core/spec/Inventory/Operator/OrderInventoryOperatorSpec.php
@@ -32,7 +32,7 @@ function it_implements_an_order_inventory_operator_interface(): void
function it_increases_on_hold_quantity_during_holding(
OrderInterface $order,
OrderItemInterface $orderItem,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$order->getItems()->willReturn(new ArrayCollection([$orderItem->getWrappedObject()]));
$orderItem->getVariant()->willReturn($variant);
@@ -49,7 +49,7 @@ function it_increases_on_hold_quantity_during_holding(
function it_decreases_on_hold_and_on_hand_during_selling(
OrderInterface $order,
OrderItemInterface $orderItem,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$order->getItems()->willReturn(new ArrayCollection([$orderItem->getWrappedObject()]));
$orderItem->getVariant()->willReturn($variant);
@@ -70,7 +70,7 @@ function it_decreases_on_hold_and_on_hand_during_selling(
function it_decreases_on_hold_quantity_during_cancelling(
OrderInterface $order,
OrderItemInterface $orderItem,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$order->getPaymentState()->willReturn(OrderPaymentStates::STATE_AWAITING_PAYMENT);
$order->getItems()->willReturn(new ArrayCollection([$orderItem->getWrappedObject()]));
@@ -90,7 +90,7 @@ function it_decreases_on_hold_quantity_during_cancelling(
function it_increases_on_hand_during_cancelling_of_a_paid_order(
OrderInterface $order,
OrderItemInterface $orderItem,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$order->getPaymentState()->willReturn(OrderPaymentStates::STATE_PAID);
$order->getItems()->willReturn(new ArrayCollection([$orderItem->getWrappedObject()]));
@@ -108,7 +108,7 @@ function it_increases_on_hand_during_cancelling_of_a_paid_order(
function it_increases_on_hand_during_cancelling_of_a_refunded_order(
OrderInterface $order,
OrderItemInterface $orderItem,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$order->getPaymentState()->willReturn(OrderPaymentStates::STATE_REFUNDED);
$order->getItems()->willReturn(new ArrayCollection([$orderItem->getWrappedObject()]));
@@ -126,7 +126,7 @@ function it_increases_on_hand_during_cancelling_of_a_refunded_order(
function it_throws_an_invalid_argument_exception_if_difference_between_on_hold_and_item_quantity_is_smaller_than_zero_during_cancelling(
OrderInterface $order,
OrderItemInterface $orderItem,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$order->getPaymentState()->willReturn(OrderPaymentStates::STATE_AWAITING_PAYMENT);
@@ -145,7 +145,7 @@ function it_throws_an_invalid_argument_exception_if_difference_between_on_hold_a
function it_throws_an_invalid_argument_exception_if_difference_between_on_hold_and_item_quantity_is_smaller_than_zero_during_selling(
OrderInterface $order,
OrderItemInterface $orderItem,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$order->getItems()->willReturn(new ArrayCollection([$orderItem->getWrappedObject()]));
$orderItem->getVariant()->willReturn($variant);
@@ -162,7 +162,7 @@ function it_throws_an_invalid_argument_exception_if_difference_between_on_hold_a
function it_throws_an_invalid_argument_exception_if_difference_between_on_hand_and_item_quantity_is_smaller_than_zero_during_selling(
OrderInterface $order,
OrderItemInterface $orderItem,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$order->getItems()->willReturn(new ArrayCollection([$orderItem->getWrappedObject()]));
$orderItem->getVariant()->willReturn($variant);
@@ -180,7 +180,7 @@ function it_throws_an_invalid_argument_exception_if_difference_between_on_hand_a
function it_does_nothing_if_variant_is_not_tracked_during_cancelling(
OrderInterface $order,
OrderItemInterface $orderItem,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$order->getPaymentState()->willReturn(OrderPaymentStates::STATE_AWAITING_PAYMENT);
$order->getItems()->willReturn(new ArrayCollection([$orderItem->getWrappedObject()]));
@@ -195,7 +195,7 @@ function it_does_nothing_if_variant_is_not_tracked_during_cancelling(
function it_does_nothing_if_variant_is_not_tracked_and_order_is_paid_during_cancelling(
OrderInterface $order,
OrderItemInterface $orderItem,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$order->getPaymentState()->willReturn(OrderPaymentStates::STATE_PAID);
$order->getItems()->willReturn(new ArrayCollection([$orderItem->getWrappedObject()]));
@@ -210,7 +210,7 @@ function it_does_nothing_if_variant_is_not_tracked_and_order_is_paid_during_canc
function it_does_nothing_if_variant_is_not_tracked_during_holding(
OrderInterface $order,
OrderItemInterface $orderItem,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$order->getItems()->willReturn(new ArrayCollection([$orderItem->getWrappedObject()]));
$orderItem->getVariant()->willReturn($variant);
@@ -224,7 +224,7 @@ function it_does_nothing_if_variant_is_not_tracked_during_holding(
function it_does_nothing_if_variant_is_not_tracked_during_selling(
OrderInterface $order,
OrderItemInterface $orderItem,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$order->getItems()->willReturn(new ArrayCollection([$orderItem->getWrappedObject()]));
$orderItem->getVariant()->willReturn($variant);
diff --git a/src/Sylius/Component/Core/spec/Locale/Context/StorageBasedLocaleContextSpec.php b/src/Sylius/Component/Core/spec/Locale/Context/StorageBasedLocaleContextSpec.php
index 0b55996d389..6d8f252d981 100644
--- a/src/Sylius/Component/Core/spec/Locale/Context/StorageBasedLocaleContextSpec.php
+++ b/src/Sylius/Component/Core/spec/Locale/Context/StorageBasedLocaleContextSpec.php
@@ -26,7 +26,7 @@ final class StorageBasedLocaleContextSpec extends ObjectBehavior
function let(
ChannelContextInterface $channelContext,
LocaleStorageInterface $localeStorage,
- LocaleProviderInterface $localeProvider
+ LocaleProviderInterface $localeProvider,
): void {
$this->beConstructedWith($channelContext, $localeStorage, $localeProvider);
}
@@ -40,7 +40,7 @@ function it_returns_an_available_active_locale(
ChannelContextInterface $channelContext,
LocaleStorageInterface $localeStorage,
LocaleProviderInterface $localeProvider,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$channelContext->getChannel()->willReturn($channel);
@@ -55,7 +55,7 @@ function it_throws_an_exception_if_locale_taken_from_storage_is_not_available(
ChannelContextInterface $channelContext,
LocaleStorageInterface $localeStorage,
LocaleProviderInterface $localeProvider,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$channelContext->getChannel()->willReturn($channel);
diff --git a/src/Sylius/Component/Core/spec/Locale/LocaleStorageSpec.php b/src/Sylius/Component/Core/spec/Locale/LocaleStorageSpec.php
index 8a94deee7f8..53d43afa13c 100644
--- a/src/Sylius/Component/Core/spec/Locale/LocaleStorageSpec.php
+++ b/src/Sylius/Component/Core/spec/Locale/LocaleStorageSpec.php
@@ -51,7 +51,7 @@ function it_gets_a_locale_for_a_given_channel(StorageInterface $storage, Channel
function it_throws_a_locale_not_found_exception_if_storage_does_not_have_locale_code_for_given_channel(
StorageInterface $storage,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$channel->getCode()->willReturn('web');
diff --git a/src/Sylius/Component/Core/spec/Model/OrderItemSpec.php b/src/Sylius/Component/Core/spec/Model/OrderItemSpec.php
index 9b709276ce3..42ae725fc78 100644
--- a/src/Sylius/Component/Core/spec/Model/OrderItemSpec.php
+++ b/src/Sylius/Component/Core/spec/Model/OrderItemSpec.php
@@ -49,7 +49,7 @@ function it_returns_tax_of_all_units_and_both_neutral_and_non_neutral_tax_adjust
OrderItemUnitInterface $orderItemUnit1,
OrderItemUnitInterface $orderItemUnit2,
AdjustmentInterface $nonNeutralTaxAdjustment,
- AdjustmentInterface $neutralTaxAdjustment
+ AdjustmentInterface $neutralTaxAdjustment,
): void {
$orderItemUnit1->getTotal()->willReturn(1200);
$orderItemUnit1->getTaxTotal()->willReturn(200);
@@ -77,7 +77,7 @@ function it_returns_tax_of_all_units_and_both_neutral_and_non_neutral_tax_adjust
}
function it_returns_discounted_unit_price_which_is_first_unit_price_lowered_by_unit_promotions(
- OrderItemUnitInterface $unit
+ OrderItemUnitInterface $unit,
): void {
$this->setUnitPrice(10000);
@@ -99,7 +99,7 @@ function it_returns_unit_price_as_discounted_unit_price_if_there_are_no_units():
function it_returns_subtotal_which_consist_of_discounted_unit_price_multiplied_by_quantity(
OrderItemUnitInterface $firstUnit,
- OrderItemUnitInterface $secondUnit
+ OrderItemUnitInterface $secondUnit,
): void {
$this->setUnitPrice(10000);
diff --git a/src/Sylius/Component/Core/spec/Model/OrderItemUnitSpec.php b/src/Sylius/Component/Core/spec/Model/OrderItemUnitSpec.php
index 3932fce8726..3f6fd7b7884 100644
--- a/src/Sylius/Component/Core/spec/Model/OrderItemUnitSpec.php
+++ b/src/Sylius/Component/Core/spec/Model/OrderItemUnitSpec.php
@@ -93,7 +93,7 @@ function it_returns_0_tax_total_when_there_are_no_tax_adjustments(): void
function it_returns_a_sum_of_neutral_and_non_neutral_tax_adjustments_as_tax_total(
OrderItemInterface $orderItem,
AdjustmentInterface $nonNeutralTaxAdjustment,
- AdjustmentInterface $neutralTaxAdjustment
+ AdjustmentInterface $neutralTaxAdjustment,
): void {
$neutralTaxAdjustment->isNeutral()->willReturn(true);
$neutralTaxAdjustment->getType()->willReturn(AdjustmentInterface::TAX_ADJUSTMENT);
@@ -115,7 +115,7 @@ function it_returns_only_sum_of_neutral_and_non_neutral_tax_adjustments_as_tax_t
OrderItemInterface $orderItem,
AdjustmentInterface $nonNeutralTaxAdjustment,
AdjustmentInterface $neutralTaxAdjustment,
- AdjustmentInterface $notTaxAdjustment
+ AdjustmentInterface $notTaxAdjustment,
): void {
$neutralTaxAdjustment->isNeutral()->willReturn(true);
$neutralTaxAdjustment->getType()->willReturn(AdjustmentInterface::TAX_ADJUSTMENT);
diff --git a/src/Sylius/Component/Core/spec/Model/OrderSpec.php b/src/Sylius/Component/Core/spec/Model/OrderSpec.php
index 66918659b5f..268173d8bad 100644
--- a/src/Sylius/Component/Core/spec/Model/OrderSpec.php
+++ b/src/Sylius/Component/Core/spec/Model/OrderSpec.php
@@ -144,7 +144,7 @@ function it_removes_shipments(ShipmentInterface $shipment): void
function it_returns_shipping_adjustments(
AdjustmentInterface $shippingAdjustment,
- AdjustmentInterface $taxAdjustment
+ AdjustmentInterface $taxAdjustment,
): void {
$shippingAdjustment->getType()->willReturn(AdjustmentInterface::SHIPPING_ADJUSTMENT);
$shippingAdjustment->setAdjustable($this)->shouldBeCalled();
@@ -166,7 +166,7 @@ function it_returns_shipping_adjustments(
function it_removes_shipping_adjustments(
AdjustmentInterface $shippingAdjustment,
- AdjustmentInterface $taxAdjustment
+ AdjustmentInterface $taxAdjustment,
): void {
$shippingAdjustment->getType()->willReturn(AdjustmentInterface::SHIPPING_ADJUSTMENT);
$shippingAdjustment->setAdjustable($this)->shouldBeCalled();
@@ -191,7 +191,7 @@ function it_removes_shipping_adjustments(
function it_returns_tax_adjustments(
AdjustmentInterface $shippingAdjustment,
- AdjustmentInterface $taxAdjustment
+ AdjustmentInterface $taxAdjustment,
): void {
$shippingAdjustment->getType()->willReturn(AdjustmentInterface::SHIPPING_ADJUSTMENT);
$shippingAdjustment->setAdjustable($this)->shouldBeCalled();
@@ -213,7 +213,7 @@ function it_returns_tax_adjustments(
function it_removes_tax_adjustments(
AdjustmentInterface $shippingAdjustment,
- AdjustmentInterface $taxAdjustment
+ AdjustmentInterface $taxAdjustment,
): void {
$shippingAdjustment->getType()->willReturn(AdjustmentInterface::SHIPPING_ADJUSTMENT);
$shippingAdjustment->setAdjustable($this)->shouldBeCalled();
@@ -287,7 +287,7 @@ function it_returns_last_payment_with_given_state(
PaymentInterface $payment1,
PaymentInterface $payment2,
PaymentInterface $payment3,
- PaymentInterface $payment4
+ PaymentInterface $payment4,
): void {
$payment1->getState()->willReturn(PaymentInterface::STATE_CART);
$payment1->setOrder($this)->shouldBeCalled();
@@ -318,7 +318,7 @@ function it_returns_last_payment_with_any_state_if_there_is_no_target_state_spec
PaymentInterface $payment1,
PaymentInterface $payment2,
PaymentInterface $payment3,
- PaymentInterface $payment4
+ PaymentInterface $payment4,
): void {
$payment1->getState()->willReturn(PaymentInterface::STATE_CART);
$payment1->setOrder($this)->shouldBeCalled();
@@ -391,7 +391,7 @@ function it_returns_0_tax_total_when_there_are_no_items_and_adjustments(): void
function it_returns_a_tax_of_all_items_as_tax_total_when_there_are_no_tax_adjustments(
OrderItemInterface $orderItem1,
- OrderItemInterface $orderItem2
+ OrderItemInterface $orderItem2,
): void {
$orderItem1->getTotal()->willReturn(1100);
$orderItem1->getTaxTotal()->willReturn(100);
@@ -410,7 +410,7 @@ function it_returns_a_tax_of_all_items_and_non_neutral_shipping_tax_as_tax_total
OrderItemInterface $orderItem1,
OrderItemInterface $orderItem2,
AdjustmentInterface $shippingAdjustment,
- AdjustmentInterface $shippingTaxAdjustment
+ AdjustmentInterface $shippingTaxAdjustment,
): void {
$orderItem1->getTotal()->willReturn(1100);
$orderItem1->getTaxTotal()->willReturn(100);
@@ -442,7 +442,7 @@ function it_returns_a_tax_of_all_items_and_neutral_shipping_tax_as_tax_total(
OrderItemInterface $orderItem1,
OrderItemInterface $orderItem2,
AdjustmentInterface $shippingAdjustment,
- AdjustmentInterface $shippingTaxAdjustment
+ AdjustmentInterface $shippingTaxAdjustment,
): void {
$orderItem1->getTotal()->willReturn(1100);
$orderItem1->getTaxTotal()->willReturn(100);
@@ -472,7 +472,7 @@ function it_returns_a_tax_of_all_items_and_neutral_shipping_tax_as_tax_total(
function it_includes_a_non_neutral_tax_adjustments_in_shipping_total(
AdjustmentInterface $shippingAdjustment,
- AdjustmentInterface $shippingTaxAdjustment
+ AdjustmentInterface $shippingTaxAdjustment,
): void {
$shippingAdjustment->getType()->willReturn(AdjustmentInterface::SHIPPING_ADJUSTMENT);
$shippingAdjustment->isNeutral()->willReturn(false);
@@ -493,7 +493,7 @@ function it_includes_a_non_neutral_tax_adjustments_in_shipping_total(
function it_returns_a_shipping_total_decreased_by_shipping_promotion(
AdjustmentInterface $shippingAdjustment,
AdjustmentInterface $shippingTaxAdjustment,
- AdjustmentInterface $shippingPromotionAdjustment
+ AdjustmentInterface $shippingPromotionAdjustment,
): void {
$shippingAdjustment->getType()->willReturn(AdjustmentInterface::SHIPPING_ADJUSTMENT);
$shippingAdjustment->isNeutral()->willReturn(false);
@@ -519,7 +519,7 @@ function it_returns_a_shipping_total_decreased_by_shipping_promotion(
function it_does_not_include_neutral_tax_adjustments_in_shipping_total(
AdjustmentInterface $shippingAdjustment,
- AdjustmentInterface $neutralShippingTaxAdjustment
+ AdjustmentInterface $neutralShippingTaxAdjustment,
): void {
$shippingAdjustment->getType()->willReturn(AdjustmentInterface::SHIPPING_ADJUSTMENT);
$shippingAdjustment->isNeutral()->willReturn(false);
@@ -550,7 +550,7 @@ function it_returns_a_sum_of_all_order_promotion_adjustments_order_item_promotio
AdjustmentInterface $orderItemAdjustment1,
AdjustmentInterface $orderItemAdjustment2,
AdjustmentInterface $orderUnitAdjustment1,
- AdjustmentInterface $orderUnitAdjustment2
+ AdjustmentInterface $orderUnitAdjustment2,
): void {
$orderAdjustment1->getType()->willReturn(AdjustmentInterface::ORDER_PROMOTION_ADJUSTMENT);
$orderAdjustment1->getAmount()->willReturn(-400);
@@ -614,7 +614,7 @@ function it_does_not_include_a_shipping_promotion_adjustment_in_order_promotion_
AdjustmentInterface $orderAdjustment,
AdjustmentInterface $orderItemAdjustment,
AdjustmentInterface $orderUnitAdjustment,
- OrderItemInterface $orderItem
+ OrderItemInterface $orderItem,
): void {
$orderAdjustment->getType()->willReturn(AdjustmentInterface::ORDER_PROMOTION_ADJUSTMENT);
$orderAdjustment->getAmount()->willReturn(-400);
@@ -662,7 +662,7 @@ function it_includes_order_promotion_adjustments_order_item_promotion_adjustment
AdjustmentInterface $orderItemAdjustmentForOrder,
AdjustmentInterface $orderItemAdjustmentForItem,
AdjustmentInterface $orderUnitAdjustmentForOrder,
- AdjustmentInterface $orderUnitAdjustmentForItem
+ AdjustmentInterface $orderUnitAdjustmentForItem,
): void {
$orderAdjustmentForOrder->getType()->willReturn(AdjustmentInterface::ORDER_PROMOTION_ADJUSTMENT);
$orderAdjustmentForOrder->getAmount()->willReturn(-120);
diff --git a/src/Sylius/Component/Core/spec/Model/ProductVariantSpec.php b/src/Sylius/Component/Core/spec/Model/ProductVariantSpec.php
index 6664c0d027e..49762a6b2dd 100644
--- a/src/Sylius/Component/Core/spec/Model/ProductVariantSpec.php
+++ b/src/Sylius/Component/Core/spec/Model/ProductVariantSpec.php
@@ -189,7 +189,7 @@ function it_adds_and_removes_channel_pricings(ChannelPricingInterface $channelPr
function it_has_channel_pricings_collection(
ChannelPricingInterface $firstChannelPricing,
- ChannelPricingInterface $secondChannelPricing
+ ChannelPricingInterface $secondChannelPricing,
): void {
$firstChannelPricing->getChannelCode()->willReturn('WEB');
$secondChannelPricing->getChannelCode()->willReturn('MOB');
@@ -209,7 +209,7 @@ function it_has_channel_pricings_collection(
function it_checks_if_contains_channel_pricing_for_given_channel(
ChannelInterface $firstChannel,
ChannelInterface $secondChannel,
- ChannelPricingInterface $firstChannelPricing
+ ChannelPricingInterface $firstChannelPricing,
): void {
$firstChannelPricing->getChannelCode()->willReturn('WEB');
$firstChannel->getCode()->willReturn('WEB');
@@ -226,7 +226,7 @@ function it_checks_if_contains_channel_pricing_for_given_channel(
function it_returns_channel_pricing_for_given_channel(
ChannelInterface $channel,
- ChannelPricingInterface $channelPricing
+ ChannelPricingInterface $channelPricing,
): void {
$channelPricing->getChannelCode()->willReturn('WEB');
$channel->getCode()->willReturn('WEB');
diff --git a/src/Sylius/Component/Core/spec/Model/ShipmentSpec.php b/src/Sylius/Component/Core/spec/Model/ShipmentSpec.php
index 622a4ae7296..a5d7600401b 100644
--- a/src/Sylius/Component/Core/spec/Model/ShipmentSpec.php
+++ b/src/Sylius/Component/Core/spec/Model/ShipmentSpec.php
@@ -72,7 +72,7 @@ function it_adds_and_removes_adjustments(AdjustmentInterface $adjustment, OrderI
function it_does_not_remove_adjustment_when_it_is_locked(
AdjustmentInterface $adjustment,
- OrderInterface $order
+ OrderInterface $order,
): void {
$this->setOrder($order);
@@ -95,7 +95,7 @@ function it_has_correct_adjustments_total_after_adjustment_add_and_remove(
AdjustmentInterface $adjustment2,
AdjustmentInterface $adjustment3,
AdjustmentInterface $adjustment4,
- OrderInterface $order
+ OrderInterface $order,
): void {
$this->setOrder($order);
diff --git a/src/Sylius/Component/Core/spec/Order/OrderItemNamesSetterSpec.php b/src/Sylius/Component/Core/spec/Order/OrderItemNamesSetterSpec.php
index 3fcd2b066e3..7c7c3d8d1e2 100644
--- a/src/Sylius/Component/Core/spec/Order/OrderItemNamesSetterSpec.php
+++ b/src/Sylius/Component/Core/spec/Order/OrderItemNamesSetterSpec.php
@@ -36,7 +36,7 @@ function it_sets_product_and_product_variant_names_on_order_items(
ProductVariantInterface $variant,
ProductVariantTranslationInterface $variantTranslation,
ProductInterface $product,
- ProductTranslationInterface $productTranslation
+ ProductTranslationInterface $productTranslation,
): void {
$order->getLocaleCode()->willReturn('en_US');
$order->getItems()->willReturn(new ArrayCollection([$orderItem->getWrappedObject()]));
diff --git a/src/Sylius/Component/Core/spec/OrderProcessing/OrderPaymentProcessorSpec.php b/src/Sylius/Component/Core/spec/OrderProcessing/OrderPaymentProcessorSpec.php
index 2ebbe75a79d..754766e0109 100644
--- a/src/Sylius/Component/Core/spec/OrderProcessing/OrderPaymentProcessorSpec.php
+++ b/src/Sylius/Component/Core/spec/OrderProcessing/OrderPaymentProcessorSpec.php
@@ -48,7 +48,7 @@ function it_removes_cart_payments_from_order_if_its_total_is_zero(
OrderInterface $order,
PaymentInterface $cartPayment,
PaymentInterface $cancelledPayment,
- Collection $payments
+ Collection $payments,
): void {
$order->getState()->willReturn(OrderInterface::STATE_CART);
$order->getTotal()->willReturn(0);
@@ -75,7 +75,7 @@ function it_does_nothing_if_the_order_is_cancelled(OrderInterface $order): void
function it_sets_last_order_currency_with_target_state_currency_code_and_amount(
OrderInterface $order,
- PaymentInterface $payment
+ PaymentInterface $payment,
): void {
$order->getState()->willReturn(OrderInterface::STATE_CART);
$order->getLastPayment(PaymentInterface::STATE_CART)->willReturn($payment);
@@ -92,7 +92,7 @@ function it_sets_last_order_currency_with_target_state_currency_code_and_amount(
function it_sets_provided_order_payment_if_it_is_not_null(
OrderInterface $order,
OrderPaymentProviderInterface $orderPaymentProvider,
- PaymentInterface $payment
+ PaymentInterface $payment,
): void {
$order->getTotal()->willReturn(10);
$order->getState()->willReturn(OrderInterface::STATE_CART);
@@ -106,7 +106,7 @@ function it_sets_provided_order_payment_if_it_is_not_null(
function it_does_not_set_order_payment_if_it_cannot_be_provided(
OrderInterface $order,
- OrderPaymentProviderInterface $orderPaymentProvider
+ OrderPaymentProviderInterface $orderPaymentProvider,
): void {
$order->getTotal()->willReturn(10);
$order->getState()->willReturn(OrderInterface::STATE_CART);
diff --git a/src/Sylius/Component/Core/spec/OrderProcessing/OrderPricesRecalculatorSpec.php b/src/Sylius/Component/Core/spec/OrderProcessing/OrderPricesRecalculatorSpec.php
index 6eb341361fb..eb80b7d45fa 100644
--- a/src/Sylius/Component/Core/spec/OrderProcessing/OrderPricesRecalculatorSpec.php
+++ b/src/Sylius/Component/Core/spec/OrderProcessing/OrderPricesRecalculatorSpec.php
@@ -44,7 +44,7 @@ function it_recalculates_prices_adding_customer_to_the_context(
OrderInterface $order,
OrderItemInterface $item,
ProductVariantInterface $variant,
- ProductVariantPriceCalculatorInterface $productVariantPriceCalculator
+ ProductVariantPriceCalculatorInterface $productVariantPriceCalculator,
): void {
$order->getCustomer()->willReturn($customer);
$order->getChannel()->willReturn(null);
diff --git a/src/Sylius/Component/Core/spec/OrderProcessing/OrderShipmentProcessorSpec.php b/src/Sylius/Component/Core/spec/OrderProcessing/OrderShipmentProcessorSpec.php
index 65b38c533fd..f6202d80b50 100644
--- a/src/Sylius/Component/Core/spec/OrderProcessing/OrderShipmentProcessorSpec.php
+++ b/src/Sylius/Component/Core/spec/OrderProcessing/OrderShipmentProcessorSpec.php
@@ -34,7 +34,7 @@ final class OrderShipmentProcessorSpec extends ObjectBehavior
function let(
DefaultShippingMethodResolverInterface $defaultShippingMethodResolver,
FactoryInterface $shipmentFactory,
- ShippingMethodsResolverInterface $shippingMethodsResolver
+ ShippingMethodsResolverInterface $shippingMethodsResolver,
): void {
$this->beConstructedWith($defaultShippingMethodResolver, $shipmentFactory, $shippingMethodsResolver);
}
@@ -52,7 +52,7 @@ function it_creates_a_single_shipment_with_default_shipping_method_and_assigns_a
OrderItemUnitInterface $itemUnit2,
ShipmentInterface $shipment,
ShippingMethodInterface $defaultShippingMethod,
- OrderItemInterface $orderItem
+ OrderItemInterface $orderItem,
): void {
$defaultShippingMethodResolver->getDefaultShippingMethod($shipment)->willReturn($defaultShippingMethod);
@@ -84,7 +84,7 @@ function it_does_not_add_new_shipment_if_shipping_method_cannot_be_resolved(
OrderItemUnitInterface $itemUnit1,
OrderItemUnitInterface $itemUnit2,
ShipmentInterface $shipment,
- OrderItemInterface $orderItem
+ OrderItemInterface $orderItem,
): void {
$defaultShippingMethodResolver->getDefaultShippingMethod($shipment)->willThrow(UnresolvedDefaultShippingMethodException::class);
@@ -102,7 +102,7 @@ function it_does_not_add_new_shipment_if_shipping_method_cannot_be_resolved(
$shipment->getUnits()->willReturn(
new ArrayCollection([]),
- new ArrayCollection([$itemUnit1->getWrappedObject(), $itemUnit2->getWrappedObject()])
+ new ArrayCollection([$itemUnit1->getWrappedObject(), $itemUnit2->getWrappedObject()]),
);
$shipment->addUnit($itemUnit1)->shouldBeCalled();
$shipment->addUnit($itemUnit2)->shouldBeCalled();
@@ -121,7 +121,7 @@ function it_removes_shipments_and_returns_null_when_shipping_is_not_required(
ShipmentInterface $shipment,
ShippingMethodInterface $defaultShippingMethod,
OrderItemInterface $orderItem,
- ProductVariantInterface $productVariant
+ ProductVariantInterface $productVariant,
): void {
$defaultShippingMethodResolver->getDefaultShippingMethod($shipment)->willReturn($defaultShippingMethod);
@@ -149,7 +149,7 @@ function it_adds_new_item_units_to_existing_shipment(
OrderItemUnitInterface $itemUnitWithoutShipment,
OrderItemInterface $orderItem,
ProductVariantInterface $productVariant,
- ShippingMethodInterface $shippingMethod
+ ShippingMethodInterface $shippingMethod,
): void {
$shipments->first()->willReturn($shipment);
@@ -185,7 +185,7 @@ function it_adds_new_item_units_to_existing_shipment_without_checking_methods_if
OrderItemUnitInterface $itemUnit,
OrderItemUnitInterface $itemUnitWithoutShipment,
OrderItemInterface $orderItem,
- ProductVariantInterface $productVariant
+ ProductVariantInterface $productVariant,
): void {
$this->beConstructedWith($defaultShippingMethodResolver, $shipmentFactory);
@@ -218,7 +218,7 @@ function it_removes_units_before_adding_new_ones(
Collection $shipments,
OrderItemUnitInterface $itemUnit,
OrderItemUnitInterface $itemUnitWithoutShipment,
- ShippingMethodInterface $shippingMethod
+ ShippingMethodInterface $shippingMethod,
): void {
$shipments->first()->willReturn($shipment);
@@ -254,7 +254,7 @@ function it_adds_new_item_units_to_existing_shipment_and_replaces_its_method_if_
OrderItemInterface $orderItem,
ProductVariantInterface $productVariant,
ShippingMethodInterface $firstShippingMethod,
- ShippingMethodInterface $secondShippingMethod
+ ShippingMethodInterface $secondShippingMethod,
): void {
$shipments->first()->willReturn($shipment);
diff --git a/src/Sylius/Component/Core/spec/OrderProcessing/OrderTaxesProcessorSpec.php b/src/Sylius/Component/Core/spec/OrderProcessing/OrderTaxesProcessorSpec.php
index 95ed61df412..6616e708898 100644
--- a/src/Sylius/Component/Core/spec/OrderProcessing/OrderTaxesProcessorSpec.php
+++ b/src/Sylius/Component/Core/spec/OrderProcessing/OrderTaxesProcessorSpec.php
@@ -34,7 +34,7 @@ final class OrderTaxesProcessorSpec extends ObjectBehavior
function let(
ZoneProviderInterface $defaultTaxZoneProvider,
ZoneMatcherInterface $zoneMatcher,
- PrioritizedServiceRegistryInterface $strategyRegistry
+ PrioritizedServiceRegistryInterface $strategyRegistry,
): void {
$this->beConstructedWith($defaultTaxZoneProvider, $zoneMatcher, $strategyRegistry);
}
@@ -53,7 +53,7 @@ function it_processes_taxes_using_a_supported_tax_calculation_strategy(
AddressInterface $address,
ZoneInterface $zone,
TaxCalculationStrategyInterface $strategyOne,
- TaxCalculationStrategyInterface $strategyTwo
+ TaxCalculationStrategyInterface $strategyTwo,
): void {
$order->getItems()->willReturn(new ArrayCollection([$orderItem->getWrappedObject()]));
$order->getShipments()->willReturn(new ArrayCollection([$shipment->getWrappedObject()]));
@@ -83,7 +83,7 @@ function it_throws_an_exception_if_there_are_no_supported_tax_calculation_strate
OrderItemInterface $orderItem,
AddressInterface $address,
ZoneInterface $zone,
- TaxCalculationStrategyInterface $strategy
+ TaxCalculationStrategyInterface $strategy,
): void {
$order->getItems()->willReturn(new ArrayCollection([$orderItem->getWrappedObject()]));
$order->getShipments()->willReturn(new ArrayCollection([]));
@@ -121,7 +121,7 @@ function it_does_not_process_taxes_if_there_is_no_tax_zone(
PrioritizedServiceRegistryInterface $strategyRegistry,
OrderInterface $order,
OrderItemInterface $orderItem,
- AddressInterface $address
+ AddressInterface $address,
): void {
$order->getItems()->willReturn(new ArrayCollection([$orderItem->getWrappedObject()]));
$order->getShipments()->willReturn(new ArrayCollection([]));
diff --git a/src/Sylius/Component/Core/spec/OrderProcessing/ShippingChargesProcessorSpec.php b/src/Sylius/Component/Core/spec/OrderProcessing/ShippingChargesProcessorSpec.php
index 3b3756f124a..6152cdc7932 100644
--- a/src/Sylius/Component/Core/spec/OrderProcessing/ShippingChargesProcessorSpec.php
+++ b/src/Sylius/Component/Core/spec/OrderProcessing/ShippingChargesProcessorSpec.php
@@ -57,7 +57,7 @@ function it_applies_calculated_shipping_charge_for_each_shipment_associated_with
AdjustmentInterface $adjustment,
OrderInterface $order,
ShipmentInterface $shipment,
- ShippingMethodInterface $shippingMethod
+ ShippingMethodInterface $shippingMethod,
): void {
$adjustmentFactory->createNew()->willReturn($adjustment);
$order->getShipments()->willReturn(new ArrayCollection([$shipment->getWrappedObject()]));
diff --git a/src/Sylius/Component/Core/spec/Payment/Provider/OrderPaymentProviderSpec.php b/src/Sylius/Component/Core/spec/Payment/Provider/OrderPaymentProviderSpec.php
index 855abd9165d..491a29162fe 100644
--- a/src/Sylius/Component/Core/spec/Payment/Provider/OrderPaymentProviderSpec.php
+++ b/src/Sylius/Component/Core/spec/Payment/Provider/OrderPaymentProviderSpec.php
@@ -32,12 +32,12 @@ final class OrderPaymentProviderSpec extends ObjectBehavior
function let(
DefaultPaymentMethodResolverInterface $defaultPaymentMethodResolver,
PaymentFactoryInterface $paymentFactory,
- StateMachineFactoryInterface $stateMachineFactory
+ StateMachineFactoryInterface $stateMachineFactory,
): void {
$this->beConstructedWith(
$defaultPaymentMethodResolver,
$paymentFactory,
- $stateMachineFactory
+ $stateMachineFactory,
);
}
@@ -54,7 +54,7 @@ function it_provides_payment_in_configured_state_with_payment_method_from_last_c
PaymentInterface $newPayment,
PaymentMethodInterface $paymentMethod,
StateMachineFactoryInterface $stateMachineFactory,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$order->getTotal()->willReturn(1000);
$order->getCurrencyCode()->willReturn('USD');
@@ -84,7 +84,7 @@ function it_provides_payment_in_configured_state_with_payment_method_from_last_f
PaymentInterface $newPayment,
PaymentMethodInterface $paymentMethod,
StateMachineFactoryInterface $stateMachineFactory,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$order->getTotal()->willReturn(1000);
$order->getCurrencyCode()->willReturn('USD');
@@ -114,7 +114,7 @@ function it_provides_payment_in_configured_state_with_default_payment_method(
PaymentInterface $newPayment,
PaymentMethodInterface $paymentMethod,
StateMachineFactoryInterface $stateMachineFactory,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$order->getTotal()->willReturn(1000);
$order->getCurrencyCode()->willReturn('USD');
@@ -142,13 +142,13 @@ function it_does_not_apply_any_transition_if_target_state_is_the_same_as_new_pay
PaymentFactoryInterface $paymentFactory,
PaymentInterface $newPayment,
PaymentMethodInterface $paymentMethod,
- StateMachineFactoryInterface $stateMachineFactory
+ StateMachineFactoryInterface $stateMachineFactory,
): void {
$this->beConstructedWith(
$defaultPaymentMethodResolver,
$paymentFactory,
$stateMachineFactory,
- PaymentInterface::STATE_CART
+ PaymentInterface::STATE_CART,
);
$order->getTotal()->willReturn(1000);
@@ -174,7 +174,7 @@ function it_throws_exception_if_payment_method_cannot_be_resolved_for_provided_p
OrderInterface $order,
PaymentFactoryInterface $paymentFactory,
PaymentInterface $lastFailedPayment,
- PaymentInterface $newPayment
+ PaymentInterface $newPayment,
): void {
$order->getTotal()->willReturn(1000);
$order->getCurrencyCode()->willReturn('USD');
diff --git a/src/Sylius/Component/Core/spec/Promotion/Action/FixedDiscountPromotionActionCommandSpec.php b/src/Sylius/Component/Core/spec/Promotion/Action/FixedDiscountPromotionActionCommandSpec.php
index e227f3de885..22583c9926a 100644
--- a/src/Sylius/Component/Core/spec/Promotion/Action/FixedDiscountPromotionActionCommandSpec.php
+++ b/src/Sylius/Component/Core/spec/Promotion/Action/FixedDiscountPromotionActionCommandSpec.php
@@ -31,11 +31,11 @@ final class FixedDiscountPromotionActionCommandSpec extends ObjectBehavior
{
function let(
ProportionalIntegerDistributorInterface $proportionalIntegerDistributor,
- UnitsPromotionAdjustmentsApplicatorInterface $unitsPromotionAdjustmentsApplicator
+ UnitsPromotionAdjustmentsApplicatorInterface $unitsPromotionAdjustmentsApplicator,
): void {
$this->beConstructedWith(
$proportionalIntegerDistributor,
- $unitsPromotionAdjustmentsApplicator
+ $unitsPromotionAdjustmentsApplicator,
);
}
@@ -51,7 +51,7 @@ function it_uses_a_distributor_and_applicator_to_execute_promotion_action(
OrderItemInterface $secondItem,
PromotionInterface $promotion,
ProportionalIntegerDistributorInterface $proportionalIntegerDistributor,
- UnitsPromotionAdjustmentsApplicatorInterface $unitsPromotionAdjustmentsApplicator
+ UnitsPromotionAdjustmentsApplicatorInterface $unitsPromotionAdjustmentsApplicator,
): void {
$order->getCurrencyCode()->willReturn('USD');
$order->getChannel()->willReturn($channel);
@@ -81,7 +81,7 @@ function it_does_not_apply_bigger_discount_than_promotion_subject_total(
OrderItemInterface $secondItem,
PromotionInterface $promotion,
ProportionalIntegerDistributorInterface $proportionalIntegerDistributor,
- UnitsPromotionAdjustmentsApplicatorInterface $unitsPromotionAdjustmentsApplicator
+ UnitsPromotionAdjustmentsApplicatorInterface $unitsPromotionAdjustmentsApplicator,
): void {
$order->getCurrencyCode()->willReturn('USD');
$order->getChannel()->willReturn($channel);
@@ -107,7 +107,7 @@ function it_does_not_apply_bigger_discount_than_promotion_subject_total(
function it_does_not_apply_discount_if_order_has_no_items(
ChannelInterface $channel,
OrderInterface $order,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_US');
@@ -122,7 +122,7 @@ function it_does_not_apply_discount_if_subject_total_is_0(
ChannelInterface $channel,
OrderInterface $order,
PromotionInterface $promotion,
- ProportionalIntegerDistributorInterface $proportionalIntegerDistributor
+ ProportionalIntegerDistributorInterface $proportionalIntegerDistributor,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_US');
@@ -138,7 +138,7 @@ function it_does_not_apply_discount_if_promotion_amount_is_0(
ChannelInterface $channel,
OrderInterface $order,
PromotionInterface $promotion,
- ProportionalIntegerDistributorInterface $proportionalIntegerDistributor
+ ProportionalIntegerDistributorInterface $proportionalIntegerDistributor,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_US');
@@ -153,7 +153,7 @@ function it_does_not_apply_discount_if_promotion_amount_is_0(
function it_does_not_apply_discount_if_amount_for_order_channel_is_not_configured(
ChannelInterface $channel,
OrderInterface $order,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_US');
@@ -167,7 +167,7 @@ function it_does_not_apply_discount_if_amount_for_order_channel_is_not_configure
function it_does_not_apply_discount_if_configuration_is_invalid(
ChannelInterface $channel,
OrderInterface $order,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->getChannel()->willReturn($channel, $channel);
$channel->getCode()->willReturn('WEB_US', 'WEB_US');
@@ -179,7 +179,7 @@ function it_does_not_apply_discount_if_configuration_is_invalid(
function it_throws_an_exception_if_subject_is_not_an_order(
PromotionInterface $promotion,
- PromotionSubjectInterface $subject
+ PromotionSubjectInterface $subject,
): void {
$this
->shouldThrow(\InvalidArgumentException::class)
@@ -193,7 +193,7 @@ function it_reverts_an_order_units_order_promotion_adjustments(
OrderInterface $order,
OrderItemInterface $item,
OrderItemUnitInterface $unit,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->countItems()->willReturn(1);
$order->getItems()->willReturn(new ArrayCollection([$item->getWrappedObject()]));
@@ -226,7 +226,7 @@ function it_does_not_revert_if_order_has_no_items(OrderInterface $order, Promoti
function it_throws_an_exception_while_reverting_subject_which_is_not_order(
PromotionInterface $promotion,
- PromotionSubjectInterface $subject
+ PromotionSubjectInterface $subject,
): void {
$this
->shouldThrow(\InvalidArgumentException::class)
diff --git a/src/Sylius/Component/Core/spec/Promotion/Action/PercentageDiscountPromotionActionCommandSpec.php b/src/Sylius/Component/Core/spec/Promotion/Action/PercentageDiscountPromotionActionCommandSpec.php
index f5d89f8c4b4..18365c3bbce 100644
--- a/src/Sylius/Component/Core/spec/Promotion/Action/PercentageDiscountPromotionActionCommandSpec.php
+++ b/src/Sylius/Component/Core/spec/Promotion/Action/PercentageDiscountPromotionActionCommandSpec.php
@@ -30,7 +30,7 @@ final class PercentageDiscountPromotionActionCommandSpec extends ObjectBehavior
{
function let(
ProportionalIntegerDistributorInterface $distributor,
- UnitsPromotionAdjustmentsApplicatorInterface $unitsPromotionAdjustmentsApplicator
+ UnitsPromotionAdjustmentsApplicatorInterface $unitsPromotionAdjustmentsApplicator,
): void {
$this->beConstructedWith($distributor, $unitsPromotionAdjustmentsApplicator);
}
@@ -46,7 +46,7 @@ function it_uses_distributor_and_applicator_to_execute_promotion_action(
OrderItemInterface $secondItem,
PromotionInterface $promotion,
ProportionalIntegerDistributorInterface $distributor,
- UnitsPromotionAdjustmentsApplicatorInterface $unitsPromotionAdjustmentsApplicator
+ UnitsPromotionAdjustmentsApplicatorInterface $unitsPromotionAdjustmentsApplicator,
): void {
$order->countItems()->willReturn(2);
$order->getItems()->willReturn(new ArrayCollection([$firstItem->getWrappedObject(), $secondItem->getWrappedObject()]));
@@ -73,7 +73,7 @@ function it_does_not_apply_discount_if_order_has_no_items(OrderInterface $order,
function it_does_not_apply_discount_if_adjustment_amount_would_be_0(
OrderInterface $order,
PromotionInterface $promotion,
- ProportionalIntegerDistributorInterface $distributor
+ ProportionalIntegerDistributorInterface $distributor,
): void {
$order->countItems()->willReturn(0);
@@ -85,7 +85,7 @@ function it_does_not_apply_discount_if_adjustment_amount_would_be_0(
function it_does_not_apply_discount_if_configuration_is_invalid(
OrderInterface $order,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->countItems()->willReturn(1);
@@ -95,7 +95,7 @@ function it_does_not_apply_discount_if_configuration_is_invalid(
function it_throws_exception_if_subject_is_not_an_order(
PromotionInterface $promotion,
- PromotionSubjectInterface $subject
+ PromotionSubjectInterface $subject,
): void {
$this
->shouldThrow(\InvalidArgumentException::class)
@@ -109,7 +109,7 @@ function it_reverts_order_units_order_promotion_adjustments(
OrderInterface $order,
OrderItemInterface $item,
OrderItemUnitInterface $unit,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->countItems()->willReturn(1);
$order->getItems()->willReturn(new ArrayCollection([$item->getWrappedObject()]));
@@ -142,7 +142,7 @@ function it_does_not_revert_if_order_has_no_items(OrderInterface $order, Promoti
function it_throws_an_exception_while_reverting_subject_which_is_not_order(
PromotionInterface $promotion,
- PromotionSubjectInterface $subject
+ PromotionSubjectInterface $subject,
): void {
$this
->shouldThrow(\InvalidArgumentException::class)
diff --git a/src/Sylius/Component/Core/spec/Promotion/Action/ShippingPercentageDiscountPromotionActionCommandSpec.php b/src/Sylius/Component/Core/spec/Promotion/Action/ShippingPercentageDiscountPromotionActionCommandSpec.php
index e34b6265fe7..4a4f96de7e0 100644
--- a/src/Sylius/Component/Core/spec/Promotion/Action/ShippingPercentageDiscountPromotionActionCommandSpec.php
+++ b/src/Sylius/Component/Core/spec/Promotion/Action/ShippingPercentageDiscountPromotionActionCommandSpec.php
@@ -42,7 +42,7 @@ function it_applies_percentage_discount_on_every_shipment(
ShipmentInterface $firstShipment,
ShipmentInterface $secondShipment,
AdjustmentInterface $firstAdjustment,
- AdjustmentInterface $secondAdjustment
+ AdjustmentInterface $secondAdjustment,
): void {
$promotion->getName()->willReturn('Promotion');
$promotion->getCode()->willReturn('PROMOTION');
@@ -76,7 +76,7 @@ function it_applies_percentage_discount_on_every_shipment(
function it_does_not_apply_discount_if_order_has_no_shipment(
FactoryInterface $adjustmentFactory,
OrderInterface $order,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->hasShipments()->willReturn(false);
$order->getShipments()->shouldNotBeCalled();
@@ -89,7 +89,7 @@ function it_does_not_apply_discount_if_adjustment_amount_would_be_0(
FactoryInterface $adjustmentFactory,
OrderInterface $order,
PromotionInterface $promotion,
- ShipmentInterface $shipment
+ ShipmentInterface $shipment,
): void {
$order->hasShipments()->willReturn(true);
$order->getShipments()->willReturn(new ArrayCollection([$shipment->getWrappedObject()]));
@@ -103,7 +103,7 @@ function it_does_not_apply_discount_if_adjustment_amount_would_be_0(
function it_throws_exception_if_subject_is_not_an_order(
PromotionInterface $promotion,
- PromotionSubjectInterface $subject
+ PromotionSubjectInterface $subject,
): void {
$this
->shouldThrow(\InvalidArgumentException::class)
@@ -117,7 +117,7 @@ function it_reverts_adjustments(
AdjustmentInterface $secondAdjustment,
ShipmentInterface $firstShipment,
ShipmentInterface $secondShipment,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$promotion->getCode()->willReturn('PROMOTION');
@@ -162,7 +162,7 @@ function it_does_not_revert_adjustments_if_order_has_no_shipment(OrderInterface
function it_throws_an_exception_while_reverting_subject_is_not_an_order(
PromotionInterface $promotion,
- PromotionSubjectInterface $subject
+ PromotionSubjectInterface $subject,
): void {
$this
->shouldThrow(\InvalidArgumentException::class)
diff --git a/src/Sylius/Component/Core/spec/Promotion/Action/UnitFixedDiscountPromotionActionCommandSpec.php b/src/Sylius/Component/Core/spec/Promotion/Action/UnitFixedDiscountPromotionActionCommandSpec.php
index 00941324f03..dab544b1ded 100644
--- a/src/Sylius/Component/Core/spec/Promotion/Action/UnitFixedDiscountPromotionActionCommandSpec.php
+++ b/src/Sylius/Component/Core/spec/Promotion/Action/UnitFixedDiscountPromotionActionCommandSpec.php
@@ -34,13 +34,13 @@ function let(
FactoryInterface $adjustmentFactory,
FilterInterface $priceRangeFilter,
FilterInterface $taxonFilter,
- FilterInterface $productFilter
+ FilterInterface $productFilter,
): void {
$this->beConstructedWith(
$adjustmentFactory,
$priceRangeFilter,
$taxonFilter,
- $productFilter
+ $productFilter,
);
}
@@ -61,7 +61,7 @@ function it_applies_a_fixed_discount_on_every_unit_in_order(
OrderItemInterface $orderItem,
OrderItemUnitInterface $unit1,
OrderItemUnitInterface $unit2,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_US');
@@ -108,7 +108,7 @@ function it_does_not_apply_a_discount_if_all_items_have_been_filtered_out(
FilterInterface $productFilter,
OrderInterface $order,
OrderItemInterface $orderItem,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_US');
@@ -129,7 +129,7 @@ function it_does_not_apply_discount_with_amount_0(
OrderInterface $order,
OrderItemUnitInterface $unit1,
OrderItemUnitInterface $unit2,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_US');
@@ -154,7 +154,7 @@ function it_does_not_apply_bigger_discount_than_unit_total(
OrderItemInterface $orderItem,
OrderItemUnitInterface $unit1,
OrderItemUnitInterface $unit2,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_US');
@@ -198,7 +198,7 @@ function it_does_not_apply_discount_if_no_amount_is_defined_for_order_channel(
ChannelInterface $channel,
FactoryInterface $adjustmentFactory,
OrderInterface $order,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_US');
@@ -210,7 +210,7 @@ function it_does_not_apply_discount_if_no_amount_is_defined_for_order_channel(
function it_throws_an_exception_if_passed_subject_to_execute_is_not_order(
PromotionSubjectInterface $subject,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$this
->shouldThrow(UnexpectedTypeException::class)
@@ -225,7 +225,7 @@ function it_reverts_a_proper_promotion_adjustment_from_all_units(
OrderInterface $order,
OrderItemInterface $orderItem,
OrderItemUnitInterface $unit,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_US');
@@ -238,7 +238,7 @@ function it_reverts_a_proper_promotion_adjustment_from_all_units(
new ArrayCollection([
$promotionAdjustment1->getWrappedObject(),
$promotionAdjustment2->getWrappedObject(),
- ])
+ ]),
)
;
@@ -255,7 +255,7 @@ function it_reverts_a_proper_promotion_adjustment_from_all_units(
function it_throws_an_exception_if_passed_subject_to_revert_is_not_order(
PromotionSubjectInterface $subject,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$this
->shouldThrow(UnexpectedTypeException::class)
diff --git a/src/Sylius/Component/Core/spec/Promotion/Action/UnitPercentageDiscountPromotionActionCommandSpec.php b/src/Sylius/Component/Core/spec/Promotion/Action/UnitPercentageDiscountPromotionActionCommandSpec.php
index c5d60d0e5b4..89e4149b5a6 100644
--- a/src/Sylius/Component/Core/spec/Promotion/Action/UnitPercentageDiscountPromotionActionCommandSpec.php
+++ b/src/Sylius/Component/Core/spec/Promotion/Action/UnitPercentageDiscountPromotionActionCommandSpec.php
@@ -34,7 +34,7 @@ function let(
FactoryInterface $adjustmentFactory,
FilterInterface $priceRangeFilter,
FilterInterface $taxonFilter,
- FilterInterface $productFilter
+ FilterInterface $productFilter,
): void {
$this->beConstructedWith($adjustmentFactory, $priceRangeFilter, $taxonFilter, $productFilter);
}
@@ -58,7 +58,7 @@ function it_applies_percentage_discount_on_every_unit_in_order(
OrderItemInterface $orderItem1,
OrderItemUnitInterface $unit1,
OrderItemUnitInterface $unit2,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_US');
@@ -106,7 +106,7 @@ function it_does_not_apply_a_discount_if_all_items_have_been_filtered_out(
FilterInterface $productFilter,
OrderInterface $order,
OrderItemInterface $orderItem,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_US');
@@ -124,7 +124,7 @@ function it_does_not_apply_a_discount_if_all_items_have_been_filtered_out(
function it_does_not_apply_discount_if_configuration_for_order_channel_is_not_defined(
ChannelInterface $channel,
OrderInterface $order,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_PL');
@@ -137,7 +137,7 @@ function it_does_not_apply_discount_if_configuration_for_order_channel_is_not_de
function it_does_not_apply_discount_if_percentage_configuration_not_defined(
ChannelInterface $channel,
OrderInterface $order,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_PL');
@@ -149,7 +149,7 @@ function it_does_not_apply_discount_if_percentage_configuration_not_defined(
function it_throws_an_exception_if_passed_subject_is_not_order(
PromotionSubjectInterface $subject,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$this
->shouldThrow(UnexpectedTypeException::class)
@@ -166,7 +166,7 @@ function it_reverts_a_proper_promotion_adjustment_from_all_units(
OrderInterface $order,
OrderItemInterface $orderItem,
OrderItemUnitInterface $unit,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->getItems()->willReturn($items);
$items->getIterator()->willReturn(new \ArrayIterator([$orderItem->getWrappedObject()]));
@@ -193,7 +193,7 @@ function it_reverts_a_proper_promotion_adjustment_from_all_units(
function it_throws_an_exception_if_passed_subject_to_revert_is_not_order(
PromotionSubjectInterface $subject,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$this
->shouldThrow(UnexpectedTypeException::class)
diff --git a/src/Sylius/Component/Core/spec/Promotion/Applicator/UnitsPromotionAdjustmentsApplicatorSpec.php b/src/Sylius/Component/Core/spec/Promotion/Applicator/UnitsPromotionAdjustmentsApplicatorSpec.php
index 0f6e9009e57..b6a023a5270 100644
--- a/src/Sylius/Component/Core/spec/Promotion/Applicator/UnitsPromotionAdjustmentsApplicatorSpec.php
+++ b/src/Sylius/Component/Core/spec/Promotion/Applicator/UnitsPromotionAdjustmentsApplicatorSpec.php
@@ -29,7 +29,7 @@ final class UnitsPromotionAdjustmentsApplicatorSpec extends ObjectBehavior
{
function let(
AdjustmentFactoryInterface $adjustmentFactory,
- IntegerDistributorInterface $distributor
+ IntegerDistributorInterface $distributor,
): void {
$this->beConstructedWith($adjustmentFactory, $distributor);
}
@@ -51,7 +51,7 @@ function it_applies_promotion_adjustments_on_all_units_of_given_order(
OrderItemUnitInterface $firstColtUnit,
OrderItemUnitInterface $magnumUnit,
OrderItemUnitInterface $secondColtUnit,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->countItems()->willReturn(2);
@@ -107,7 +107,7 @@ function it_does_not_distribute_0_amount_to_item(
OrderItemInterface $magnumItem,
OrderItemUnitInterface $coltUnit,
OrderItemUnitInterface $magnumUnit,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->countItems()->willReturn(2);
@@ -158,7 +158,7 @@ function it_does_not_distribute_0_amount_to_item_even_if_its_middle_element(
OrderItemUnitInterface $coltUnit,
OrderItemUnitInterface $magnumUnit,
OrderItemUnitInterface $winchesterUnit,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->countItems()->willReturn(3);
@@ -218,7 +218,7 @@ function it_does_not_distribute_0_amount_to_unit(
OrderItemUnitInterface $firstColtUnit,
OrderItemUnitInterface $secondColtUnit,
OrderItemUnitInterface $thirdColtUnit,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->countItems()->willReturn(1);
@@ -266,7 +266,7 @@ function it_does_not_distribute_0_amount_to_unit_even_if_its_middle_element(
OrderItemInterface $coltItem,
OrderItemUnitInterface $firstColtUnit,
OrderItemUnitInterface $secondColtUnit,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$order->countItems()->willReturn(1);
@@ -302,7 +302,7 @@ function it_does_not_distribute_0_amount_to_unit_even_if_its_middle_element(
function it_throws_exception_if_items_count_is_different_than_adjustment_amounts(
PromotionInterface $promotion,
- OrderInterface $order
+ OrderInterface $order,
): void {
$order->countItems()->willReturn(2);
diff --git a/src/Sylius/Component/Core/spec/Promotion/Checker/Eligibility/PromotionCouponPerCustomerUsageLimitEligibilityCheckerSpec.php b/src/Sylius/Component/Core/spec/Promotion/Checker/Eligibility/PromotionCouponPerCustomerUsageLimitEligibilityCheckerSpec.php
index 47888fdabc1..69666242374 100644
--- a/src/Sylius/Component/Core/spec/Promotion/Checker/Eligibility/PromotionCouponPerCustomerUsageLimitEligibilityCheckerSpec.php
+++ b/src/Sylius/Component/Core/spec/Promotion/Checker/Eligibility/PromotionCouponPerCustomerUsageLimitEligibilityCheckerSpec.php
@@ -38,7 +38,7 @@ function it_returns_false_if_promotion_coupon_has_reached_its_per_customer_usage
OrderRepositoryInterface $orderRepository,
OrderInterface $promotionSubject,
CorePromotionCouponInterface $promotionCoupon,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$customer->getId()->willReturn(1);
$promotionSubject->getCustomer()->willReturn($customer);
@@ -53,7 +53,7 @@ function it_returns_true_if_promotion_coupon_has_not_reached_its_per_customer_us
OrderRepositoryInterface $orderRepository,
OrderInterface $promotionSubject,
CorePromotionCouponInterface $promotionCoupon,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$customer->getId()->willReturn(1);
$promotionSubject->getCustomer()->willReturn($customer);
@@ -67,7 +67,7 @@ function it_returns_true_if_promotion_coupon_has_not_reached_its_per_customer_us
function it_returns_true_if_promotion_subject_has_customer_that_is_not_persisted(
OrderInterface $promotionSubject,
CorePromotionCouponInterface $promotionCoupon,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$customer->getId()->willReturn(null);
$promotionSubject->getCustomer()->willReturn($customer);
@@ -78,7 +78,7 @@ function it_returns_true_if_promotion_subject_has_customer_that_is_not_persisted
function it_returns_true_if_promotion_subject_has_no_customer(
OrderInterface $promotionSubject,
- CorePromotionCouponInterface $promotionCoupon
+ CorePromotionCouponInterface $promotionCoupon,
): void {
$promotionSubject->getCustomer()->willReturn(null);
$promotionCoupon->getPerCustomerUsageLimit()->willReturn(42);
@@ -88,7 +88,7 @@ function it_returns_true_if_promotion_subject_has_no_customer(
function it_returns_true_if_promotion_coupon_has_no_per_customer_usage_limit(
OrderInterface $promotionSubject,
- CorePromotionCouponInterface $promotionCoupon
+ CorePromotionCouponInterface $promotionCoupon,
): void {
$promotionCoupon->getPerCustomerUsageLimit()->willReturn(null);
@@ -97,14 +97,14 @@ function it_returns_true_if_promotion_coupon_has_no_per_customer_usage_limit(
function it_returns_true_if_promotion_coupon_is_not_a_core_one(
OrderInterface $promotionSubject,
- PromotionCouponInterface $promotionCoupon
+ PromotionCouponInterface $promotionCoupon,
): void {
$this->isEligible($promotionSubject, $promotionCoupon)->shouldReturn(true);
}
function it_returns_true_if_promotion_subject_is_not_a_core_order(
PromotionSubjectInterface $promotionSubject,
- CorePromotionCouponInterface $promotionCoupon
+ CorePromotionCouponInterface $promotionCoupon,
): void {
$this->isEligible($promotionSubject, $promotionCoupon)->shouldReturn(true);
}
diff --git a/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/ContainsProductRuleCheckerSpec.php b/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/ContainsProductRuleCheckerSpec.php
index 4accc2fc334..e0a5512f471 100644
--- a/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/ContainsProductRuleCheckerSpec.php
+++ b/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/ContainsProductRuleCheckerSpec.php
@@ -42,7 +42,7 @@ function it_returns_true_if_product_is_right(
OrderItemInterface $firstOrderItem,
OrderItemInterface $secondOrderItem,
ProductInterface $shaft,
- ProductInterface $head
+ ProductInterface $head,
): void {
$subject->getItems()->willReturn(new ArrayCollection([$firstOrderItem->getWrappedObject(), $secondOrderItem->getWrappedObject()]));
$firstOrderItem->getProduct()->willReturn($head);
@@ -58,7 +58,7 @@ function it_returns_false_if_product_is_wrong(
OrderItemInterface $firstOrderItem,
OrderItemInterface $secondOrderItem,
ProductInterface $shaft,
- ProductInterface $head
+ ProductInterface $head,
): void {
$subject->getItems()->willReturn(new ArrayCollection([$firstOrderItem->getWrappedObject(), $secondOrderItem->getWrappedObject()]));
$firstOrderItem->getProduct()->willReturn($head);
diff --git a/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/HasTaxonRuleCheckerSpec.php b/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/HasTaxonRuleCheckerSpec.php
index b9b01923119..26828db8cfa 100644
--- a/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/HasTaxonRuleCheckerSpec.php
+++ b/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/HasTaxonRuleCheckerSpec.php
@@ -35,7 +35,7 @@ function it_recognizes_a_subject_as_eligible_if_product_taxon_is_matched(
OrderInterface $subject,
OrderItemInterface $item,
ProductInterface $bastardSword,
- TaxonInterface $swords
+ TaxonInterface $swords,
): void {
$configuration = ['taxons' => ['swords']];
@@ -51,7 +51,7 @@ function it_recognizes_a_subject_as_eligible_if_a_product_taxon_is_matched_to_on
OrderInterface $subject,
OrderItemInterface $item,
ProductInterface $bastardSword,
- TaxonInterface $swords
+ TaxonInterface $swords,
): void {
$configuration = ['taxons' => ['swords', 'axes']];
@@ -67,7 +67,7 @@ function it_recognizes_a_subject_as_not_eligible_if_a_product_taxon_is_not_match
OrderInterface $subject,
OrderItemInterface $item,
ProductInterface $reflexBow,
- TaxonInterface $bows
+ TaxonInterface $bows,
): void {
$configuration = ['taxons' => ['swords', 'axes']];
@@ -88,7 +88,7 @@ function it_does_nothing_if_a_configuration_is_invalid(OrderInterface $subject):
function it_throws_an_exception_if_promotion_subject_is_not_order(
Collection $taxonsCollection,
- PromotionSubjectInterface $subject
+ PromotionSubjectInterface $subject,
): void {
$this
->shouldThrow(new UnsupportedTypeException($subject->getWrappedObject(), OrderInterface::class))
diff --git a/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/ItemTotalRuleCheckerSpec.php b/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/ItemTotalRuleCheckerSpec.php
index e775e8d3e33..8627f07336a 100644
--- a/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/ItemTotalRuleCheckerSpec.php
+++ b/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/ItemTotalRuleCheckerSpec.php
@@ -34,7 +34,7 @@ function it_is_be_a_rule_checker(): void
function it_uses_decorated_checker_to_check_eligibility_for_order_channel(
ChannelInterface $channel,
OrderInterface $order,
- RuleCheckerInterface $itemTotalRuleChecker
+ RuleCheckerInterface $itemTotalRuleChecker,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_US');
@@ -46,7 +46,7 @@ function it_uses_decorated_checker_to_check_eligibility_for_order_channel(
function it_returns_false_if_there_is_no_configuration_for_order_channel(
ChannelInterface $channel,
- OrderInterface $order
+ OrderInterface $order,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_US');
diff --git a/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/NthOrderRuleCheckerSpec.php b/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/NthOrderRuleCheckerSpec.php
index 9be50b54f9f..956dacc4a19 100644
--- a/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/NthOrderRuleCheckerSpec.php
+++ b/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/NthOrderRuleCheckerSpec.php
@@ -43,7 +43,7 @@ function it_recognizes_a_subject_without_customer_as_not_eligible(OrderInterface
function it_recognizes_a_subject_as_not_eligible_if_nth_order_is_zero(
CustomerInterface $customer,
OrderInterface $subject,
- OrderRepositoryInterface $ordersRepository
+ OrderRepositoryInterface $ordersRepository,
): void {
$subject->getCustomer()->willReturn($customer);
$customer->getId()->willReturn(1);
@@ -56,7 +56,7 @@ function it_recognizes_a_subject_as_not_eligible_if_nth_order_is_zero(
function it_recognizes_a_subject_as_not_eligible_if_nth_order_is_less_then_configured(
CustomerInterface $customer,
OrderInterface $subject,
- OrderRepositoryInterface $ordersRepository
+ OrderRepositoryInterface $ordersRepository,
): void {
$subject->getCustomer()->willReturn($customer);
$customer->getId()->willReturn(1);
@@ -69,7 +69,7 @@ function it_recognizes_a_subject_as_not_eligible_if_nth_order_is_less_then_confi
function it_recognizes_a_subject_as_not_eligible_if_nth_order_is_greater_than_configured(
CustomerInterface $customer,
OrderInterface $subject,
- OrderRepositoryInterface $ordersRepository
+ OrderRepositoryInterface $ordersRepository,
): void {
$subject->getCustomer()->willReturn($customer);
$customer->getId()->willReturn(1);
@@ -82,7 +82,7 @@ function it_recognizes_a_subject_as_not_eligible_if_nth_order_is_greater_than_co
function it_recognizes_a_subject_as_eligible_if_nth_order_is_equal_with_configured(
CustomerInterface $customer,
OrderInterface $subject,
- OrderRepositoryInterface $ordersRepository
+ OrderRepositoryInterface $ordersRepository,
): void {
$subject->getCustomer()->willReturn($customer);
$customer->getId()->willReturn(1);
@@ -94,7 +94,7 @@ function it_recognizes_a_subject_as_eligible_if_nth_order_is_equal_with_configur
function it_recognizes_a_subject_as_eligible_if_nth_order_is_one_and_customer_is_not_in_database(
CustomerInterface $customer,
- OrderInterface $subject
+ OrderInterface $subject,
): void {
$subject->getCustomer()->willReturn($customer);
$customer->getId()->willReturn(null);
@@ -104,7 +104,7 @@ function it_recognizes_a_subject_as_eligible_if_nth_order_is_one_and_customer_is
function it_recognizes_a_subject_as_not_eligible_if_it_is_first_order_of_new_customer_and_promotion_is_for_more_than_one_order(
CustomerInterface $customer,
- OrderInterface $subject
+ OrderInterface $subject,
): void {
$subject->getCustomer()->willReturn($customer);
$customer->getId()->willReturn(null);
diff --git a/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/ShippingCountryRuleCheckerSpec.php b/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/ShippingCountryRuleCheckerSpec.php
index 049eeadfb86..4b7d570eea0 100644
--- a/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/ShippingCountryRuleCheckerSpec.php
+++ b/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/ShippingCountryRuleCheckerSpec.php
@@ -43,7 +43,7 @@ function it_recognizes_a_subject_as_not_eligible_if_country_does_not_match(
OrderInterface $subject,
AddressInterface $address,
CountryInterface $country,
- RepositoryInterface $countryRepository
+ RepositoryInterface $countryRepository,
): void {
$country->getCode()->willReturn('IE');
$address->getCountryCode()->willReturn('IE');
@@ -58,7 +58,7 @@ function it_recognizes_a_subject_as_eligible_if_country_match(
OrderInterface $subject,
AddressInterface $address,
CountryInterface $country,
- RepositoryInterface $countryRepository
+ RepositoryInterface $countryRepository,
): void {
$country->getCode()->willReturn('IE');
$address->getCountryCode()->willReturn('IE');
diff --git a/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/TotalOfItemsFromTaxonRuleCheckerSpec.php b/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/TotalOfItemsFromTaxonRuleCheckerSpec.php
index 679892dc0d5..c9c6f752ac8 100644
--- a/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/TotalOfItemsFromTaxonRuleCheckerSpec.php
+++ b/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/TotalOfItemsFromTaxonRuleCheckerSpec.php
@@ -46,7 +46,7 @@ function it_recognizes_a_subject_as_eligible_if_it_has_items_from_configured_tax
ProductInterface $compositeBow,
ProductInterface $longsword,
ProductInterface $reflexBow,
- TaxonInterface $bows
+ TaxonInterface $bows,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_US');
@@ -82,7 +82,7 @@ function it_recognizes_a_subject_as_eligible_if_it_has_items_from_configured_tax
ProductInterface $compositeBow,
ProductInterface $reflexBow,
TaxonInterface $bows,
- TaxonRepositoryInterface $taxonRepository
+ TaxonRepositoryInterface $taxonRepository,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_US');
@@ -110,7 +110,7 @@ function it_does_not_recognize_a_subject_as_eligible_if_items_from_required_taxo
ProductInterface $compositeBow,
ProductInterface $longsword,
TaxonInterface $bows,
- TaxonRepositoryInterface $taxonRepository
+ TaxonRepositoryInterface $taxonRepository,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_US');
@@ -132,7 +132,7 @@ function it_does_not_recognize_a_subject_as_eligible_if_items_from_required_taxo
function it_returns_false_if_configuration_is_invalid(
ChannelInterface $channel,
- OrderInterface $order
+ OrderInterface $order,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_US');
@@ -143,7 +143,7 @@ function it_returns_false_if_configuration_is_invalid(
function it_returns_false_if_there_is_no_configuration_for_order_channel(
ChannelInterface $channel,
- OrderInterface $order
+ OrderInterface $order,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_US');
@@ -154,7 +154,7 @@ function it_returns_false_if_there_is_no_configuration_for_order_channel(
function it_returns_false_if_taxon_with_configured_code_cannot_be_found(
ChannelInterface $channel,
OrderInterface $order,
- TaxonRepositoryInterface $taxonRepository
+ TaxonRepositoryInterface $taxonRepository,
): void {
$order->getChannel()->willReturn($channel);
$channel->getCode()->willReturn('WEB_US');
diff --git a/src/Sylius/Component/Core/spec/Promotion/Filter/PriceRangeFilterSpec.php b/src/Sylius/Component/Core/spec/Promotion/Filter/PriceRangeFilterSpec.php
index 235d2f99c13..79d5be89e8c 100644
--- a/src/Sylius/Component/Core/spec/Promotion/Filter/PriceRangeFilterSpec.php
+++ b/src/Sylius/Component/Core/spec/Promotion/Filter/PriceRangeFilterSpec.php
@@ -40,7 +40,7 @@ function it_filters_items_which_has_product_with_price_that_fits_in_configured_r
ProductVariantInterface $item1Variant,
ProductVariantInterface $item2Variant,
ProductVariantInterface $item3Variant,
- ProductVariantPriceCalculatorInterface $productVariantPriceCalculator
+ ProductVariantPriceCalculatorInterface $productVariantPriceCalculator,
): void {
$item1->getVariant()->willReturn($item1Variant);
$item2->getVariant()->willReturn($item2Variant);
@@ -65,7 +65,7 @@ function it_filters_items_which_has_product_with_price_equal_to_minimum_criteria
OrderItemInterface $item2,
ProductVariantInterface $item1Variant,
ProductVariantInterface $item2Variant,
- ProductVariantPriceCalculatorInterface $productVariantPriceCalculator
+ ProductVariantPriceCalculatorInterface $productVariantPriceCalculator,
): void {
$item1->getVariant()->willReturn($item1Variant);
$item2->getVariant()->willReturn($item2Variant);
@@ -88,7 +88,7 @@ function it_filters_items_which_has_product_with_price_equal_to_maximum_criteria
OrderItemInterface $item2,
ProductVariantInterface $item1Variant,
ProductVariantInterface $item2Variant,
- ProductVariantPriceCalculatorInterface $productVariantPriceCalculator
+ ProductVariantPriceCalculatorInterface $productVariantPriceCalculator,
): void {
$item1->getVariant()->willReturn($item1Variant);
$item2->getVariant()->willReturn($item2Variant);
@@ -113,7 +113,7 @@ function it_filters_items_which_has_product_with_price_that_is_bigger_than_confi
ProductVariantInterface $item1Variant,
ProductVariantInterface $item2Variant,
ProductVariantInterface $item3Variant,
- ProductVariantPriceCalculatorInterface $productVariantPriceCalculator
+ ProductVariantPriceCalculatorInterface $productVariantPriceCalculator,
): void {
$item1->getVariant()->willReturn($item1Variant);
$item2->getVariant()->willReturn($item2Variant);
@@ -138,7 +138,7 @@ function it_filters_items_which_has_product_with_price_equal_to_configured_minim
OrderItemInterface $item2,
ProductVariantInterface $item1Variant,
ProductVariantInterface $item2Variant,
- ProductVariantPriceCalculatorInterface $productVariantPriceCalculator
+ ProductVariantPriceCalculatorInterface $productVariantPriceCalculator,
): void {
$item1->getVariant()->willReturn($item1Variant);
$item2->getVariant()->willReturn($item2Variant);
@@ -158,7 +158,7 @@ function it_filters_items_which_has_product_with_price_equal_to_configured_minim
function it_returns_all_items_if_configuration_is_invalid(
ChannelInterface $channel,
OrderItemInterface $item1,
- OrderItemInterface $item2
+ OrderItemInterface $item2,
): void {
$this->filter([$item1, $item2], [])->shouldReturn([$item1, $item2]);
$this->filter([$item1, $item2], [
@@ -169,7 +169,7 @@ function it_returns_all_items_if_configuration_is_invalid(
function it_throws_exception_if_channel_is_not_configured(
OrderItemInterface $item1,
- OrderItemInterface $item2
+ OrderItemInterface $item2,
): void {
$this
->shouldThrow(\InvalidArgumentException::class)
diff --git a/src/Sylius/Component/Core/spec/Promotion/Filter/ProductFilterSpec.php b/src/Sylius/Component/Core/spec/Promotion/Filter/ProductFilterSpec.php
index d43870c0ac3..2d46c6de321 100644
--- a/src/Sylius/Component/Core/spec/Promotion/Filter/ProductFilterSpec.php
+++ b/src/Sylius/Component/Core/spec/Promotion/Filter/ProductFilterSpec.php
@@ -29,7 +29,7 @@ function it_filters_passed_order_items_with_given_configuration(
OrderItemInterface $item1,
OrderItemInterface $item2,
ProductInterface $product1,
- ProductInterface $product2
+ ProductInterface $product2,
): void {
$item1->getProduct()->willReturn($product1);
$product1->getCode()->willReturn('product1');
diff --git a/src/Sylius/Component/Core/spec/Promotion/Filter/TaxonFilterSpec.php b/src/Sylius/Component/Core/spec/Promotion/Filter/TaxonFilterSpec.php
index 34deacfc25e..ac60e3391a1 100644
--- a/src/Sylius/Component/Core/spec/Promotion/Filter/TaxonFilterSpec.php
+++ b/src/Sylius/Component/Core/spec/Promotion/Filter/TaxonFilterSpec.php
@@ -33,7 +33,7 @@ function it_filters_passed_order_items_with_given_configuration(
ProductInterface $product1,
ProductInterface $product2,
TaxonInterface $taxon1,
- TaxonInterface $taxon2
+ TaxonInterface $taxon2,
): void {
$item1->getProduct()->willReturn($product1);
$product1->getTaxons()->willReturn(new ArrayCollection([$taxon1->getWrappedObject()]));
diff --git a/src/Sylius/Component/Core/spec/Promotion/Modifier/OrderPromotionsUsageModifierSpec.php b/src/Sylius/Component/Core/spec/Promotion/Modifier/OrderPromotionsUsageModifierSpec.php
index b9889729034..8d6b1eb699d 100644
--- a/src/Sylius/Component/Core/spec/Promotion/Modifier/OrderPromotionsUsageModifierSpec.php
+++ b/src/Sylius/Component/Core/spec/Promotion/Modifier/OrderPromotionsUsageModifierSpec.php
@@ -30,10 +30,10 @@ function it_implements_an_order_promotions_usage_modifier_interface(): void
function it_increments_a_usage_of_promotions_applied_on_order(
OrderInterface $order,
PromotionInterface $firstPromotion,
- PromotionInterface $secondPromotion
+ PromotionInterface $secondPromotion,
): void {
$order->getPromotions()->willReturn(
- new ArrayCollection([$firstPromotion->getWrappedObject(), $secondPromotion->getWrappedObject()])
+ new ArrayCollection([$firstPromotion->getWrappedObject(), $secondPromotion->getWrappedObject()]),
);
$order->getPromotionCoupon()->willReturn(null);
@@ -46,10 +46,10 @@ function it_increments_a_usage_of_promotions_applied_on_order(
function it_decrements_a_usage_of_promotions_applied_on_order(
OrderInterface $order,
PromotionInterface $firstPromotion,
- PromotionInterface $secondPromotion
+ PromotionInterface $secondPromotion,
): void {
$order->getPromotions()->willReturn(
- new ArrayCollection([$firstPromotion->getWrappedObject(), $secondPromotion->getWrappedObject()])
+ new ArrayCollection([$firstPromotion->getWrappedObject(), $secondPromotion->getWrappedObject()]),
);
$order->getPromotionCoupon()->willReturn(null);
@@ -63,10 +63,10 @@ function it_increments_a_usage_of_promotions_and_promotion_coupon_applied_on_ord
OrderInterface $order,
PromotionInterface $firstPromotion,
PromotionInterface $secondPromotion,
- PromotionCouponInterface $promotionCoupon
+ PromotionCouponInterface $promotionCoupon,
): void {
$order->getPromotions()->willReturn(
- new ArrayCollection([$firstPromotion->getWrappedObject(), $secondPromotion->getWrappedObject()])
+ new ArrayCollection([$firstPromotion->getWrappedObject(), $secondPromotion->getWrappedObject()]),
);
$order->getPromotionCoupon()->willReturn($promotionCoupon);
@@ -82,11 +82,11 @@ function it_decrements_a_usage_of_promotions_and_promotion_coupon_applied_on_ord
OrderInterface $order,
PromotionInterface $firstPromotion,
PromotionInterface $secondPromotion,
- PromotionCouponInterface $promotionCoupon
+ PromotionCouponInterface $promotionCoupon,
): void {
$order->getState()->willReturn('cancelled');
$order->getPromotions()->willReturn(
- new ArrayCollection([$firstPromotion->getWrappedObject(), $secondPromotion->getWrappedObject()])
+ new ArrayCollection([$firstPromotion->getWrappedObject(), $secondPromotion->getWrappedObject()]),
);
$order->getPromotionCoupon()->willReturn($promotionCoupon);
$promotionCoupon->isReusableFromCancelledOrders()->willReturn(true);
@@ -103,11 +103,11 @@ function it_decrements_a_usage_of_promotions_and_does_not_decrement_a_usage_of_p
OrderInterface $order,
PromotionInterface $firstPromotion,
PromotionInterface $secondPromotion,
- PromotionCouponInterface $promotionCoupon
+ PromotionCouponInterface $promotionCoupon,
): void {
$order->getState()->willReturn('cancelled');
$order->getPromotions()->willReturn(
- new ArrayCollection([$firstPromotion->getWrappedObject(), $secondPromotion->getWrappedObject()])
+ new ArrayCollection([$firstPromotion->getWrappedObject(), $secondPromotion->getWrappedObject()]),
);
$order->getPromotionCoupon()->willReturn($promotionCoupon);
$promotionCoupon->isReusableFromCancelledOrders()->willReturn(false);
diff --git a/src/Sylius/Component/Core/spec/Promotion/Updater/Rule/HasTaxonRuleUpdaterSpec.php b/src/Sylius/Component/Core/spec/Promotion/Updater/Rule/HasTaxonRuleUpdaterSpec.php
index d17c3a1caae..995d33fe1dc 100644
--- a/src/Sylius/Component/Core/spec/Promotion/Updater/Rule/HasTaxonRuleUpdaterSpec.php
+++ b/src/Sylius/Component/Core/spec/Promotion/Updater/Rule/HasTaxonRuleUpdaterSpec.php
@@ -34,7 +34,7 @@ function it_removes_deleted_taxon_from_rules_configurations(
PromotionRuleInterface $firstPromotionRule,
PromotionRuleInterface $secondPromotionRule,
PromotionInterface $promotion,
- TaxonInterface $taxon
+ TaxonInterface $taxon,
): void {
$taxon->getCode()->willReturn('toys');
diff --git a/src/Sylius/Component/Core/spec/Promotion/Updater/Rule/TotalOfItemsFromTaxonRuleUpdaterSpec.php b/src/Sylius/Component/Core/spec/Promotion/Updater/Rule/TotalOfItemsFromTaxonRuleUpdaterSpec.php
index 90e67d68eba..6fb64a21637 100644
--- a/src/Sylius/Component/Core/spec/Promotion/Updater/Rule/TotalOfItemsFromTaxonRuleUpdaterSpec.php
+++ b/src/Sylius/Component/Core/spec/Promotion/Updater/Rule/TotalOfItemsFromTaxonRuleUpdaterSpec.php
@@ -31,7 +31,7 @@ function it_removes_rules_that_using_deleted_taxon(
PromotionRuleInterface $firstPromotionRule,
PromotionRuleInterface $secondPromotionRule,
PromotionInterface $promotion,
- TaxonInterface $taxon
+ TaxonInterface $taxon,
): void {
$taxon->getCode()->willReturn('toys');
diff --git a/src/Sylius/Component/Core/spec/Provider/ActivePromotionsByChannelProviderSpec.php b/src/Sylius/Component/Core/spec/Provider/ActivePromotionsByChannelProviderSpec.php
index 8a08b3b1b47..1f4548534ff 100644
--- a/src/Sylius/Component/Core/spec/Provider/ActivePromotionsByChannelProviderSpec.php
+++ b/src/Sylius/Component/Core/spec/Provider/ActivePromotionsByChannelProviderSpec.php
@@ -39,7 +39,7 @@ function it_provides_an_active_promotions_for_given_subject_channel(
ChannelInterface $channel,
PromotionInterface $promotion1,
PromotionInterface $promotion2,
- OrderInterface $subject
+ OrderInterface $subject,
): void {
$subject->getChannel()->willReturn($channel);
$promotionRepository->findActiveByChannel($channel)->willReturn([$promotion1, $promotion2]);
diff --git a/src/Sylius/Component/Core/spec/Provider/ChannelBasedLocaleProviderSpec.php b/src/Sylius/Component/Core/spec/Provider/ChannelBasedLocaleProviderSpec.php
index 7f1c8c43939..a751244f51f 100644
--- a/src/Sylius/Component/Core/spec/Provider/ChannelBasedLocaleProviderSpec.php
+++ b/src/Sylius/Component/Core/spec/Provider/ChannelBasedLocaleProviderSpec.php
@@ -36,7 +36,7 @@ function it_is_a_locale_provider(): void
function it_returns_all_channels_locales_as_available_ones(
ChannelContextInterface $channelContext,
ChannelInterface $channel,
- LocaleInterface $enabledLocale
+ LocaleInterface $enabledLocale,
): void {
$channelContext->getChannel()->willReturn($channel);
@@ -50,7 +50,7 @@ function it_returns_all_channels_locales_as_available_ones(
}
function it_returns_the_default_locale_as_the_available_one_if_channel_cannot_be_determined(
- ChannelContextInterface $channelContext
+ ChannelContextInterface $channelContext,
): void {
$channelContext->getChannel()->willThrow(ChannelNotFoundException::class);
@@ -60,7 +60,7 @@ function it_returns_the_default_locale_as_the_available_one_if_channel_cannot_be
function it_returns_channels_default_locale(
ChannelContextInterface $channelContext,
ChannelInterface $channel,
- LocaleInterface $locale
+ LocaleInterface $locale,
): void {
$channelContext->getChannel()->willReturn($channel);
@@ -72,7 +72,7 @@ function it_returns_channels_default_locale(
}
function it_returns_the_default_locale_if_channel_cannot_be_determined(
- ChannelContextInterface $channelContext
+ ChannelContextInterface $channelContext,
): void {
$channelContext->getChannel()->willThrow(ChannelNotFoundException::class);
diff --git a/src/Sylius/Component/Core/spec/Provider/ProductVariantsPricesProviderSpec.php b/src/Sylius/Component/Core/spec/Provider/ProductVariantsPricesProviderSpec.php
index 6d3f259c609..5d6ff9e598d 100644
--- a/src/Sylius/Component/Core/spec/Provider/ProductVariantsPricesProviderSpec.php
+++ b/src/Sylius/Component/Core/spec/Provider/ProductVariantsPricesProviderSpec.php
@@ -45,7 +45,7 @@ function it_provides_array_containing_product_variant_options_map_with_correspon
ProductVariantInterface $blackSmallTShirt,
ProductVariantInterface $whiteLargeTShirt,
ProductVariantInterface $whiteSmallTShirt,
- ProductVariantPricesCalculatorInterface $productVariantPriceCalculator
+ ProductVariantPricesCalculatorInterface $productVariantPriceCalculator,
): void {
$tShirt->getEnabledVariants()->willReturn(new ArrayCollection([
$blackSmallTShirt->getWrappedObject(),
@@ -55,16 +55,16 @@ function it_provides_array_containing_product_variant_options_map_with_correspon
]));
$blackSmallTShirt->getOptionValues()->willReturn(
- new ArrayCollection([$black->getWrappedObject(), $small->getWrappedObject()])
+ new ArrayCollection([$black->getWrappedObject(), $small->getWrappedObject()]),
);
$whiteSmallTShirt->getOptionValues()->willReturn(
- new ArrayCollection([$white->getWrappedObject(), $small->getWrappedObject()])
+ new ArrayCollection([$white->getWrappedObject(), $small->getWrappedObject()]),
);
$blackLargeTShirt->getOptionValues()->willReturn(
- new ArrayCollection([$black->getWrappedObject(), $large->getWrappedObject()])
+ new ArrayCollection([$black->getWrappedObject(), $large->getWrappedObject()]),
);
$whiteLargeTShirt->getOptionValues()->willReturn(
- new ArrayCollection([$white->getWrappedObject(), $large->getWrappedObject()])
+ new ArrayCollection([$white->getWrappedObject(), $large->getWrappedObject()]),
);
$productVariantPriceCalculator->calculate($blackSmallTShirt, ['channel' => $channel])->willReturn(1000);
diff --git a/src/Sylius/Component/Core/spec/Resolver/ChannelBasedPaymentMethodsResolverSpec.php b/src/Sylius/Component/Core/spec/Resolver/ChannelBasedPaymentMethodsResolverSpec.php
index d20cad89be4..344c01759d6 100644
--- a/src/Sylius/Component/Core/spec/Resolver/ChannelBasedPaymentMethodsResolverSpec.php
+++ b/src/Sylius/Component/Core/spec/Resolver/ChannelBasedPaymentMethodsResolverSpec.php
@@ -40,7 +40,7 @@ function it_returns_payment_methods_matched_for_order_channel(
ChannelInterface $channel,
PaymentMethodRepositoryInterface $paymentMethodRepository,
PaymentMethodInterface $firstPaymentMethod,
- PaymentMethodInterface $secondPaymentMethod
+ PaymentMethodInterface $secondPaymentMethod,
): void {
$payment->getOrder()->willReturn($order);
$order->getChannel()->willReturn($channel);
@@ -57,7 +57,7 @@ function it_returns_an_empty_collection_if_there_is_no_enabled_payment_methods_f
PaymentInterface $payment,
OrderInterface $order,
ChannelInterface $channel,
- PaymentMethodRepositoryInterface $paymentMethodRepository
+ PaymentMethodRepositoryInterface $paymentMethodRepository,
): void {
$payment->getOrder()->willReturn($order);
$order->getChannel()->willReturn($channel);
@@ -73,7 +73,7 @@ function it_returns_an_empty_collection_if_there_is_no_enabled_payment_methods_f
function it_supports_shipments_with_order_and_its_shipping_address_defined(
PaymentInterface $payment,
OrderInterface $order,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$payment->getOrder()->willReturn($order);
$order->getChannel()->willReturn($channel);
@@ -83,7 +83,7 @@ function it_supports_shipments_with_order_and_its_shipping_address_defined(
function it_does_not_support_payments_for_order_with_not_assigned_channel(
PaymentInterface $payment,
- OrderInterface $order
+ OrderInterface $order,
): void {
$payment->getOrder()->willReturn($order);
$order->getChannel()->willReturn(null);
diff --git a/src/Sylius/Component/Core/spec/Resolver/DefaultPaymentMethodResolverSpec.php b/src/Sylius/Component/Core/spec/Resolver/DefaultPaymentMethodResolverSpec.php
index 3fd88dcd08b..bc68b4058a3 100644
--- a/src/Sylius/Component/Core/spec/Resolver/DefaultPaymentMethodResolverSpec.php
+++ b/src/Sylius/Component/Core/spec/Resolver/DefaultPaymentMethodResolverSpec.php
@@ -36,7 +36,7 @@ function it_implements_a_payment_method_resolver_interface(): void
}
function it_throws_an_invalid_argument_exception_if_subject_not_implements_core_payment_interface(
- PaymentInterface $payment
+ PaymentInterface $payment,
): void {
$this->shouldThrow(\InvalidArgumentException::class)->during('getDefaultPaymentMethod', [$payment]);
}
@@ -45,7 +45,7 @@ function it_throws_an_unresolved_default_payment_method_exception_if_there_is_no
CorePaymentInterface $payment,
PaymentMethodRepositoryInterface $paymentMethodRepository,
ChannelInterface $channel,
- OrderInterface $order
+ OrderInterface $order,
): void {
$payment->getOrder()->willReturn($order);
$order->getChannel()->willReturn($channel);
@@ -63,7 +63,7 @@ function it_returns_first_payment_method_from_availables_which_is_enclosed_in_ch
PaymentMethodInterface $firstPaymentMethod,
PaymentMethodInterface $secondPaymentMethod,
ChannelInterface $channel,
- OrderInterface $order
+ OrderInterface $order,
): void {
$payment->getOrder()->willReturn($order);
$order->getChannel()->willReturn($channel);
diff --git a/src/Sylius/Component/Core/spec/Resolver/DefaultShippingMethodResolverSpec.php b/src/Sylius/Component/Core/spec/Resolver/DefaultShippingMethodResolverSpec.php
index 79a13ce7c44..f91132750e9 100644
--- a/src/Sylius/Component/Core/spec/Resolver/DefaultShippingMethodResolverSpec.php
+++ b/src/Sylius/Component/Core/spec/Resolver/DefaultShippingMethodResolverSpec.php
@@ -41,7 +41,7 @@ function it_returns_first_enabled_shipping_method_from_shipment_order_channel(
ShipmentInterface $shipment,
ShippingMethodInterface $firstShippingMethod,
ShippingMethodInterface $secondShippingMethod,
- ShippingMethodRepositoryInterface $shippingMethodRepository
+ ShippingMethodRepositoryInterface $shippingMethodRepository,
): void {
$shipment->getOrder()->willReturn($order);
$order->getChannel()->willReturn($channel);
@@ -58,7 +58,7 @@ function it_throws_an_exception_if_there_is_no_enabled_shipping_methods_for_orde
ChannelInterface $channel,
OrderInterface $order,
ShipmentInterface $shipment,
- ShippingMethodRepositoryInterface $shippingMethodRepository
+ ShippingMethodRepositoryInterface $shippingMethodRepository,
): void {
$shipment->getOrder()->willReturn($order);
$order->getChannel()->willReturn($channel);
diff --git a/src/Sylius/Component/Core/spec/Resolver/EligibleDefaultShippingMethodResolverSpec.php b/src/Sylius/Component/Core/spec/Resolver/EligibleDefaultShippingMethodResolverSpec.php
index 36a88b84918..37895efdb5b 100644
--- a/src/Sylius/Component/Core/spec/Resolver/EligibleDefaultShippingMethodResolverSpec.php
+++ b/src/Sylius/Component/Core/spec/Resolver/EligibleDefaultShippingMethodResolverSpec.php
@@ -33,12 +33,12 @@ final class EligibleDefaultShippingMethodResolverSpec extends ObjectBehavior
function let(
ShippingMethodRepositoryInterface $shippingMethodRepository,
ShippingMethodEligibilityCheckerInterface $shippingMethodEligibilityChecker,
- ZoneMatcherInterface $zoneMatcher
+ ZoneMatcherInterface $zoneMatcher,
): void {
$this->beConstructedWith(
$shippingMethodRepository,
$shippingMethodEligibilityChecker,
- $zoneMatcher
+ $zoneMatcher,
);
}
@@ -55,7 +55,7 @@ function it_returns_first_enabled_and_eligible_shipping_method_from_shipment_ord
ShippingMethodInterface $secondShippingMethod,
ShippingMethodInterface $thirdShippingMethod,
ShippingMethodRepositoryInterface $shippingMethodRepository,
- ShippingMethodEligibilityCheckerInterface $shippingMethodEligibilityChecker
+ ShippingMethodEligibilityCheckerInterface $shippingMethodEligibilityChecker,
): void {
$shipment->getOrder()->willReturn($order);
$order->getChannel()->willReturn($channel);
@@ -84,7 +84,7 @@ function it_returns_enabled_and_eligible_shipping_method_from_shipment_order_cha
ShippingMethodEligibilityCheckerInterface $shippingMethodEligibilityChecker,
AddressInterface $shippingAddress,
ZoneMatcherInterface $zoneMatcher,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$shipment->getOrder()->willReturn($order);
$order->getChannel()->willReturn($channel);
@@ -111,7 +111,7 @@ function it_throws_an_exception_if_there_is_shipping_method_cannot_be_resolved(
ShippingMethodInterface $firstShippingMethod,
ShippingMethodInterface $secondShippingMethod,
ShippingMethodRepositoryInterface $shippingMethodRepository,
- ShippingMethodEligibilityCheckerInterface $shippingMethodEligibilityChecker
+ ShippingMethodEligibilityCheckerInterface $shippingMethodEligibilityChecker,
): void {
$shipment->getOrder()->willReturn($order);
$order->getChannel()->willReturn($channel);
diff --git a/src/Sylius/Component/Core/spec/Resolver/ZoneAndChannelBasedShippingMethodsResolverSpec.php b/src/Sylius/Component/Core/spec/Resolver/ZoneAndChannelBasedShippingMethodsResolverSpec.php
index 42a4631c627..cfc94d0077a 100644
--- a/src/Sylius/Component/Core/spec/Resolver/ZoneAndChannelBasedShippingMethodsResolverSpec.php
+++ b/src/Sylius/Component/Core/spec/Resolver/ZoneAndChannelBasedShippingMethodsResolverSpec.php
@@ -32,7 +32,7 @@ final class ZoneAndChannelBasedShippingMethodsResolverSpec extends ObjectBehavio
function let(
ShippingMethodRepositoryInterface $shippingMethodRepository,
ZoneMatcherInterface $zoneMatcher,
- ShippingMethodEligibilityCheckerInterface $eligibilityChecker
+ ShippingMethodEligibilityCheckerInterface $eligibilityChecker,
): void {
$this->beConstructedWith($shippingMethodRepository, $zoneMatcher, $eligibilityChecker);
}
@@ -53,7 +53,7 @@ function it_returns_shipping_methods_matched_for_shipment_order_shipping_address
ShippingMethodRepositoryInterface $shippingMethodRepository,
ZoneInterface $firstZone,
ZoneInterface $secondZone,
- ZoneMatcherInterface $zoneMatcher
+ ZoneMatcherInterface $zoneMatcher,
): void {
$shipment->getOrder()->willReturn($order);
$order->getShippingAddress()->willReturn($address);
@@ -77,7 +77,7 @@ function it_returns_an_empty_array_if_zone_matcher_could_not_match_any_zone(
AddressInterface $address,
ChannelInterface $channel,
ShipmentInterface $shipment,
- ZoneMatcherInterface $zoneMatcher
+ ZoneMatcherInterface $zoneMatcher,
): void {
$shipment->getOrder()->willReturn($order);
$order->getShippingAddress()->willReturn($address);
@@ -99,7 +99,7 @@ function it_returns_only_shipping_methods_that_are_eligible(
ShippingMethodRepositoryInterface $shippingMethodRepository,
ZoneInterface $firstZone,
ZoneInterface $secondZone,
- ZoneMatcherInterface $zoneMatcher
+ ZoneMatcherInterface $zoneMatcher,
): void {
$shipment->getOrder()->willReturn($order);
$order->getShippingAddress()->willReturn($address);
@@ -122,7 +122,7 @@ function it_supports_shipments_with_order_and_its_shipping_address_defined(
OrderInterface $order,
AddressInterface $address,
ChannelInterface $channel,
- ShipmentInterface $shipment
+ ShipmentInterface $shipment,
): void {
$shipment->getOrder()->willReturn($order);
$order->getShippingAddress()->willReturn($address);
@@ -134,7 +134,7 @@ function it_supports_shipments_with_order_and_its_shipping_address_defined(
function it_does_not_support_shipments_which_order_has_no_shipping_address_defined(
OrderInterface $order,
ChannelInterface $channel,
- ShipmentInterface $shipment
+ ShipmentInterface $shipment,
): void {
$shipment->getOrder()->willReturn($order);
$order->getShippingAddress()->willReturn(null);
@@ -146,7 +146,7 @@ function it_does_not_support_shipments_which_order_has_no_shipping_address_defin
function it_does_not_support_shipments_for_order_with_not_assigned_channel(
OrderInterface $order,
AddressInterface $address,
- ShipmentInterface $shipment
+ ShipmentInterface $shipment,
): void {
$shipment->getOrder()->willReturn($order);
$order->getShippingAddress()->willReturn($address);
diff --git a/src/Sylius/Component/Core/spec/Shipping/Calculator/FlatRateCalculatorSpec.php b/src/Sylius/Component/Core/spec/Shipping/Calculator/FlatRateCalculatorSpec.php
index eb23737db41..55a710061a6 100644
--- a/src/Sylius/Component/Core/spec/Shipping/Calculator/FlatRateCalculatorSpec.php
+++ b/src/Sylius/Component/Core/spec/Shipping/Calculator/FlatRateCalculatorSpec.php
@@ -38,7 +38,7 @@ function it_returns_flat_rate_type(CalculatorInterface $calculator): void
function it_calculates_the_flat_rate_amount_configured_on_the_method(
ShipmentInterface $shipment,
OrderInterface $order,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$shipment->getOrder()->willReturn($order);
$order->getChannel()->willReturn($channel);
@@ -51,7 +51,7 @@ function it_throws_a_channel_not_defined_exception_if_channel_code_key_does_not_
ShipmentInterface $shipment,
OrderInterface $order,
ChannelInterface $channel,
- ShippingMethodInterface $shippingMethod
+ ShippingMethodInterface $shippingMethod,
): void {
$shipment->getOrder()->willReturn($order);
$shipment->getMethod()->willReturn($shippingMethod);
diff --git a/src/Sylius/Component/Core/spec/Shipping/Calculator/PerUnitRateCalculatorSpec.php b/src/Sylius/Component/Core/spec/Shipping/Calculator/PerUnitRateCalculatorSpec.php
index 42bb72d835c..7098f8d986f 100644
--- a/src/Sylius/Component/Core/spec/Shipping/Calculator/PerUnitRateCalculatorSpec.php
+++ b/src/Sylius/Component/Core/spec/Shipping/Calculator/PerUnitRateCalculatorSpec.php
@@ -38,7 +38,7 @@ function it_returns_per_unit_rate_type(CalculatorInterface $calculator): void
function it_calculates_the_total_with_the_per_unit_amount_configured_on_the_method(
ShipmentInterface $shipment,
OrderInterface $order,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$shipment->getOrder()->willReturn($order);
$order->getChannel()->willReturn($channel);
@@ -52,7 +52,7 @@ function it_throws_a_channel_not_defined_exception_if_channel_code_key_does_not_
ShipmentInterface $shipment,
OrderInterface $order,
ChannelInterface $channel,
- ShippingMethodInterface $shippingMethod
+ ShippingMethodInterface $shippingMethod,
): void {
$shipment->getOrder()->willReturn($order);
$shipment->getMethod()->willReturn($shippingMethod);
diff --git a/src/Sylius/Component/Core/spec/Shipping/Checker/Rule/OrderTotalGreaterThanOrEqualRuleCheckerSpec.php b/src/Sylius/Component/Core/spec/Shipping/Checker/Rule/OrderTotalGreaterThanOrEqualRuleCheckerSpec.php
index 540f10976de..20882141ded 100644
--- a/src/Sylius/Component/Core/spec/Shipping/Checker/Rule/OrderTotalGreaterThanOrEqualRuleCheckerSpec.php
+++ b/src/Sylius/Component/Core/spec/Shipping/Checker/Rule/OrderTotalGreaterThanOrEqualRuleCheckerSpec.php
@@ -41,7 +41,7 @@ function it_denies_subject_if_subject_is_not_a_core_shipment(BaseShipmentInterfa
function it_recognizes_subject_if_order_total_is_greater_than_configured_amount(
ShipmentInterface $subject,
OrderInterface $order,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$subject->getOrder()->willReturn($order);
$order->getChannel()->willReturn($channel);
@@ -58,7 +58,7 @@ function it_recognizes_subject_if_order_total_is_greater_than_configured_amount(
function it_recognizes_subject_if_order_total_is_equal_to_configured_amount(
ShipmentInterface $subject,
OrderInterface $order,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$subject->getOrder()->willReturn($order);
$order->getChannel()->willReturn($channel);
@@ -75,7 +75,7 @@ function it_recognizes_subject_if_order_total_is_equal_to_configured_amount(
function it_denies_subject_if_order_total_is_less_than_configured_amount(
ShipmentInterface $subject,
OrderInterface $order,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$subject->getOrder()->willReturn($order);
$order->getChannel()->willReturn($channel);
diff --git a/src/Sylius/Component/Core/spec/Shipping/Checker/Rule/OrderTotalLessThanOrEqualRuleCheckerSpec.php b/src/Sylius/Component/Core/spec/Shipping/Checker/Rule/OrderTotalLessThanOrEqualRuleCheckerSpec.php
index 584b7487162..5dc4c31937d 100644
--- a/src/Sylius/Component/Core/spec/Shipping/Checker/Rule/OrderTotalLessThanOrEqualRuleCheckerSpec.php
+++ b/src/Sylius/Component/Core/spec/Shipping/Checker/Rule/OrderTotalLessThanOrEqualRuleCheckerSpec.php
@@ -41,7 +41,7 @@ public function it_denies_subject_if_subject_is_not_a_core_shipment(BaseShipment
public function it_recognizes_subject_if_order_total_is_less_than_configured_amount(
ShipmentInterface $subject,
OrderInterface $order,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$subject->getOrder()->willReturn($order);
$order->getChannel()->willReturn($channel);
@@ -58,7 +58,7 @@ public function it_recognizes_subject_if_order_total_is_less_than_configured_amo
public function it_recognizes_subject_if_order_total_is_equal_to_configured_amount(
ShipmentInterface $subject,
OrderInterface $order,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$subject->getOrder()->willReturn($order);
$order->getChannel()->willReturn($channel);
@@ -75,7 +75,7 @@ public function it_recognizes_subject_if_order_total_is_equal_to_configured_amou
public function it_denies_subject_if_order_total_is_greater_than_configured_amount(
ShipmentInterface $subject,
OrderInterface $order,
- ChannelInterface $channel
+ ChannelInterface $channel,
): void {
$subject->getOrder()->willReturn($order);
$order->getChannel()->willReturn($channel);
diff --git a/src/Sylius/Component/Core/spec/StateResolver/CheckoutStateResolverSpec.php b/src/Sylius/Component/Core/spec/StateResolver/CheckoutStateResolverSpec.php
index 30eeded8f22..939cbdd7e18 100644
--- a/src/Sylius/Component/Core/spec/StateResolver/CheckoutStateResolverSpec.php
+++ b/src/Sylius/Component/Core/spec/StateResolver/CheckoutStateResolverSpec.php
@@ -27,12 +27,12 @@ final class CheckoutStateResolverSpec extends ObjectBehavior
function let(
FactoryInterface $stateMachineFactory,
OrderPaymentMethodSelectionRequirementCheckerInterface $orderPaymentMethodSelectionRequirementChecker,
- OrderShippingMethodSelectionRequirementCheckerInterface $orderShippingMethodSelectionRequirementChecker
+ OrderShippingMethodSelectionRequirementCheckerInterface $orderShippingMethodSelectionRequirementChecker,
): void {
$this->beConstructedWith(
$stateMachineFactory,
$orderPaymentMethodSelectionRequirementChecker,
- $orderShippingMethodSelectionRequirementChecker
+ $orderShippingMethodSelectionRequirementChecker,
);
}
@@ -46,7 +46,7 @@ function it_applies_transition_skip_shipping_and_skip_payment_if_shipping_method
OrderInterface $order,
OrderPaymentMethodSelectionRequirementCheckerInterface $orderPaymentMethodSelectionRequirementChecker,
OrderShippingMethodSelectionRequirementCheckerInterface $orderShippingMethodSelectionRequirementChecker,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$orderPaymentMethodSelectionRequirementChecker->isPaymentMethodSelectionRequired($order)->willReturn(false);
@@ -68,7 +68,7 @@ function it_applies_transition_skip_shipping_if_shipping_method_selection_is_not
OrderInterface $order,
OrderPaymentMethodSelectionRequirementCheckerInterface $orderPaymentMethodSelectionRequirementChecker,
OrderShippingMethodSelectionRequirementCheckerInterface $orderShippingMethodSelectionRequirementChecker,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$orderPaymentMethodSelectionRequirementChecker->isPaymentMethodSelectionRequired($order)->willReturn(true);
@@ -90,7 +90,7 @@ function it_does_not_apply_skip_shipping_transition_if_shipping_method_selection
OrderInterface $order,
OrderPaymentMethodSelectionRequirementCheckerInterface $orderPaymentMethodSelectionRequirementChecker,
OrderShippingMethodSelectionRequirementCheckerInterface $orderShippingMethodSelectionRequirementChecker,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$orderPaymentMethodSelectionRequirementChecker->isPaymentMethodSelectionRequired($order)->willReturn(true);
@@ -112,7 +112,7 @@ function it_does_not_apply_skip_shipping_transition_if_it_is_not_possible(
OrderInterface $order,
OrderPaymentMethodSelectionRequirementCheckerInterface $orderPaymentMethodSelectionRequirementChecker,
OrderShippingMethodSelectionRequirementCheckerInterface $orderShippingMethodSelectionRequirementChecker,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$orderPaymentMethodSelectionRequirementChecker->isPaymentMethodSelectionRequired($order)->willReturn(true);
@@ -134,7 +134,7 @@ function it_applies_transition_skip_payment_if_payment_method_selection_is_not_r
OrderInterface $order,
OrderPaymentMethodSelectionRequirementCheckerInterface $orderPaymentMethodSelectionRequirementChecker,
OrderShippingMethodSelectionRequirementCheckerInterface $orderShippingMethodSelectionRequirementChecker,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$orderPaymentMethodSelectionRequirementChecker->isPaymentMethodSelectionRequired($order)->willReturn(false);
@@ -156,7 +156,7 @@ function it_does_not_apply_skip_payment_transition_if_payment_method_selection_i
OrderInterface $order,
OrderPaymentMethodSelectionRequirementCheckerInterface $orderPaymentMethodSelectionRequirementChecker,
OrderShippingMethodSelectionRequirementCheckerInterface $orderShippingMethodSelectionRequirementChecker,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$orderPaymentMethodSelectionRequirementChecker->isPaymentMethodSelectionRequired($order)->willReturn(true);
@@ -178,7 +178,7 @@ function it_does_not_apply_skip_payment_transition_if_transition_skip_payment_is
OrderInterface $order,
OrderPaymentMethodSelectionRequirementCheckerInterface $orderPaymentMethodSelectionRequirementChecker,
OrderShippingMethodSelectionRequirementCheckerInterface $orderShippingMethodSelectionRequirementChecker,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$orderPaymentMethodSelectionRequirementChecker->isPaymentMethodSelectionRequired($order)->willReturn(true);
diff --git a/src/Sylius/Component/Core/spec/StateResolver/OrderPaymentStateResolverSpec.php b/src/Sylius/Component/Core/spec/StateResolver/OrderPaymentStateResolverSpec.php
index fa25b95df26..cf83aa467b1 100644
--- a/src/Sylius/Component/Core/spec/StateResolver/OrderPaymentStateResolverSpec.php
+++ b/src/Sylius/Component/Core/spec/StateResolver/OrderPaymentStateResolverSpec.php
@@ -39,7 +39,7 @@ function it_marks_an_order_as_refunded_if_all_its_payments_are_refunded(
StateMachineInterface $stateMachine,
OrderInterface $order,
PaymentInterface $firstPayment,
- PaymentInterface $secondPayment
+ PaymentInterface $secondPayment,
): void {
$firstPayment->getAmount()->willReturn(6000);
$firstPayment->getState()->willReturn(PaymentInterface::STATE_REFUNDED);
@@ -64,7 +64,7 @@ function it_marks_an_order_as_refunded_if_its_payments_are_refunded_or_failed_bu
StateMachineInterface $stateMachine,
OrderInterface $order,
PaymentInterface $firstPayment,
- PaymentInterface $secondPayment
+ PaymentInterface $secondPayment,
): void {
$firstPayment->getAmount()->willReturn(10000);
$firstPayment->getState()->willReturn(PaymentInterface::STATE_FAILED);
@@ -88,7 +88,7 @@ function it_marks_an_order_as_paid_if_fully_paid(
FactoryInterface $stateMachineFactory,
StateMachineInterface $stateMachine,
OrderInterface $order,
- PaymentInterface $payment
+ PaymentInterface $payment,
): void {
$payment->getAmount()->willReturn(10000);
$payment->getState()->willReturn(PaymentInterface::STATE_COMPLETED);
@@ -108,7 +108,7 @@ function it_marks_an_order_as_paid_if_fully_paid(
function it_marks_an_order_as_paid_if_it_does_not_have_any_payments(
FactoryInterface $stateMachineFactory,
StateMachineInterface $stateMachine,
- OrderInterface $order
+ OrderInterface $order,
) {
$order->getPayments()->willReturn(new ArrayCollection([]));
$order->getTotal()->willReturn(0);
@@ -125,7 +125,7 @@ function it_marks_an_order_as_paid_if_fully_paid_even_if_previous_payment_was_fa
StateMachineInterface $stateMachine,
OrderInterface $order,
PaymentInterface $firstPayment,
- PaymentInterface $secondPayment
+ PaymentInterface $secondPayment,
): void {
$firstPayment->getAmount()->willReturn(10000);
$firstPayment->getState()->willReturn(PaymentInterface::STATE_FAILED);
@@ -149,7 +149,7 @@ function it_marks_an_order_as_partially_refunded_if_one_of_the_payment_is_refund
StateMachineInterface $stateMachine,
OrderInterface $order,
PaymentInterface $firstPayment,
- PaymentInterface $secondPayment
+ PaymentInterface $secondPayment,
): void {
$firstPayment->getAmount()->willReturn(6000);
$firstPayment->getState()->willReturn(PaymentInterface::STATE_COMPLETED);
@@ -174,7 +174,7 @@ function it_marks_an_order_as_completed_if_fully_paid_multiple_payments(
StateMachineInterface $stateMachine,
OrderInterface $order,
PaymentInterface $firstPayment,
- PaymentInterface $secondPayment
+ PaymentInterface $secondPayment,
): void {
$firstPayment->getAmount()->willReturn(6000);
$firstPayment->getState()->willReturn(PaymentInterface::STATE_COMPLETED);
@@ -199,7 +199,7 @@ function it_marks_an_order_as_partially_paid_if_one_of_the_payment_is_processing
StateMachineInterface $stateMachine,
OrderInterface $order,
PaymentInterface $firstPayment,
- PaymentInterface $secondPayment
+ PaymentInterface $secondPayment,
): void {
$firstPayment->getAmount()->willReturn(6000);
$firstPayment->getState()->willReturn(PaymentInterface::STATE_PROCESSING);
@@ -224,7 +224,7 @@ function it_marks_an_order_as_authorized_if_all_its_payments_are_authorized(
StateMachineInterface $stateMachine,
OrderInterface $order,
PaymentInterface $firstPayment,
- PaymentInterface $secondPayment
+ PaymentInterface $secondPayment,
): void {
$firstPayment->getAmount()->willReturn(6000);
$firstPayment->getState()->willReturn(PaymentInterface::STATE_AUTHORIZED);
@@ -249,7 +249,7 @@ function it_marks_an_order_as_partially_authorized_if_one_of_the_payments_is_pro
StateMachineInterface $stateMachine,
OrderInterface $order,
PaymentInterface $firstPayment,
- PaymentInterface $secondPayment
+ PaymentInterface $secondPayment,
): void {
$firstPayment->getAmount()->willReturn(6000);
$firstPayment->getState()->willReturn(PaymentInterface::STATE_PROCESSING);
@@ -273,7 +273,7 @@ function it_marks_an_order_as_awaiting_payment_if_payments_is_processing(
FactoryInterface $stateMachineFactory,
StateMachineInterface $stateMachine,
OrderInterface $order,
- PaymentInterface $firstPayment
+ PaymentInterface $firstPayment,
): void {
$firstPayment->getAmount()->willReturn(6000);
$firstPayment->getState()->willReturn(PaymentInterface::STATE_PROCESSING);
diff --git a/src/Sylius/Component/Core/spec/StateResolver/OrderShippingStateResolverSpec.php b/src/Sylius/Component/Core/spec/StateResolver/OrderShippingStateResolverSpec.php
index 26f496b393b..a664fe79de1 100644
--- a/src/Sylius/Component/Core/spec/StateResolver/OrderShippingStateResolverSpec.php
+++ b/src/Sylius/Component/Core/spec/StateResolver/OrderShippingStateResolverSpec.php
@@ -40,7 +40,7 @@ function it_marks_an_order_as_shipped_if_all_shipments_delivered(
OrderInterface $order,
ShipmentInterface $shipment1,
ShipmentInterface $shipment2,
- StateMachineInterface $orderStateMachine
+ StateMachineInterface $orderStateMachine,
): void {
$shipments = new ArrayCollection();
$shipments->add($shipment1->getWrappedObject());
@@ -61,7 +61,7 @@ function it_marks_an_order_as_shipped_if_all_shipments_delivered(
function it_marks_an_order_as_shipped_if_there_are_no_shipments_to_deliver(
FactoryInterface $stateMachineFactory,
OrderInterface $order,
- StateMachineInterface $orderStateMachine
+ StateMachineInterface $orderStateMachine,
): void {
$order->getShipments()->willReturn(new ArrayCollection());
$order->getShippingState()->willReturn(OrderShippingStates::STATE_READY);
@@ -77,7 +77,7 @@ function it_marks_an_order_as_partially_shipped_if_some_shipments_are_delivered(
OrderInterface $order,
ShipmentInterface $shipment1,
ShipmentInterface $shipment2,
- StateMachineInterface $orderStateMachine
+ StateMachineInterface $orderStateMachine,
): void {
$shipments = new ArrayCollection();
$shipments->add($shipment1->getWrappedObject());
@@ -100,7 +100,7 @@ function it_does_not_mark_an_order_if_it_is_already_in_this_shipping_state(
OrderInterface $order,
ShipmentInterface $shipment1,
ShipmentInterface $shipment2,
- StateMachineInterface $orderStateMachine
+ StateMachineInterface $orderStateMachine,
): void {
$shipments = new ArrayCollection();
$shipments->add($shipment1->getWrappedObject());
diff --git a/src/Sylius/Component/Core/spec/StateResolver/OrderStateResolverSpec.php b/src/Sylius/Component/Core/spec/StateResolver/OrderStateResolverSpec.php
index 2614c12f8c1..1dd166860c1 100644
--- a/src/Sylius/Component/Core/spec/StateResolver/OrderStateResolverSpec.php
+++ b/src/Sylius/Component/Core/spec/StateResolver/OrderStateResolverSpec.php
@@ -38,7 +38,7 @@ function it_implements_a_state_resolver_interface(): void
function it_marks_an_order_as_fulfilled_when_its_paid_for_and_has_been_shipped(
FactoryInterface $stateMachineFactory,
OrderInterface $order,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$order->getShippingState()->willReturn(OrderShippingStates::STATE_SHIPPED);
$order->getPaymentState()->willReturn(OrderPaymentStates::STATE_PAID);
@@ -54,7 +54,7 @@ function it_marks_an_order_as_fulfilled_when_its_paid_for_and_has_been_shipped(
function it_does_not_mark_an_order_as_fulfilled_when_it_has_been_paid_but_not_shipped(
FactoryInterface $stateMachineFactory,
OrderInterface $order,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$order->getShippingState()->willReturn(Argument::not(OrderShippingStates::STATE_SHIPPED));
$order->getPaymentState()->willReturn(OrderPaymentStates::STATE_PAID);
@@ -70,7 +70,7 @@ function it_does_not_mark_an_order_as_fulfilled_when_it_has_been_paid_but_not_sh
function it_does_not_mark_an_order_as_fulfilled_when_it_has_been_shipped_but_not_paid(
FactoryInterface $stateMachineFactory,
OrderInterface $order,
- StateMachineInterface $stateMachine
+ StateMachineInterface $stateMachine,
): void {
$order->getShippingState()->willReturn(OrderShippingStates::STATE_SHIPPED);
$order->getPaymentState()->willReturn(Argument::not(OrderPaymentStates::STATE_PAID));
diff --git a/src/Sylius/Component/Core/spec/Taxation/Applicator/OrderItemUnitsTaxesApplicatorSpec.php b/src/Sylius/Component/Core/spec/Taxation/Applicator/OrderItemUnitsTaxesApplicatorSpec.php
index f523435488e..a9e7a11fe3c 100644
--- a/src/Sylius/Component/Core/spec/Taxation/Applicator/OrderItemUnitsTaxesApplicatorSpec.php
+++ b/src/Sylius/Component/Core/spec/Taxation/Applicator/OrderItemUnitsTaxesApplicatorSpec.php
@@ -34,7 +34,7 @@ final class OrderItemUnitsTaxesApplicatorSpec extends ObjectBehavior
function let(
CalculatorInterface $calculator,
AdjustmentFactoryInterface $adjustmentsFactory,
- TaxRateResolverInterface $taxRateResolver
+ TaxRateResolverInterface $taxRateResolver,
): void {
$this->beConstructedWith($calculator, $adjustmentsFactory, $taxRateResolver);
}
@@ -58,7 +58,7 @@ function it_applies_taxes_on_units_based_on_item_total_and_rate(
OrderItemUnitInterface $unit2,
ProductVariantInterface $productVariant,
TaxRateInterface $taxRate,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$order->getItems()->willReturn($items);
@@ -93,7 +93,7 @@ function it_applies_taxes_on_units_based_on_item_total_and_rate(
'taxRateCode' => 'simple_tax',
'taxRateName' => 'Simple tax',
'taxRateAmount' => 0.1,
- ]
+ ],
)
->willReturn($taxAdjustment1)
;
@@ -107,7 +107,7 @@ function it_applies_taxes_on_units_based_on_item_total_and_rate(
'taxRateCode' => 'simple_tax',
'taxRateName' => 'Simple tax',
'taxRateAmount' => 0.1,
- ]
+ ],
)
->willReturn($taxAdjustment2)
;
@@ -126,7 +126,7 @@ function it_does_nothing_if_order_item_has_no_units(
OrderItemInterface $orderItem,
ProductVariantInterface $productVariant,
TaxRateInterface $taxRate,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$orderItems = new ArrayCollection([$orderItem->getWrappedObject()]);
$order->getItems()->willReturn($orderItems);
@@ -148,7 +148,7 @@ function it_does_nothing_if_tax_rate_cannot_be_resolved(
OrderInterface $order,
OrderItemInterface $orderItem,
ProductVariantInterface $productVariant,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$order->getItems()->willReturn($items);
@@ -178,7 +178,7 @@ function it_does_not_apply_taxes_with_amount_0(
OrderItemUnitInterface $unit2,
ProductVariantInterface $productVariant,
TaxRateInterface $taxRate,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$order->getItems()->willReturn($items);
diff --git a/src/Sylius/Component/Core/spec/Taxation/Applicator/OrderItemsTaxesApplicatorSpec.php b/src/Sylius/Component/Core/spec/Taxation/Applicator/OrderItemsTaxesApplicatorSpec.php
index a1efa3924f0..43a43944ca0 100644
--- a/src/Sylius/Component/Core/spec/Taxation/Applicator/OrderItemsTaxesApplicatorSpec.php
+++ b/src/Sylius/Component/Core/spec/Taxation/Applicator/OrderItemsTaxesApplicatorSpec.php
@@ -35,7 +35,7 @@ function let(
CalculatorInterface $calculator,
AdjustmentFactoryInterface $adjustmentsFactory,
IntegerDistributorInterface $distributor,
- TaxRateResolverInterface $taxRateResolver
+ TaxRateResolverInterface $taxRateResolver,
): void {
$this->beConstructedWith($calculator, $adjustmentsFactory, $distributor, $taxRateResolver);
}
@@ -60,7 +60,7 @@ function it_applies_taxes_on_units_based_on_item_total_and_rate(
OrderItemUnitInterface $unit2,
ProductVariantInterface $productVariant,
TaxRateInterface $taxRate,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$order->getItems()->willReturn($items);
@@ -96,7 +96,7 @@ function it_applies_taxes_on_units_based_on_item_total_and_rate(
'taxRateCode' => 'simple_tax',
'taxRateName' => 'Simple tax',
'taxRateAmount' => 0.1,
- ]
+ ],
)
->willReturn($taxAdjustment1, $taxAdjustment2)
;
@@ -110,7 +110,7 @@ function it_applies_taxes_on_units_based_on_item_total_and_rate(
function it_throws_an_invalid_argument_exception_if_order_item_has_0_quantity(
OrderInterface $order,
OrderItemInterface $orderItem,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$items = new ArrayCollection([$orderItem->getWrappedObject()]);
$order->getItems()->willReturn($items);
@@ -127,7 +127,7 @@ function it_does_nothing_if_tax_rate_cannot_be_resolved(
OrderInterface $order,
OrderItemInterface $orderItem,
ProductVariantInterface $productVariant,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$order->getItems()->willReturn($items);
@@ -161,7 +161,7 @@ function it_does_not_apply_taxes_with_amount_0(
OrderItemUnitInterface $unit2,
ProductVariantInterface $productVariant,
TaxRateInterface $taxRate,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$order->getItems()->willReturn($items);
diff --git a/src/Sylius/Component/Core/spec/Taxation/Applicator/OrderShipmentTaxesApplicatorSpec.php b/src/Sylius/Component/Core/spec/Taxation/Applicator/OrderShipmentTaxesApplicatorSpec.php
index 20824d415f4..acf4f8a34ac 100644
--- a/src/Sylius/Component/Core/spec/Taxation/Applicator/OrderShipmentTaxesApplicatorSpec.php
+++ b/src/Sylius/Component/Core/spec/Taxation/Applicator/OrderShipmentTaxesApplicatorSpec.php
@@ -32,7 +32,7 @@ final class OrderShipmentTaxesApplicatorSpec extends ObjectBehavior
function let(
CalculatorInterface $calculator,
AdjustmentFactoryInterface $adjustmentsFactory,
- TaxRateResolverInterface $taxRateResolver
+ TaxRateResolverInterface $taxRateResolver,
): void {
$this->beConstructedWith($calculator, $adjustmentsFactory, $taxRateResolver);
}
@@ -51,7 +51,7 @@ function it_applies_shipment_taxes_on_order_based_on_shipment_adjustments_promot
ShipmentInterface $shipment,
ShippingMethodInterface $shippingMethod,
TaxRateInterface $taxRate,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$order->getShippingTotal()->willReturn(1000);
$order->hasShipments()->willReturn(true);
@@ -83,7 +83,7 @@ function it_applies_shipment_taxes_on_order_based_on_shipment_adjustments_promot
'taxRateCode' => 'simple_tax',
'taxRateName' => 'Simple tax',
'taxRateAmount' => 0.1,
- ]
+ ],
)
->willReturn($shippingTaxAdjustment)
;
@@ -103,7 +103,7 @@ function it_applies_taxes_on_multiple_shipments_based_on_shipment_adjustments_pr
ShipmentInterface $secondShipment,
ShippingMethodInterface $shippingMethod,
TaxRateInterface $taxRate,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$order->getShippingTotal()->willReturn(1000);
$order->hasShipments()->willReturn(true);
@@ -139,7 +139,7 @@ function it_applies_taxes_on_multiple_shipments_based_on_shipment_adjustments_pr
'taxRateCode' => 'simple_tax',
'taxRateName' => 'Simple tax',
'taxRateAmount' => 0.1,
- ]
+ ],
)
->willReturn($firstShippingTaxAdjustment)
;
@@ -158,7 +158,7 @@ function it_applies_taxes_on_multiple_shipments_based_on_shipment_adjustments_pr
'taxRateCode' => 'simple_tax',
'taxRateName' => 'Simple tax',
'taxRateAmount' => 0.1,
- ]
+ ],
)
->willReturn($secondShippingTaxAdjustment)
;
@@ -178,7 +178,7 @@ function it_applies_taxes_on_multiple_shipments_when_there_is_no_tax_rate_for_on
ShippingMethodInterface $firstShippingMethod,
ShippingMethodInterface $secondShippingMethod,
TaxRateInterface $taxRate,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$order->getShippingTotal()->willReturn(1000);
$order->hasShipments()->willReturn(true);
@@ -221,7 +221,7 @@ function it_applies_taxes_on_multiple_shipments_when_there_is_no_tax_rate_for_on
'taxRateCode' => 'simple_tax',
'taxRateName' => 'Simple tax',
'taxRateAmount' => 0.1,
- ]
+ ],
)
->willReturn($shippingTaxAdjustment)
;
@@ -241,7 +241,7 @@ function it_applies_taxes_on_multiple_shipments_when_one_of_them_has_0_tax_amoun
ShippingMethodInterface $firstShippingMethod,
ShippingMethodInterface $secondShippingMethod,
TaxRateInterface $taxRate,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$order->getShippingTotal()->willReturn(1000);
$order->hasShipments()->willReturn(true);
@@ -283,7 +283,7 @@ function it_applies_taxes_on_multiple_shipments_when_one_of_them_has_0_tax_amoun
'taxRateCode' => 'simple_tax',
'taxRateName' => 'Simple tax',
'taxRateAmount' => 0.1,
- ]
+ ],
)
->shouldNotBeCalled()
;
@@ -301,7 +301,7 @@ function it_applies_taxes_on_multiple_shipments_when_one_of_them_has_0_tax_amoun
'taxRateCode' => 'simple_tax',
'taxRateName' => 'Simple tax',
'taxRateAmount' => 0.1,
- ]
+ ],
)
->willReturn($shippingTaxAdjustment)
;
@@ -318,7 +318,7 @@ function it_does_nothing_if_the_tax_amount_is_0(
ShipmentInterface $shipment,
ShippingMethodInterface $shippingMethod,
TaxRateInterface $taxRate,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$order->getShippingTotal()->willReturn(1000);
$order->hasShipments()->willReturn(true);
@@ -338,7 +338,7 @@ function it_does_nothing_if_the_tax_amount_is_0(
function it_throws_an_exception_if_order_has_no_shipment_but_shipment_total_is_greater_than_0(
OrderInterface $order,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$order->getShippingTotal()->willReturn(10);
$order->hasShipments()->willReturn(false);
@@ -352,7 +352,7 @@ function it_does_nothing_if_tax_rate_cannot_be_resolved(
OrderInterface $order,
ShipmentInterface $shipment,
ShippingMethodInterface $shippingMethod,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$order->getShippingTotal()->willReturn(100);
$order->hasShipments()->willReturn(true);
@@ -370,7 +370,7 @@ function it_does_nothing_if_tax_rate_cannot_be_resolved(
function it_does_nothing_if_order_has_0_shipping_total(
TaxRateResolverInterface $taxRateResolver,
OrderInterface $order,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$order->getShippingTotal()->willReturn(0);
diff --git a/src/Sylius/Component/Core/spec/Test/Factory/TestPromotionFactorySpec.php b/src/Sylius/Component/Core/spec/Test/Factory/TestPromotionFactorySpec.php
index 009f04667ca..aea5222b9b6 100644
--- a/src/Sylius/Component/Core/spec/Test/Factory/TestPromotionFactorySpec.php
+++ b/src/Sylius/Component/Core/spec/Test/Factory/TestPromotionFactorySpec.php
@@ -46,7 +46,7 @@ function it_creates_a_promotion_with_a_given_name($promotionFactory, PromotionIn
function it_creates_a_promotion_with_a_given_name_and_channel(
FactoryInterface $promotionFactory,
ChannelInterface $channel,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$promotionFactory->createNew()->willReturn($promotion);
$promotion->setName('Super promotion')->shouldBeCalled();
diff --git a/src/Sylius/Component/Core/spec/Test/Services/DefaultChannelFactorySpec.php b/src/Sylius/Component/Core/spec/Test/Services/DefaultChannelFactorySpec.php
index 002eb3dab4b..54ff5a19909 100644
--- a/src/Sylius/Component/Core/spec/Test/Services/DefaultChannelFactorySpec.php
+++ b/src/Sylius/Component/Core/spec/Test/Services/DefaultChannelFactorySpec.php
@@ -30,7 +30,7 @@ function let(
FactoryInterface $localeFactory,
RepositoryInterface $channelRepository,
RepositoryInterface $currencyRepository,
- RepositoryInterface $localeRepository
+ RepositoryInterface $localeRepository,
): void {
$this->beConstructedWith(
$channelFactory,
@@ -39,7 +39,7 @@ function let(
$channelRepository,
$currencyRepository,
$localeRepository,
- 'en_US'
+ 'en_US',
);
}
@@ -57,7 +57,7 @@ function it_creates_a_default_channel_and_persist_it(
RepositoryInterface $localeRepository,
ChannelInterface $channel,
CurrencyInterface $currency,
- LocaleInterface $locale
+ LocaleInterface $locale,
): void {
$localeFactory->createNew()->willReturn($locale);
$locale->setCode('en_US')->shouldBeCalled();
diff --git a/src/Sylius/Component/Core/spec/Test/Services/DefaultUnitedStatesChannelFactorySpec.php b/src/Sylius/Component/Core/spec/Test/Services/DefaultUnitedStatesChannelFactorySpec.php
index 4bbd2e724f5..c33735e250d 100644
--- a/src/Sylius/Component/Core/spec/Test/Services/DefaultUnitedStatesChannelFactorySpec.php
+++ b/src/Sylius/Component/Core/spec/Test/Services/DefaultUnitedStatesChannelFactorySpec.php
@@ -37,7 +37,7 @@ function let(
FactoryInterface $countryFactory,
FactoryInterface $currencyFactory,
FactoryInterface $localeFactory,
- ZoneFactoryInterface $zoneFactory
+ ZoneFactoryInterface $zoneFactory,
): void {
$this->beConstructedWith(
$channelRepository,
@@ -50,7 +50,7 @@ function let(
$currencyFactory,
$localeFactory,
$zoneFactory,
- 'en_US'
+ 'en_US',
);
}
@@ -74,7 +74,7 @@ function it_creates_a_default_united_states_channel_with_country_zone_and_usd_as
ChannelInterface $channel,
CountryInterface $unitedStates,
CurrencyInterface $currency,
- LocaleInterface $locale
+ LocaleInterface $locale,
): void {
$channel->getName()->willReturn('United States');
$channelFactory->createNamed('United States')->willReturn($channel);
diff --git a/src/Sylius/Component/Core/spec/Translation/TranslatableEntityLocaleAssignerSpec.php b/src/Sylius/Component/Core/spec/Translation/TranslatableEntityLocaleAssignerSpec.php
index f7a46147dbb..933e9b11800 100644
--- a/src/Sylius/Component/Core/spec/Translation/TranslatableEntityLocaleAssignerSpec.php
+++ b/src/Sylius/Component/Core/spec/Translation/TranslatableEntityLocaleAssignerSpec.php
@@ -35,7 +35,7 @@ function it_implements_traslatable_entity_locale_assigner_interface(): void
function it_should_assign_current_and_default_locale_to_given_translatable_entity(
LocaleContextInterface $localeContext,
TranslationLocaleProviderInterface $translationLocaleProvider,
- TranslatableInterface $translatableEntity
+ TranslatableInterface $translatableEntity,
): void {
$localeContext->getLocaleCode()->willReturn('de_DE');
$translationLocaleProvider->getDefaultLocaleCode()->willReturn('en_US');
@@ -49,7 +49,7 @@ function it_should_assign_current_and_default_locale_to_given_translatable_entit
function it_should_use_default_locale_as_current_if_could_not_resolve_the_current_locale(
LocaleContextInterface $localeContext,
TranslationLocaleProviderInterface $translationLocaleProvider,
- TranslatableInterface $translatableEntity
+ TranslatableInterface $translatableEntity,
): void {
$localeContext->getLocaleCode()->willThrow(new LocaleNotFoundException());
$translationLocaleProvider->getDefaultLocaleCode()->willReturn('en_US');
diff --git a/src/Sylius/Component/Core/spec/Updater/UnpaidOrdersStateUpdaterSpec.php b/src/Sylius/Component/Core/spec/Updater/UnpaidOrdersStateUpdaterSpec.php
index fc97bd7ca18..db8422a469b 100644
--- a/src/Sylius/Component/Core/spec/Updater/UnpaidOrdersStateUpdaterSpec.php
+++ b/src/Sylius/Component/Core/spec/Updater/UnpaidOrdersStateUpdaterSpec.php
@@ -42,7 +42,7 @@ function it_cancels_unpaid_orders(
OrderInterface $secondOrder,
OrderRepositoryInterface $orderRepository,
StateMachineInterface $firstOrderStateMachine,
- StateMachineInterface $secondOrderStateMachine
+ StateMachineInterface $secondOrderStateMachine,
): void {
$orderRepository->findOrdersUnpaidSince(Argument::type(\DateTimeInterface::class))->willReturn([
$firstOrder,
@@ -65,7 +65,7 @@ function it_wont_stop_cancelling_unpaid_orders_on_exception_for_a_single_order_a
OrderRepositoryInterface $orderRepository,
StateMachineInterface $firstOrderStateMachine,
StateMachineInterface $secondOrderStateMachine,
- LoggerInterface $logger
+ LoggerInterface $logger,
): void {
$orderRepository->findOrdersUnpaidSince(Argument::type(\DateTimeInterface::class))->willReturn([
$firstOrder,
@@ -78,12 +78,13 @@ function it_wont_stop_cancelling_unpaid_orders_on_exception_for_a_single_order_a
$stateMachineFactory->get($secondOrder, 'sylius_order')->willReturn($secondOrderStateMachine);
$firstOrderStateMachine->apply(OrderTransitions::TRANSITION_CANCEL)->shouldBeCalled()
- ->willThrow(new SMException());
+ ->willThrow(new SMException())
+ ;
$secondOrderStateMachine->apply(OrderTransitions::TRANSITION_CANCEL)->shouldBeCalled();
$logger->error(
Argument::containingString('An error occurred while cancelling unpaid order #13'),
- Argument::any()
+ Argument::any(),
)->shouldBeCalled();
$this->cancel();
@@ -95,7 +96,7 @@ function it_wont_stop_cancelling_unpaid_orders_on_exception_for_a_single_order_a
OrderInterface $secondOrder,
OrderRepositoryInterface $orderRepository,
StateMachineInterface $firstOrderStateMachine,
- StateMachineInterface $secondOrderStateMachine
+ StateMachineInterface $secondOrderStateMachine,
): void {
$this->beConstructedWith($orderRepository, $stateMachineFactory, '10 months', null);
@@ -110,7 +111,8 @@ function it_wont_stop_cancelling_unpaid_orders_on_exception_for_a_single_order_a
$stateMachineFactory->get($secondOrder, 'sylius_order')->willReturn($secondOrderStateMachine);
$firstOrderStateMachine->apply(OrderTransitions::TRANSITION_CANCEL)->shouldBeCalled()
- ->willThrow(new SMException());
+ ->willThrow(new SMException())
+ ;
$secondOrderStateMachine->apply(OrderTransitions::TRANSITION_CANCEL)->shouldBeCalled();
$this->cancel();
diff --git a/src/Sylius/Component/Core/spec/Uploader/ImageUploaderSpec.php b/src/Sylius/Component/Core/spec/Uploader/ImageUploaderSpec.php
index d887da4951e..1b4e3abb9a1 100644
--- a/src/Sylius/Component/Core/spec/Uploader/ImageUploaderSpec.php
+++ b/src/Sylius/Component/Core/spec/Uploader/ImageUploaderSpec.php
@@ -26,7 +26,7 @@ final class ImageUploaderSpec extends ObjectBehavior
function let(
Filesystem $filesystem,
ImagePathGeneratorInterface $imagePathGenerator,
- ImageInterface $image
+ ImageInterface $image,
): void {
$filesystem->has(Argument::any())->willReturn(false);
@@ -43,7 +43,7 @@ function it_is_an_image_uploader(): void
function it_triggers_a_deprecation_exception_if_not_image_path_generator_is_passed(
Filesystem $filesystem,
- ImageInterface $image
+ ImageInterface $image,
): void {
$filesystem->has(Argument::any())->willReturn(false);
@@ -59,7 +59,7 @@ function it_triggers_a_deprecation_exception_if_not_image_path_generator_is_pass
function it_uploads_an_image(
Filesystem $filesystem,
ImagePathGeneratorInterface $imagePathGenerator,
- ImageInterface $image
+ ImageInterface $image,
): void {
$image->hasFile()->willReturn(true);
$image->getPath()->willReturn('foo.jpg');
@@ -82,7 +82,7 @@ function it_uploads_an_image(
function it_replaces_an_image(
Filesystem $filesystem,
ImagePathGeneratorInterface $imagePathGenerator,
- ImageInterface $image
+ ImageInterface $image,
): void {
$image->hasFile()->willReturn(true);
$image->getPath()->willReturn('foo.jpg');
diff --git a/src/Sylius/Component/Currency/Context/CurrencyNotFoundException.php b/src/Sylius/Component/Currency/Context/CurrencyNotFoundException.php
index 86197007491..f5bd791b009 100644
--- a/src/Sylius/Component/Currency/Context/CurrencyNotFoundException.php
+++ b/src/Sylius/Component/Currency/Context/CurrencyNotFoundException.php
@@ -38,7 +38,7 @@ public static function notAvailable(string $currencyCode, array $availableCurren
return new self(sprintf(
'Currency "%s" is not available! The available ones are: "%s".',
$currencyCode,
- implode('", "', $availableCurrenciesCodes)
+ implode('", "', $availableCurrenciesCodes),
));
}
}
diff --git a/src/Sylius/Component/Currency/Converter/CurrencyNameConverter.php b/src/Sylius/Component/Currency/Converter/CurrencyNameConverter.php
index 61af94b1741..8d657369978 100644
--- a/src/Sylius/Component/Currency/Converter/CurrencyNameConverter.php
+++ b/src/Sylius/Component/Currency/Converter/CurrencyNameConverter.php
@@ -26,7 +26,7 @@ public function convertToCode(string $name, ?string $locale = null): string
throw new \InvalidArgumentException(sprintf(
'Currency "%s" not found! Available names: %s.',
$name,
- implode(', ', $names)
+ implode(', ', $names),
));
}
diff --git a/src/Sylius/Component/Currency/Model/Currency.php b/src/Sylius/Component/Currency/Model/Currency.php
index 98525c31d16..f1f31076783 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 980b8584711..4ecbbfa4644 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/Currency/spec/Context/CompositeCurrencyContextSpec.php b/src/Sylius/Component/Currency/spec/Context/CompositeCurrencyContextSpec.php
index 35fd81a1cdb..b71ecca58c0 100644
--- a/src/Sylius/Component/Currency/spec/Context/CompositeCurrencyContextSpec.php
+++ b/src/Sylius/Component/Currency/spec/Context/CompositeCurrencyContextSpec.php
@@ -30,7 +30,7 @@ function it_throws_a_currency_not_found_exception_if_there_are_no_nested_currenc
}
function it_throws_a_currency_not_found_exception_if_none_of_nested_currency_contexts_returned_a_currency(
- CurrencyContextInterface $currencyContext
+ CurrencyContextInterface $currencyContext,
): void {
$currencyContext->getCurrencyCode()->willThrow(CurrencyNotFoundException::class);
@@ -42,7 +42,7 @@ function it_throws_a_currency_not_found_exception_if_none_of_nested_currency_con
function it_returns_first_result_returned_by_nested_request_resolvers(
CurrencyContextInterface $firstCurrencyContext,
CurrencyContextInterface $secondCurrencyContext,
- CurrencyContextInterface $thirdCurrencyContext
+ CurrencyContextInterface $thirdCurrencyContext,
): void {
$firstCurrencyContext->getCurrencyCode()->willThrow(CurrencyNotFoundException::class);
$secondCurrencyContext->getCurrencyCode()->willReturn('BTC');
@@ -58,7 +58,7 @@ function it_returns_first_result_returned_by_nested_request_resolvers(
function its_nested_request_resolvers_can_have_priority(
CurrencyContextInterface $firstCurrencyContext,
CurrencyContextInterface $secondCurrencyContext,
- CurrencyContextInterface $thirdCurrencyContext
+ CurrencyContextInterface $thirdCurrencyContext,
): void {
$firstCurrencyContext->getCurrencyCode()->shouldNotBeCalled();
$secondCurrencyContext->getCurrencyCode()->willReturn('BTC');
diff --git a/src/Sylius/Component/Currency/spec/Converter/CurrencyConverterSpec.php b/src/Sylius/Component/Currency/spec/Converter/CurrencyConverterSpec.php
index 9cad368e8cf..5de3f0a3a00 100644
--- a/src/Sylius/Component/Currency/spec/Converter/CurrencyConverterSpec.php
+++ b/src/Sylius/Component/Currency/spec/Converter/CurrencyConverterSpec.php
@@ -34,7 +34,7 @@ function it_implements_a_currency_converter_interface(): void
function it_converts_multipling_ratio_based_on_currency_pair_exchange_rate(
ExchangeRateRepositoryInterface $exchangeRateRepository,
CurrencyInterface $sourceCurrency,
- ExchangeRateInterface $exchangeRate
+ ExchangeRateInterface $exchangeRate,
): void {
$exchangeRateRepository->findOneWithCurrencyPair('GBP', 'USD')->willReturn($exchangeRate);
$exchangeRate->getRatio()->willReturn(1.30);
@@ -48,7 +48,7 @@ function it_converts_multipling_ratio_based_on_currency_pair_exchange_rate(
function it_converts_dividing_ratio_based_on_reversed_currency_pair_exchange_rate(
ExchangeRateRepositoryInterface $exchangeRateRepository,
CurrencyInterface $sourceCurrency,
- ExchangeRateInterface $exchangeRate
+ ExchangeRateInterface $exchangeRate,
): void {
$exchangeRateRepository->findOneWithCurrencyPair('GBP', 'USD')->willReturn($exchangeRate);
$exchangeRate->getRatio()->willReturn(1.30);
@@ -60,7 +60,7 @@ function it_converts_dividing_ratio_based_on_reversed_currency_pair_exchange_rat
}
function it_return_given_value_if_exchange_rate_for_given_currency_pair_has_not_been_found(
- ExchangeRateRepositoryInterface $exchangeRateRepository
+ ExchangeRateRepositoryInterface $exchangeRateRepository,
): void {
$exchangeRateRepository->findOneWithCurrencyPair('GBP', 'USD')->willReturn(null);
@@ -68,7 +68,7 @@ function it_return_given_value_if_exchange_rate_for_given_currency_pair_has_not_
}
function it_return_given_value_if_both_currencie_in_currency_pair_are_the_same(
- ExchangeRateRepositoryInterface $exchangeRateRepository
+ ExchangeRateRepositoryInterface $exchangeRateRepository,
): void {
$exchangeRateRepository->findOneWithCurrencyPair('GBP', 'GBP')->willReturn(null);
diff --git a/src/Sylius/Component/Customer/Model/Customer.php b/src/Sylius/Component/Customer/Model/Customer.php
index ada5fde94a5..9fa16770339 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 d0fa80ebf65..270b900ad3e 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 65dc46e94a5..a5c62a1ce93 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/Inventory/spec/Checker/AvailabilityCheckerSpec.php b/src/Sylius/Component/Inventory/spec/Checker/AvailabilityCheckerSpec.php
index ec2099a9222..e1fded131ea 100644
--- a/src/Sylius/Component/Inventory/spec/Checker/AvailabilityCheckerSpec.php
+++ b/src/Sylius/Component/Inventory/spec/Checker/AvailabilityCheckerSpec.php
@@ -43,7 +43,7 @@ function it_recognizes_stockable_as_not_available_if_on_hand_quantity_is_equal_t
}
function it_recognizes_stockable_as_available_if_on_hold_quantity_is_less_than_on_hand(
- StockableInterface $stockable
+ StockableInterface $stockable,
): void {
$stockable->isTracked()->willReturn(true);
$stockable->getOnHand()->willReturn(5);
@@ -53,7 +53,7 @@ function it_recognizes_stockable_as_available_if_on_hold_quantity_is_less_than_o
}
function it_recognizes_stockable_as_not_available_if_on_hold_quantity_is_same_as_on_hand(
- StockableInterface $stockable
+ StockableInterface $stockable,
): void {
$stockable->isTracked()->willReturn(true);
$stockable->getOnHand()->willReturn(5);
@@ -63,7 +63,7 @@ function it_recognizes_stockable_as_not_available_if_on_hold_quantity_is_same_as
}
function it_recognizes_stockable_as_sufficient_if_on_hand_minus_on_hold_quantity_is_greater_than_the_required_quantity(
- StockableInterface $stockable
+ StockableInterface $stockable,
): void {
$stockable->isTracked()->willReturn(true);
$stockable->getOnHand()->willReturn(10);
@@ -73,7 +73,7 @@ function it_recognizes_stockable_as_sufficient_if_on_hand_minus_on_hold_quantity
}
function it_recognizes_stockable_as_sufficient_if_on_hand_minus_on_hold_quantity_is_equal_to_the_required_quantity(
- StockableInterface $stockable
+ StockableInterface $stockable,
): void {
$stockable->isTracked()->willReturn(true);
$stockable->getOnHand()->willReturn(10);
diff --git a/src/Sylius/Component/Locale/Context/LocaleNotFoundException.php b/src/Sylius/Component/Locale/Context/LocaleNotFoundException.php
index 4a9802a2124..fd595e815b5 100644
--- a/src/Sylius/Component/Locale/Context/LocaleNotFoundException.php
+++ b/src/Sylius/Component/Locale/Context/LocaleNotFoundException.php
@@ -30,7 +30,7 @@ public static function notAvailable(string $localeCode, array $availableLocalesC
return new self(sprintf(
'Locale "%s" is not available! The available ones are: "%s".',
$localeCode,
- implode('", "', $availableLocalesCodes)
+ implode('", "', $availableLocalesCodes),
));
}
}
diff --git a/src/Sylius/Component/Locale/Model/Locale.php b/src/Sylius/Component/Locale/Model/Locale.php
index ee1ad2c30b9..7ce9dddc40c 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/Locale/Provider/LocaleProvider.php b/src/Sylius/Component/Locale/Provider/LocaleProvider.php
index 4feeb422219..a157a1ea711 100644
--- a/src/Sylius/Component/Locale/Provider/LocaleProvider.php
+++ b/src/Sylius/Component/Locale/Provider/LocaleProvider.php
@@ -36,7 +36,7 @@ public function getAvailableLocalesCodes(): array
function (LocaleInterface $locale) {
return (string) $locale->getCode();
},
- $locales
+ $locales,
);
}
diff --git a/src/Sylius/Component/Locale/spec/Context/CompositeLocaleContextSpec.php b/src/Sylius/Component/Locale/spec/Context/CompositeLocaleContextSpec.php
index e19e91893c5..76b62bdccb5 100644
--- a/src/Sylius/Component/Locale/spec/Context/CompositeLocaleContextSpec.php
+++ b/src/Sylius/Component/Locale/spec/Context/CompositeLocaleContextSpec.php
@@ -30,7 +30,7 @@ function it_throws_a_locale_not_found_exception_if_there_are_no_nested_locale_co
}
function it_throws_a_locale_not_found_exception_if_none_of_nested_locale_contexts_returned_a_locale(
- LocaleContextInterface $localeContext
+ LocaleContextInterface $localeContext,
): void {
$localeContext->getLocaleCode()->willThrow(LocaleNotFoundException::class);
@@ -42,7 +42,7 @@ function it_throws_a_locale_not_found_exception_if_none_of_nested_locale_context
function it_returns_first_result_returned_by_nested_request_resolvers(
LocaleContextInterface $firstLocaleContext,
LocaleContextInterface $secondLocaleContext,
- LocaleContextInterface $thirdLocaleContext
+ LocaleContextInterface $thirdLocaleContext,
): void {
$firstLocaleContext->getLocaleCode()->willThrow(LocaleNotFoundException::class);
$secondLocaleContext->getLocaleCode()->willReturn('en_US');
@@ -58,7 +58,7 @@ function it_returns_first_result_returned_by_nested_request_resolvers(
function its_nested_request_resolvers_can_have_priority(
LocaleContextInterface $firstLocaleContext,
LocaleContextInterface $secondLocaleContext,
- LocaleContextInterface $thirdLocaleContext
+ LocaleContextInterface $thirdLocaleContext,
): void {
$firstLocaleContext->getLocaleCode()->shouldNotBeCalled();
$secondLocaleContext->getLocaleCode()->willReturn('pl_PL');
diff --git a/src/Sylius/Component/Locale/spec/Context/ProviderBasedLocaleContextSpec.php b/src/Sylius/Component/Locale/spec/Context/ProviderBasedLocaleContextSpec.php
index 26dbddc3893..7c798fd8e5f 100644
--- a/src/Sylius/Component/Locale/spec/Context/ProviderBasedLocaleContextSpec.php
+++ b/src/Sylius/Component/Locale/spec/Context/ProviderBasedLocaleContextSpec.php
@@ -39,7 +39,7 @@ function it_returns_the_channels_default_locale(LocaleProviderInterface $localeP
}
function it_throws_a_locale_not_found_exception_if_default_locale_is_not_available(
- LocaleProviderInterface $localeProvider
+ LocaleProviderInterface $localeProvider,
): void {
$localeProvider->getAvailableLocalesCodes()->willReturn(['es_ES', 'en_US']);
$localeProvider->getDefaultLocaleCode()->willReturn('pl_PL');
diff --git a/src/Sylius/Component/Order/Factory/AdjustmentFactory.php b/src/Sylius/Component/Order/Factory/AdjustmentFactory.php
index 917be22a870..4d3d03746a3 100644
--- a/src/Sylius/Component/Order/Factory/AdjustmentFactory.php
+++ b/src/Sylius/Component/Order/Factory/AdjustmentFactory.php
@@ -35,7 +35,7 @@ public function createWithData(
string $label,
int $amount,
bool $neutral = false,
- array $details = []
+ array $details = [],
): AdjustmentInterface {
$adjustment = $this->createNew();
$adjustment->setType($type);
diff --git a/src/Sylius/Component/Order/Factory/AdjustmentFactoryInterface.php b/src/Sylius/Component/Order/Factory/AdjustmentFactoryInterface.php
index a889b598012..6c94c0bd456 100644
--- a/src/Sylius/Component/Order/Factory/AdjustmentFactoryInterface.php
+++ b/src/Sylius/Component/Order/Factory/AdjustmentFactoryInterface.php
@@ -23,6 +23,6 @@ public function createWithData(
string $label,
int $amount,
bool $neutral = false,
- array $details = []
+ array $details = [],
): AdjustmentInterface;
}
diff --git a/src/Sylius/Component/Order/Model/Adjustment.php b/src/Sylius/Component/Order/Model/Adjustment.php
index 175ef9f53d6..dddb257e092 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 4f830bf80a8..48919dc3db5 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 840379a35b0..72a451a10e5 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 31013e3ad75..f0b21ce413e 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 81a6bfbb71b..678c5a8d74a 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/Order/Modifier/OrderModifier.php b/src/Sylius/Component/Order/Modifier/OrderModifier.php
index cfb02c54554..d59a4afbfe3 100644
--- a/src/Sylius/Component/Order/Modifier/OrderModifier.php
+++ b/src/Sylius/Component/Order/Modifier/OrderModifier.php
@@ -25,7 +25,7 @@ final class OrderModifier implements OrderModifierInterface
public function __construct(
OrderProcessorInterface $orderProcessor,
- OrderItemQuantityModifierInterface $orderItemQuantityModifier
+ OrderItemQuantityModifierInterface $orderItemQuantityModifier,
) {
$this->orderProcessor = $orderProcessor;
$this->orderItemQuantityModifier = $orderItemQuantityModifier;
@@ -50,7 +50,7 @@ private function resolveOrderItem(OrderInterface $cart, OrderItemInterface $item
if ($item->equals($existingItem)) {
$this->orderItemQuantityModifier->modify(
$existingItem,
- $existingItem->getQuantity() + $item->getQuantity()
+ $existingItem->getQuantity() + $item->getQuantity(),
);
return;
diff --git a/src/Sylius/Component/Order/spec/Aggregator/AdjustmentsByLabelAggregatorSpec.php b/src/Sylius/Component/Order/spec/Aggregator/AdjustmentsByLabelAggregatorSpec.php
index ca0ee418d4c..e91b934aec7 100644
--- a/src/Sylius/Component/Order/spec/Aggregator/AdjustmentsByLabelAggregatorSpec.php
+++ b/src/Sylius/Component/Order/spec/Aggregator/AdjustmentsByLabelAggregatorSpec.php
@@ -28,7 +28,7 @@ function it_aggregates_given_adjustments_array_by_description(
AdjustmentInterface $adjustment1,
AdjustmentInterface $adjustment2,
AdjustmentInterface $adjustment3,
- AdjustmentInterface $adjustment4
+ AdjustmentInterface $adjustment4,
): void {
$adjustment1->getLabel()->willReturn('tax 1');
$adjustment1->getAmount()->willReturn(1000);
@@ -47,7 +47,7 @@ function it_aggregates_given_adjustments_array_by_description(
function it_throws_exception_if_any_array_element_is_not_adjustment(
AdjustmentInterface $adjustment1,
- AdjustmentInterface $adjustment2
+ AdjustmentInterface $adjustment2,
): void {
$adjustment1->getLabel()->willReturn('tax 1');
$adjustment1->getAmount()->willReturn(1000);
diff --git a/src/Sylius/Component/Order/spec/Context/CompositeCartContextSpec.php b/src/Sylius/Component/Order/spec/Context/CompositeCartContextSpec.php
index 9f0252daa92..c24e512c759 100644
--- a/src/Sylius/Component/Order/spec/Context/CompositeCartContextSpec.php
+++ b/src/Sylius/Component/Order/spec/Context/CompositeCartContextSpec.php
@@ -31,7 +31,7 @@ function it_throws_cart_not_found_exception_if_there_are_no_nested_cart_contexts
}
function it_throws_cart_not_found_exception_if_none_of_nested_cart_context_returned_a_cart(
- CartContextInterface $cartContext
+ CartContextInterface $cartContext,
): void {
$cartContext->getCart()->willThrow(CartNotFoundException::class);
$this->addContext($cartContext);
@@ -42,7 +42,7 @@ function it_throws_cart_not_found_exception_if_none_of_nested_cart_context_retur
function it_returns_cart_from_first_available_context(
CartContextInterface $firstCartContext,
CartContextInterface $secondCartContext,
- OrderInterface $cart
+ OrderInterface $cart,
): void {
$firstCartContext->getCart()->willThrow(CartNotFoundException::class);
$secondCartContext->getCart()->willReturn($cart);
@@ -56,7 +56,7 @@ function it_returns_cart_from_first_available_context(
function its_cart_contexts_can_have_priority(
CartContextInterface $firstCartContext,
CartContextInterface $secondCartContext,
- OrderInterface $cart
+ OrderInterface $cart,
): void {
$firstCartContext->getCart()->shouldNotBeCalled();
$secondCartContext->getCart()->willReturn($cart);
diff --git a/src/Sylius/Component/Order/spec/Factory/AdjustmentFactorySpec.php b/src/Sylius/Component/Order/spec/Factory/AdjustmentFactorySpec.php
index 48727187060..f207b29120d 100644
--- a/src/Sylius/Component/Order/spec/Factory/AdjustmentFactorySpec.php
+++ b/src/Sylius/Component/Order/spec/Factory/AdjustmentFactorySpec.php
@@ -32,7 +32,7 @@ function it_implements_an_adjustment_factory_interface(): void
function it_creates_new_adjustment(
FactoryInterface $adjustmentFactory,
- AdjustmentInterface $adjustment
+ AdjustmentInterface $adjustment,
): void {
$adjustmentFactory->createNew()->willReturn($adjustment);
@@ -41,7 +41,7 @@ function it_creates_new_adjustment(
function it_creates_new_adjustment_with_provided_data(
FactoryInterface $adjustmentFactory,
- AdjustmentInterface $adjustment
+ AdjustmentInterface $adjustment,
): void {
$adjustmentFactory->createNew()->willReturn($adjustment);
$adjustment->setType('tax')->shouldBeCalled();
diff --git a/src/Sylius/Component/Order/spec/Factory/OrderItemUnitFactorySpec.php b/src/Sylius/Component/Order/spec/Factory/OrderItemUnitFactorySpec.php
index 5da4f00cc6d..5ef426d511b 100644
--- a/src/Sylius/Component/Order/spec/Factory/OrderItemUnitFactorySpec.php
+++ b/src/Sylius/Component/Order/spec/Factory/OrderItemUnitFactorySpec.php
@@ -39,7 +39,7 @@ function it_throws_an_exception_while_trying_create_order_item_unit_without_orde
function it_creates_a_new_order_item_unit_with_given_order_item(
OrderItemInterface $orderItem,
- OrderItemUnitInterface $orderItemUnit
+ OrderItemUnitInterface $orderItemUnit,
): void {
$orderItemUnit->getOrderItem()->willReturn($orderItem);
diff --git a/src/Sylius/Component/Order/spec/Model/AdjustmentSpec.php b/src/Sylius/Component/Order/spec/Model/AdjustmentSpec.php
index 28a52c8e8c7..774f5d531e9 100644
--- a/src/Sylius/Component/Order/spec/Model/AdjustmentSpec.php
+++ b/src/Sylius/Component/Order/spec/Model/AdjustmentSpec.php
@@ -52,7 +52,7 @@ function it_allows_assigning_itself_to_an_adjustable(OrderInterface $order, Orde
function it_allows_detaching_itself_from_an_adjustable(
OrderInterface $order,
OrderItemInterface $orderItem,
- OrderItemUnitInterface $orderItemUnit
+ OrderItemUnitInterface $orderItemUnit,
): void {
$order->addAdjustment($this->getWrappedObject())->shouldBeCalled();
$this->setAdjustable($order);
@@ -92,7 +92,7 @@ function it_throws_an_exception_during_not_supported_adjustable_class_set(Adjust
function it_throws_an_exception_during_adjustable_change_on_locked_adjustment(
OrderItemInterface $orderItem,
- OrderItemInterface $otherOrderItem
+ OrderItemInterface $otherOrderItem,
): void {
$this->setAdjustable($orderItem);
$this->lock();
@@ -136,7 +136,7 @@ function its_amount_is_mutable(): void
function it_recalculates_adjustments_on_adjustable_entity_on_amount_change(
OrderInterface $order,
OrderItemInterface $orderItem,
- OrderItemUnitInterface $orderItemUnit
+ OrderItemUnitInterface $orderItemUnit,
): void {
$order->addAdjustment($this->getWrappedObject())->shouldBeCalled();
$this->setAdjustable($order);
@@ -157,7 +157,7 @@ function it_recalculates_adjustments_on_adjustable_entity_on_amount_change(
}
function it_does_not_recalculate_adjustments_on_adjustable_entity_on_amount_change_when_adjustment_is_neutral(
- OrderItemUnitInterface $orderItemUnit
+ OrderItemUnitInterface $orderItemUnit,
): void {
$orderItemUnit->addAdjustment($this->getWrappedObject())->shouldBeCalled();
$this->setAdjustable($orderItemUnit);
@@ -193,7 +193,7 @@ function it_recalculate_adjustments_on_adjustable_entity_on_neutral_change(Order
}
function it_does_not_recalculate_adjustments_on_adjustable_entity_when_neutral_set_to_current_value(
- OrderInterface $order
+ OrderInterface $order,
): void {
$order->addAdjustment($this->getWrappedObject())->shouldBeCalled();
$this->setAdjustable($order);
diff --git a/src/Sylius/Component/Order/spec/Model/OrderItemSpec.php b/src/Sylius/Component/Order/spec/Model/OrderItemSpec.php
index ded893ad00e..7e6dbab9098 100644
--- a/src/Sylius/Component/Order/spec/Model/OrderItemSpec.php
+++ b/src/Sylius/Component/Order/spec/Model/OrderItemSpec.php
@@ -111,7 +111,7 @@ function it_returns_adjustments_recursively(
AdjustmentInterface $unitAdjustment1,
AdjustmentInterface $unitAdjustment2,
OrderItemUnitInterface $unit1,
- OrderItemUnitInterface $unit2
+ OrderItemUnitInterface $unit2,
): void {
$unit1->getOrderItem()->willReturn($this);
$unit1->getTotal()->willReturn(100);
@@ -161,7 +161,7 @@ function it_adds_only_unit_that_is_assigned_to_it(OrderItemUnitInterface $orderI
function it_recalculates_units_total_on_unit_price_change(
OrderItemUnitInterface $orderItemUnit1,
- OrderItemUnitInterface $orderItemUnit2
+ OrderItemUnitInterface $orderItemUnit2,
): void {
$orderItemUnit1->getOrderItem()->willReturn($this->getWrappedObject());
$orderItemUnit1->getTotal()->willReturn(0, 100);
@@ -202,7 +202,7 @@ function it_removes_adjustments_properly(AdjustmentInterface $adjustment): void
function it_has_correct_total_based_on_unit_items(
OrderItemUnitInterface $orderItemUnit1,
- OrderItemUnitInterface $orderItemUnit2
+ OrderItemUnitInterface $orderItemUnit2,
): void {
$orderItemUnit1->getOrderItem()->willReturn($this->getWrappedObject());
$orderItemUnit1->getTotal()->willReturn(1499);
@@ -216,7 +216,7 @@ function it_has_correct_total_based_on_unit_items(
function it_has_correct_total_after_unit_item_remove(
OrderItemUnitInterface $orderItemUnit1,
- OrderItemUnitInterface $orderItemUnit2
+ OrderItemUnitInterface $orderItemUnit2,
): void {
$orderItemUnit1->getOrderItem()->willReturn($this->getWrappedObject());
$orderItemUnit1->getTotal()->willReturn(2000);
@@ -234,7 +234,7 @@ function it_has_correct_total_after_unit_item_remove(
function it_has_correct_total_after_negative_adjustment_add(
AdjustmentInterface $adjustment,
OrderItemUnitInterface $orderItemUnit1,
- OrderItemUnitInterface $orderItemUnit2
+ OrderItemUnitInterface $orderItemUnit2,
): void {
$orderItemUnit1->getOrderItem()->willReturn($this->getWrappedObject());
$orderItemUnit1->getTotal()->willReturn(1499);
@@ -285,7 +285,7 @@ function it_has_correct_total_after_neutral_adjustment_add_and_remove(Adjustment
function it_has_0_total_when_adjustment_decreases_total_under_0(
AdjustmentInterface $adjustment,
- OrderItemUnitInterface $orderItemUnit1
+ OrderItemUnitInterface $orderItemUnit1,
): void {
$orderItemUnit1->getOrderItem()->willReturn($this->getWrappedObject());
$orderItemUnit1->getTotal()->willReturn(1499);
@@ -301,7 +301,7 @@ function it_has_0_total_when_adjustment_decreases_total_under_0(
function it_has_correct_total_after_unit_price_change(
OrderItemUnitInterface $orderItemUnit1,
- OrderItemUnitInterface $orderItemUnit2
+ OrderItemUnitInterface $orderItemUnit2,
): void {
$orderItemUnit1->getOrderItem()->willReturn($this->getWrappedObject());
$orderItemUnit1->getTotal()->willReturn(0, 100);
@@ -317,7 +317,7 @@ function it_has_correct_total_after_unit_price_change(
function it_has_correct_total_after_order_item_unit_total_change(
OrderItemUnitInterface $orderItemUnit1,
- OrderItemUnitInterface $orderItemUnit2
+ OrderItemUnitInterface $orderItemUnit2,
): void {
$orderItemUnit1->getOrderItem()->willReturn($this->getWrappedObject());
$orderItemUnit1->getTotal()->willReturn(0);
@@ -334,7 +334,7 @@ function it_has_correct_total_after_order_item_unit_total_change(
function it_has_correct_total_after_adjustment_amount_change(
AdjustmentInterface $adjustment1,
- AdjustmentInterface $adjustment2
+ AdjustmentInterface $adjustment2,
): void {
$adjustment1->getAmount()->willReturn(100);
$adjustment1->isNeutral()->willReturn(false);
@@ -353,7 +353,7 @@ function it_has_correct_total_after_adjustment_amount_change(
function it_returns_correct_adjustments_total(
AdjustmentInterface $adjustment1,
- AdjustmentInterface $adjustment2
+ AdjustmentInterface $adjustment2,
): void {
$adjustment1->getAmount()->willReturn(100);
$adjustment1->isNeutral()->willReturn(false);
@@ -371,7 +371,7 @@ function it_returns_correct_adjustments_total(
function it_returns_correct_adjustments_total_by_type(
AdjustmentInterface $adjustment1,
AdjustmentInterface $adjustment2,
- AdjustmentInterface $adjustment3
+ AdjustmentInterface $adjustment3,
): void {
$adjustment1->getType()->willReturn('tax');
$adjustment1->getAmount()->willReturn(200);
@@ -401,7 +401,7 @@ function it_returns_correct_adjustments_total_recursively(
AdjustmentInterface $taxAdjustment1,
AdjustmentInterface $taxAdjustment2,
OrderItemUnitInterface $orderItemUnit1,
- OrderItemUnitInterface $orderItemUnit2
+ OrderItemUnitInterface $orderItemUnit2,
): void {
$adjustment1->getAmount()->willReturn(200);
$adjustment1->isNeutral()->willReturn(false);
@@ -432,7 +432,7 @@ function it_returns_correct_adjustments_total_by_type_recursively(
AdjustmentInterface $taxAdjustment1,
AdjustmentInterface $taxAdjustment2,
OrderItemUnitInterface $orderItemUnit1,
- OrderItemUnitInterface $orderItemUnit2
+ OrderItemUnitInterface $orderItemUnit2,
): void {
$adjustment1->getType()->willReturn('tax');
$adjustment1->getAmount()->willReturn(200);
diff --git a/src/Sylius/Component/Order/spec/Model/OrderItemUnitSpec.php b/src/Sylius/Component/Order/spec/Model/OrderItemUnitSpec.php
index 1d0c0f54954..b9f349921be 100644
--- a/src/Sylius/Component/Order/spec/Model/OrderItemUnitSpec.php
+++ b/src/Sylius/Component/Order/spec/Model/OrderItemUnitSpec.php
@@ -40,7 +40,7 @@ function it_has_a_correct_total_when_there_are_no_adjustments(): void
function it_includes_non_neutral_adjustments_in_total(
AdjustmentInterface $adjustment,
- OrderItemInterface $orderItem
+ OrderItemInterface $orderItem,
): void {
$adjustment->isNeutral()->willReturn(false);
$adjustment->getAmount()->willReturn(400);
@@ -55,7 +55,7 @@ function it_includes_non_neutral_adjustments_in_total(
function it_returns_0_as_total_even_when_adjustments_decreases_it_below_0(
AdjustmentInterface $adjustment,
- OrderItemInterface $orderItem
+ OrderItemInterface $orderItem,
): void {
$adjustment->isNeutral()->willReturn(false);
$adjustment->getAmount()->willReturn(-1400);
@@ -87,7 +87,7 @@ function it_adds_and_removes_adjustments(AdjustmentInterface $adjustment, OrderI
function it_does_not_remove_adjustment_when_it_is_locked(
AdjustmentInterface $adjustment,
- OrderItemInterface $orderItem
+ OrderItemInterface $orderItem,
): void {
$orderItem->recalculateUnitsTotal()->shouldBeCalledTimes(1);
@@ -107,7 +107,7 @@ function it_has_correct_total_after_adjustment_add_and_remove(
AdjustmentInterface $adjustment1,
AdjustmentInterface $adjustment2,
AdjustmentInterface $adjustment3,
- OrderItemInterface $orderItem
+ OrderItemInterface $orderItem,
): void {
$orderItem->recalculateUnitsTotal()->shouldBeCalledTimes(4);
@@ -138,7 +138,7 @@ function it_has_correct_total_after_adjustment_add_and_remove(
function it_has_correct_total_after_neutral_adjustment_add_and_remove(
AdjustmentInterface $adjustment,
- OrderItemInterface $orderItem
+ OrderItemInterface $orderItem,
): void {
$orderItem->recalculateUnitsTotal()->shouldBeCalled();
@@ -159,7 +159,7 @@ function it_has_correct_total_after_neutral_adjustment_add_and_remove(
function it_has_proper_total_after_order_item_unit_price_change(
AdjustmentInterface $adjustment1,
AdjustmentInterface $adjustment2,
- OrderItemInterface $orderItem
+ OrderItemInterface $orderItem,
): void {
$orderItem->recalculateUnitsTotal()->shouldBeCalledTimes(2);
@@ -182,7 +182,7 @@ function it_has_proper_total_after_order_item_unit_price_change(
function it_recalculates_its_total_properly_after_adjustment_amount_change(
AdjustmentInterface $adjustment1,
AdjustmentInterface $adjustment2,
- OrderItemInterface $orderItem
+ OrderItemInterface $orderItem,
): void {
$orderItem->recalculateUnitsTotal()->shouldBeCalledTimes(2);
diff --git a/src/Sylius/Component/Order/spec/Model/OrderSpec.php b/src/Sylius/Component/Order/spec/Model/OrderSpec.php
index b0a445136fa..55c991feec3 100644
--- a/src/Sylius/Component/Order/spec/Model/OrderSpec.php
+++ b/src/Sylius/Component/Order/spec/Model/OrderSpec.php
@@ -124,7 +124,7 @@ function it_has_items_total_equal_to_0_by_default(): void
function it_calculates_correct_items_total(
OrderItemInterface $item1,
OrderItemInterface $item2,
- OrderItemInterface $item3
+ OrderItemInterface $item3,
): void {
$item1->getTotal()->willReturn(29999);
$item2->getTotal()->willReturn(45000);
@@ -180,7 +180,7 @@ function it_removes_adjustments_properly(AdjustmentInterface $adjustment): void
function it_removes_adjustments_recursively_properly(
AdjustmentInterface $orderAdjustment,
- OrderItemInterface $item
+ OrderItemInterface $item,
): void {
$orderAdjustment->getAmount()->willReturn(420);
$orderAdjustment->isNeutral()->willReturn(true);
@@ -204,7 +204,7 @@ function it_removes_adjustments_recursively_properly(
function it_removes_adjustments_recursively_by_type_properly(
AdjustmentInterface $orderPromotionAdjustment,
AdjustmentInterface $orderTaxAdjustment,
- OrderItemInterface $item
+ OrderItemInterface $item,
): void {
$orderPromotionAdjustment->getType()->willReturn('promotion');
$orderPromotionAdjustment->isNeutral()->willReturn(true);
@@ -242,7 +242,7 @@ function it_returns_adjustments_recursively(
AdjustmentInterface $itemAdjustment1,
AdjustmentInterface $itemAdjustment2,
OrderItemInterface $item1,
- OrderItemInterface $item2
+ OrderItemInterface $item2,
): void {
$item1->setOrder($this)->shouldBeCalled();
$item1->getTotal()->willReturn(100);
@@ -271,7 +271,7 @@ function it_has_adjustments_total_equal_to_0_by_default(): void
function it_calculates_correct_adjustments_total(
AdjustmentInterface $adjustment1,
AdjustmentInterface $adjustment2,
- AdjustmentInterface $adjustment3
+ AdjustmentInterface $adjustment3,
): void {
$adjustment1->getAmount()->willReturn(10000);
$adjustment2->getAmount()->willReturn(-4999);
@@ -295,7 +295,7 @@ function it_calculates_correct_adjustments_total(
function it_returns_adjustments_total_recursively(
AdjustmentInterface $itemAdjustment,
AdjustmentInterface $orderAdjustment,
- OrderItemInterface $orderItem
+ OrderItemInterface $orderItem,
): void {
$itemAdjustment->getAmount()->willReturn(10000);
$orderAdjustment->getAmount()->willReturn(5000);
@@ -341,7 +341,7 @@ function it_calculates_correct_total(
OrderItemInterface $item1,
OrderItemInterface $item2,
AdjustmentInterface $adjustment1,
- AdjustmentInterface $adjustment2
+ AdjustmentInterface $adjustment2,
): void {
$item1->getTotal()->willReturn(29999);
$item2->getTotal()->willReturn(45000);
@@ -373,7 +373,7 @@ function it_calculates_correct_total_after_items_and_adjustments_changes(
AdjustmentInterface $adjustment2,
OrderItemInterface $item1,
OrderItemInterface $item2,
- OrderItemInterface $item3
+ OrderItemInterface $item3,
): void {
$item1->getTotal()->willReturn(29999);
$item2->getTotal()->willReturn(45000);
@@ -421,7 +421,7 @@ function it_ignores_neutral_adjustments_when_calculating_total(
OrderItemInterface $item1,
OrderItemInterface $item2,
AdjustmentInterface $adjustment1,
- AdjustmentInterface $adjustment2
+ AdjustmentInterface $adjustment2,
): void {
$item1->getTotal()->willReturn(29999);
$item2->getTotal()->willReturn(45000);
@@ -450,7 +450,7 @@ function it_ignores_neutral_adjustments_when_calculating_total(
function it_calculates_correct_total_when_adjustment_is_bigger_than_cost(
OrderItemInterface $item,
- AdjustmentInterface $adjustment
+ AdjustmentInterface $adjustment,
): void {
$item->getTotal()->willReturn(45000);
diff --git a/src/Sylius/Component/Order/spec/Modifier/OrderItemQuantityModifierSpec.php b/src/Sylius/Component/Order/spec/Modifier/OrderItemQuantityModifierSpec.php
index 8a560e5e244..453d61e1ec0 100644
--- a/src/Sylius/Component/Order/spec/Modifier/OrderItemQuantityModifierSpec.php
+++ b/src/Sylius/Component/Order/spec/Modifier/OrderItemQuantityModifierSpec.php
@@ -35,7 +35,7 @@ function it_implements_an_order_item_quantity_modifier_interface(): void
function it_adds_proper_number_of_order_item_units_to_an_order_item(
OrderItemUnitFactoryInterface $orderItemUnitFactory,
- OrderItemInterface $orderItem
+ OrderItemInterface $orderItem,
): void {
$orderItem->getQuantity()->willReturn(1);
@@ -49,7 +49,7 @@ function it_removes_units_if_target_quantity_is_lower_than_current(
OrderItemUnitInterface $unit1,
OrderItemUnitInterface $unit2,
OrderItemUnitInterface $unit3,
- OrderItemUnitInterface $unit4
+ OrderItemUnitInterface $unit4,
): void {
$orderItem->getQuantity()->willReturn(4);
$orderItem->getUnits()->willReturn(new ArrayCollection([
@@ -65,7 +65,7 @@ function it_removes_units_if_target_quantity_is_lower_than_current(
function it_does_nothing_if_target_quantity_is_equal_to_current(
OrderItemUnitFactoryInterface $orderItemUnitFactory,
- OrderItemInterface $orderItem
+ OrderItemInterface $orderItem,
): void {
$orderItem->getQuantity()->willReturn(3);
@@ -78,7 +78,7 @@ function it_does_nothing_if_target_quantity_is_equal_to_current(
function it_does_nothing_if_target_quantity_is_0(
OrderItemUnitFactoryInterface $orderItemUnitFactory,
- OrderItemInterface $orderItem
+ OrderItemInterface $orderItem,
): void {
$orderItem->getQuantity()->willReturn(3);
@@ -91,7 +91,7 @@ function it_does_nothing_if_target_quantity_is_0(
function it_does_nothing_if_target_quantity_is_below_0(
OrderItemUnitFactoryInterface $orderItemUnitFactory,
- OrderItemInterface $orderItem
+ OrderItemInterface $orderItem,
): void {
$orderItem->getQuantity()->willReturn(3);
diff --git a/src/Sylius/Component/Order/spec/Modifier/OrderModifierSpec.php b/src/Sylius/Component/Order/spec/Modifier/OrderModifierSpec.php
index 594e51bd9cd..5c6de7386a2 100644
--- a/src/Sylius/Component/Order/spec/Modifier/OrderModifierSpec.php
+++ b/src/Sylius/Component/Order/spec/Modifier/OrderModifierSpec.php
@@ -26,7 +26,7 @@ final class OrderModifierSpec extends ObjectBehavior
{
function let(
OrderProcessorInterface $orderProcessor,
- OrderItemQuantityModifierInterface $orderItemQuantityModifier
+ OrderItemQuantityModifierInterface $orderItemQuantityModifier,
): void {
$this->beConstructedWith($orderProcessor, $orderItemQuantityModifier);
}
@@ -39,7 +39,7 @@ function it_implements_an_order_modifier_interface(): void
function it_adds_new_item_to_order_if_it_is_empty(
OrderInterface $order,
OrderItemInterface $orderItem,
- OrderProcessorInterface $orderProcessor
+ OrderProcessorInterface $orderProcessor,
): void {
$order->getItems()->willReturn(new ArrayCollection([]));
@@ -54,7 +54,7 @@ function it_adds_new_item_to_an_order_if_different_order_item_is_in_an_order(
OrderItemInterface $existingItem,
OrderItemInterface $newItem,
OrderItemQuantityModifierInterface $orderItemQuantityModifier,
- OrderProcessorInterface $orderProcessor
+ OrderProcessorInterface $orderProcessor,
): void {
$order->getItems()->willReturn(new ArrayCollection([$existingItem->getWrappedObject()]));
@@ -73,7 +73,7 @@ function it_changes_quantity_of_an_item_if_same_order_item_already_exists(
OrderItemInterface $existingItem,
OrderItemInterface $newItem,
OrderItemQuantityModifierInterface $orderItemQuantityModifier,
- OrderProcessorInterface $orderProcessor
+ OrderProcessorInterface $orderProcessor,
): void {
$order->getItems()->willReturn(new ArrayCollection([$existingItem->getWrappedObject()]));
@@ -92,7 +92,7 @@ function it_changes_quantity_of_an_item_if_same_order_item_already_exists(
function it_removes_an_order_item_from_an_order(
OrderInterface $order,
OrderItemInterface $orderItem,
- OrderProcessorInterface $orderProcessor
+ OrderProcessorInterface $orderProcessor,
): void {
$order->removeItem($orderItem)->shouldBeCalled();
$orderProcessor->process($order)->shouldBeCalled();
diff --git a/src/Sylius/Component/Payment/Model/Payment.php b/src/Sylius/Component/Payment/Model/Payment.php
index fcf234e86b2..c1b24deba3f 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 24bcd74bcff..f7d7286f9b4 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 df3d310f58e..5c926433b99 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/Payment/spec/Factory/PaymentFactorySpec.php b/src/Sylius/Component/Payment/spec/Factory/PaymentFactorySpec.php
index eb6504468da..73a0ed88e4d 100644
--- a/src/Sylius/Component/Payment/spec/Factory/PaymentFactorySpec.php
+++ b/src/Sylius/Component/Payment/spec/Factory/PaymentFactorySpec.php
@@ -44,7 +44,7 @@ function it_delegates_creation_of_new_resource(FactoryInterface $paymentFactory,
function it_creates_payment_with_currency_and_amount(
FactoryInterface $paymentFactory,
- PaymentInterface $payment
+ PaymentInterface $payment,
): void {
$paymentFactory->createNew()->willReturn($payment);
diff --git a/src/Sylius/Component/Payment/spec/Resolver/CompositeMethodsResolverSpec.php b/src/Sylius/Component/Payment/spec/Resolver/CompositeMethodsResolverSpec.php
index 635b2b21f69..52ce606ccad 100644
--- a/src/Sylius/Component/Payment/spec/Resolver/CompositeMethodsResolverSpec.php
+++ b/src/Sylius/Component/Payment/spec/Resolver/CompositeMethodsResolverSpec.php
@@ -36,7 +36,7 @@ function it_uses_registry_to_provide_payment_methods_for_payment(
PaymentMethodsResolverInterface $secondMethodsResolver,
PrioritizedServiceRegistryInterface $resolversRegistry,
PaymentMethodInterface $paymentMethod,
- PaymentInterface $payment
+ PaymentInterface $payment,
): void {
$resolversRegistry->all()->willReturn([$firstMethodsResolver, $secondMethodsResolver]);
@@ -52,7 +52,7 @@ function it_returns_empty_array_if_none_of_registered_resolvers_support_passed_p
PaymentMethodsResolverInterface $firstMethodsResolver,
PaymentMethodsResolverInterface $secondMethodsResolver,
PrioritizedServiceRegistryInterface $resolversRegistry,
- PaymentInterface $payment
+ PaymentInterface $payment,
): void {
$resolversRegistry->all()->willReturn([$firstMethodsResolver, $secondMethodsResolver]);
@@ -66,7 +66,7 @@ function it_supports_payment_if_at_least_one_registered_resolver_supports_it(
PaymentMethodsResolverInterface $firstMethodsResolver,
PaymentMethodsResolverInterface $secondMethodsResolver,
PrioritizedServiceRegistryInterface $resolversRegistry,
- PaymentInterface $payment
+ PaymentInterface $payment,
): void {
$resolversRegistry->all()->willReturn([$firstMethodsResolver, $secondMethodsResolver]);
@@ -80,7 +80,7 @@ function it_does_not_support_payment_if_none_of_registered_resolvers_supports_it
PaymentMethodsResolverInterface $firstMethodsResolver,
PaymentMethodsResolverInterface $secondMethodsResolver,
PrioritizedServiceRegistryInterface $resolversRegistry,
- PaymentInterface $payment
+ PaymentInterface $payment,
): void {
$resolversRegistry->all()->willReturn([$firstMethodsResolver, $secondMethodsResolver]);
diff --git a/src/Sylius/Component/Payment/spec/Resolver/DefaultPaymentMethodResolverSpec.php b/src/Sylius/Component/Payment/spec/Resolver/DefaultPaymentMethodResolverSpec.php
index 291c2272e99..215adfb155f 100644
--- a/src/Sylius/Component/Payment/spec/Resolver/DefaultPaymentMethodResolverSpec.php
+++ b/src/Sylius/Component/Payment/spec/Resolver/DefaultPaymentMethodResolverSpec.php
@@ -36,7 +36,7 @@ function it_returns_first_enabled_payment_method_as_default(
PaymentMethodInterface $firstPaymentMethod,
PaymentMethodInterface $secondPaymentMethod,
PaymentMethodRepositoryInterface $paymentMethodRepository,
- PaymentInterface $payment
+ PaymentInterface $payment,
): void {
$paymentMethodRepository->findBy(['enabled' => true])->willReturn([$firstPaymentMethod, $secondPaymentMethod]);
@@ -45,7 +45,7 @@ function it_returns_first_enabled_payment_method_as_default(
function it_throws_exception_if_there_are_no_enabled_payment_methods(
PaymentMethodRepositoryInterface $paymentMethodRepository,
- PaymentInterface $payment
+ PaymentInterface $payment,
): void {
$paymentMethodRepository->findBy(['enabled' => true])->willReturn([]);
diff --git a/src/Sylius/Component/Payment/spec/Resolver/PaymentMethodsResolverSpec.php b/src/Sylius/Component/Payment/spec/Resolver/PaymentMethodsResolverSpec.php
index 280c7a9fec3..e743b7d7d8c 100644
--- a/src/Sylius/Component/Payment/spec/Resolver/PaymentMethodsResolverSpec.php
+++ b/src/Sylius/Component/Payment/spec/Resolver/PaymentMethodsResolverSpec.php
@@ -35,7 +35,7 @@ function it_returns_all_methods_enabled_for_given_payment(
RepositoryInterface $methodRepository,
PaymentInterface $payment,
PaymentMethodInterface $method1,
- PaymentMethodInterface $method2
+ PaymentMethodInterface $method2,
): void {
$methodRepository->findBy(['enabled' => true])->willReturn([$method1, $method2]);
diff --git a/src/Sylius/Component/Product/Factory/ProductFactory.php b/src/Sylius/Component/Product/Factory/ProductFactory.php
index f70d079ae35..3cf0680406b 100644
--- a/src/Sylius/Component/Product/Factory/ProductFactory.php
+++ b/src/Sylius/Component/Product/Factory/ProductFactory.php
@@ -24,7 +24,7 @@ class ProductFactory implements ProductFactoryInterface
public function __construct(
FactoryInterface $factory,
- FactoryInterface $variantFactory
+ FactoryInterface $variantFactory,
) {
$this->factory = $factory;
$this->variantFactory = $variantFactory;
diff --git a/src/Sylius/Component/Product/Generator/ProductVariantGenerator.php b/src/Sylius/Component/Product/Generator/ProductVariantGenerator.php
index 205092f40aa..704155f08a2 100644
--- a/src/Sylius/Component/Product/Generator/ProductVariantGenerator.php
+++ b/src/Sylius/Component/Product/Generator/ProductVariantGenerator.php
@@ -30,7 +30,7 @@ final class ProductVariantGenerator implements ProductVariantGeneratorInterface
public function __construct(
ProductVariantFactoryInterface $productVariantFactory,
- ProductVariantsParityCheckerInterface $variantsParityChecker
+ ProductVariantsParityCheckerInterface $variantsParityChecker,
) {
$this->productVariantFactory = $productVariantFactory;
$this->setBuilder = new CartesianSetBuilder();
diff --git a/src/Sylius/Component/Product/Model/Product.php b/src/Sylius/Component/Product/Model/Product.php
index cce4e876f61..338297c28e9 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;
/**
@@ -169,7 +167,7 @@ public function getAttributes(): Collection
public function getAttributesByLocale(
string $localeCode,
string $fallbackLocaleCode,
- ?string $baseLocaleCode = null
+ ?string $baseLocaleCode = null,
): Collection {
if (null === $baseLocaleCode || $baseLocaleCode === $fallbackLocaleCode) {
$baseLocaleCode = $fallbackLocaleCode;
@@ -179,7 +177,7 @@ public function getAttributesByLocale(
$attributes = $this->attributes->filter(
function (ProductAttributeValueInterface $attribute) use ($baseLocaleCode) {
return $attribute->getLocaleCode() === $baseLocaleCode || null === $attribute->getLocaleCode();
- }
+ },
);
$attributesWithFallback = [];
@@ -196,7 +194,7 @@ public function addAttribute(?AttributeValueInterface $attribute): void
Assert::isInstanceOf(
$attribute,
ProductAttributeValueInterface::class,
- 'Attribute objects added to a Product object have to implement ProductAttributeValueInterface'
+ 'Attribute objects added to a Product object have to implement ProductAttributeValueInterface',
);
if (!$this->hasAttribute($attribute)) {
@@ -211,7 +209,7 @@ public function removeAttribute(?AttributeValueInterface $attribute): void
Assert::isInstanceOf(
$attribute,
ProductAttributeValueInterface::class,
- 'Attribute objects removed from a Product object have to implement ProductAttributeValueInterface'
+ 'Attribute objects removed from a Product object have to implement ProductAttributeValueInterface',
);
if ($this->hasAttribute($attribute)) {
@@ -230,8 +228,8 @@ public function hasAttributeByCodeAndLocale(string $attributeCode, ?string $loca
$localeCode = $localeCode ?: $this->getTranslation()->getLocale();
foreach ($this->attributes as $attribute) {
- if ($attribute->getAttribute()->getCode() === $attributeCode
- && ($attribute->getLocaleCode() === $localeCode || null === $attribute->getLocaleCode())) {
+ if ($attribute->getAttribute()->getCode() === $attributeCode &&
+ ($attribute->getLocaleCode() === $localeCode || null === $attribute->getLocaleCode())) {
return true;
}
}
@@ -291,7 +289,7 @@ public function getEnabledVariants(): Collection
return $this->variants->filter(
function (ProductVariantInterface $productVariant) {
return $productVariant->isEnabled();
- }
+ },
);
}
@@ -379,7 +377,7 @@ protected function createTranslation(): ProductTranslationInterface
protected function getAttributeInDifferentLocale(
ProductAttributeValueInterface $attributeValue,
string $localeCode,
- ?string $fallbackLocaleCode = null
+ ?string $fallbackLocaleCode = null,
): AttributeValueInterface {
if (!$this->hasNotEmptyAttributeByCodeAndLocale($attributeValue->getCode(), $localeCode)) {
if (
diff --git a/src/Sylius/Component/Product/Model/ProductAssociation.php b/src/Sylius/Component/Product/Model/ProductAssociation.php
index 4c2d7da5c74..5c0511a511d 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 72e6db63fdc..b3eafba89c8 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 eab6e3bfbee..5d102e7e4ff 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 5cbe89c77e7..86d24c544e5 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 71c2b84cd1e..d07d2657199 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 08114d7f78a..1065834fe29 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()
@@ -88,7 +84,7 @@ public function getOptionCode(): ?string
{
if (null === $this->option) {
throw new \BadMethodCallException(
- 'The option have not been created yet so you cannot access proxy methods.'
+ 'The option have not been created yet so you cannot access proxy methods.',
);
}
@@ -102,7 +98,7 @@ public function getName(): ?string
{
if (null === $this->option) {
throw new \BadMethodCallException(
- 'The option have not been created yet so you cannot access proxy methods.'
+ 'The option have not been created yet so you cannot access proxy methods.',
);
}
diff --git a/src/Sylius/Component/Product/Model/ProductOptionValueTranslation.php b/src/Sylius/Component/Product/Model/ProductOptionValueTranslation.php
index 7caf138e817..b5c269355e2 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 9b39a9ffd02..c63254206f4 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 5aabe8012c6..27e013e966e 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 33fd58dd0df..bd7b41316fd 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/Product/Resolver/AvailableProductOptionValuesResolver.php b/src/Sylius/Component/Product/Resolver/AvailableProductOptionValuesResolver.php
index 39ab952fc28..889a49a8925 100644
--- a/src/Sylius/Component/Product/Resolver/AvailableProductOptionValuesResolver.php
+++ b/src/Sylius/Component/Product/Resolver/AvailableProductOptionValuesResolver.php
@@ -27,8 +27,8 @@ public function resolve(ProductInterface $product, ProductOptionInterface $produ
sprintf(
'Cannot resolve available product option values. Option "%s" does not belong to product "%s".',
$product->getCode(),
- $productOption->getCode()
- )
+ $productOption->getCode(),
+ ),
);
}
@@ -41,7 +41,7 @@ static function (ProductOptionValueInterface $productOptionValue) use ($product)
}
return false;
- }
+ },
);
}
}
diff --git a/src/Sylius/Component/Product/spec/Factory/ProductFactorySpec.php b/src/Sylius/Component/Product/spec/Factory/ProductFactorySpec.php
index ea591e9cea8..d776766f6c8 100644
--- a/src/Sylius/Component/Product/spec/Factory/ProductFactorySpec.php
+++ b/src/Sylius/Component/Product/spec/Factory/ProductFactorySpec.php
@@ -23,7 +23,7 @@ final class ProductFactorySpec extends ObjectBehavior
{
function let(
FactoryInterface $factory,
- FactoryInterface $variantFactory
+ FactoryInterface $variantFactory,
): void {
$this->beConstructedWith($factory, $variantFactory);
}
@@ -44,7 +44,7 @@ function it_creates_new_product_with_variant(
FactoryInterface $factory,
FactoryInterface $variantFactory,
ProductInterface $product,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$variantFactory->createNew()->willReturn($variant);
diff --git a/src/Sylius/Component/Product/spec/Factory/ProductVariantFactorySpec.php b/src/Sylius/Component/Product/spec/Factory/ProductVariantFactorySpec.php
index f7caaab7d40..15d0bf40c28 100644
--- a/src/Sylius/Component/Product/spec/Factory/ProductVariantFactorySpec.php
+++ b/src/Sylius/Component/Product/spec/Factory/ProductVariantFactorySpec.php
@@ -46,7 +46,7 @@ function it_creates_new_variant(FactoryInterface $factory, ProductVariantInterfa
function it_creates_a_variant_and_assigns_a_product_to_it(
FactoryInterface $factory,
ProductInterface $product,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$factory->createNew()->willReturn($variant);
$variant->setProduct($product)->shouldBeCalled();
diff --git a/src/Sylius/Component/Product/spec/Generator/ProductVariantGeneratorSpec.php b/src/Sylius/Component/Product/spec/Generator/ProductVariantGeneratorSpec.php
index faa7d590a22..dac51ac642a 100644
--- a/src/Sylius/Component/Product/spec/Generator/ProductVariantGeneratorSpec.php
+++ b/src/Sylius/Component/Product/spec/Generator/ProductVariantGeneratorSpec.php
@@ -28,7 +28,7 @@ final class ProductVariantGeneratorSpec extends ObjectBehavior
{
function let(
ProductVariantFactoryInterface $productVariantFactory,
- ProductVariantsParityCheckerInterface $variantsParityChecker
+ ProductVariantsParityCheckerInterface $variantsParityChecker,
): void {
$this->beConstructedWith($productVariantFactory, $variantsParityChecker);
}
@@ -53,14 +53,14 @@ function it_generates_variants_for_every_value_of_an_objects_single_option(
ProductOptionValueInterface $whiteColor,
ProductVariantFactoryInterface $productVariantFactory,
ProductVariantInterface $permutationVariant,
- ProductVariantsParityCheckerInterface $variantsParityChecker
+ ProductVariantsParityCheckerInterface $variantsParityChecker,
): void {
$productVariable->hasOptions()->willReturn(true);
$productVariable->getOptions()->willReturn(new ArrayCollection([$colorOption->getWrappedObject()]));
$colorOption->getValues()->willReturn(
- new ArrayCollection([$blackColor->getWrappedObject(), $whiteColor->getWrappedObject(), $redColor->getWrappedObject()])
+ new ArrayCollection([$blackColor->getWrappedObject(), $whiteColor->getWrappedObject(), $redColor->getWrappedObject()]),
);
$blackColor->getCode()->willReturn('black1');
@@ -85,14 +85,14 @@ function it_does_not_generate_variant_if_given_variant_exists(
ProductOptionValueInterface $whiteColor,
ProductVariantFactoryInterface $productVariantFactory,
ProductVariantInterface $permutationVariant,
- ProductVariantsParityCheckerInterface $variantsParityChecker
+ ProductVariantsParityCheckerInterface $variantsParityChecker,
): void {
$productVariable->hasOptions()->willReturn(true);
$productVariable->getOptions()->willReturn(new ArrayCollection([$colorOption->getWrappedObject()]));
$colorOption->getValues()->willReturn(
- new ArrayCollection([$blackColor->getWrappedObject(), $whiteColor->getWrappedObject(), $redColor->getWrappedObject()])
+ new ArrayCollection([$blackColor->getWrappedObject(), $whiteColor->getWrappedObject(), $redColor->getWrappedObject()]),
);
$blackColor->getCode()->willReturn('black1');
@@ -121,19 +121,19 @@ function it_generates_variants_for_every_possible_permutation_of_an_objects_opti
ProductOptionValueInterface $whiteColor,
ProductVariantFactoryInterface $productVariantFactory,
ProductVariantInterface $permutationVariant,
- ProductVariantsParityCheckerInterface $variantsParityChecker
+ ProductVariantsParityCheckerInterface $variantsParityChecker,
): void {
$productVariable->hasOptions()->willReturn(true);
$productVariable->getOptions()->willReturn(
- new ArrayCollection([$colorOption->getWrappedObject(), $sizeOption->getWrappedObject()])
+ new ArrayCollection([$colorOption->getWrappedObject(), $sizeOption->getWrappedObject()]),
);
$colorOption->getValues()->willReturn(
- new ArrayCollection([$blackColor->getWrappedObject(), $whiteColor->getWrappedObject(), $redColor->getWrappedObject()])
+ new ArrayCollection([$blackColor->getWrappedObject(), $whiteColor->getWrappedObject(), $redColor->getWrappedObject()]),
);
$sizeOption->getValues()->willReturn(
- new ArrayCollection([$smallSize->getWrappedObject(), $mediumSize->getWrappedObject(), $largeSize->getWrappedObject()])
+ new ArrayCollection([$smallSize->getWrappedObject(), $mediumSize->getWrappedObject(), $largeSize->getWrappedObject()]),
);
$blackColor->getCode()->willReturn('black1');
diff --git a/src/Sylius/Component/Product/spec/Model/ProductSpec.php b/src/Sylius/Component/Product/spec/Model/ProductSpec.php
index d6171d15da3..5d9156dfb42 100644
--- a/src/Sylius/Component/Product/spec/Model/ProductSpec.php
+++ b/src/Sylius/Component/Product/spec/Model/ProductSpec.php
@@ -120,7 +120,7 @@ function it_refuses_to_remove_non_product_attribute(AttributeValueInterface $att
function it_returns_attributes_by_a_locale_without_a_base_locale(
ProductAttributeInterface $attribute,
ProductAttributeValueInterface $attributeValueEN,
- ProductAttributeValueInterface $attributeValuePL
+ ProductAttributeValueInterface $attributeValuePL,
): void {
$attribute->getCode()->willReturn('colour');
@@ -149,7 +149,7 @@ function it_returns_attributes_by_a_locale_with_a_base_locale(
ProductAttributeInterface $attribute,
ProductAttributeValueInterface $attributeValueEN,
ProductAttributeValueInterface $attributeValuePL,
- ProductAttributeValueInterface $attributeValueFR
+ ProductAttributeValueInterface $attributeValueFR,
): void {
$attribute->getCode()->willReturn('colour');
@@ -183,7 +183,7 @@ function it_returns_attributes_by_a_locale_with_a_base_locale(
function it_returns_attributes_by_a_fallback_locale_when_there_is_no_value_for_a_given_locale(
ProductAttributeInterface $attribute,
- ProductAttributeValueInterface $attributeValueEN
+ ProductAttributeValueInterface $attributeValueEN,
): void {
$attribute->getCode()->willReturn('colour');
@@ -204,7 +204,7 @@ function it_returns_attributes_by_a_fallback_locale_when_there_is_no_value_for_a
function it_returns_attributes_by_a_fallback_locale_when_there_is_an_empty_value_for_a_given_locale(
ProductAttributeInterface $attribute,
ProductAttributeValueInterface $attributeValueEN,
- ProductAttributeValueInterface $attributeValuePL
+ ProductAttributeValueInterface $attributeValuePL,
): void {
$attribute->getCode()->willReturn('colour');
@@ -231,7 +231,7 @@ function it_returns_attributes_by_a_fallback_locale_when_there_is_an_empty_value
function it_returns_attributes_by_a_base_locale_when_there_is_no_value_for_a_given_locale_or_a_fallback_locale(
ProductAttributeInterface $attribute,
- ProductAttributeValueInterface $attributeValueFR
+ ProductAttributeValueInterface $attributeValueFR,
): void {
$attribute->getCode()->willReturn('colour');
@@ -253,7 +253,7 @@ function it_returns_attributes_by_a_base_locale_when_there_is_an_empty_value_for
ProductAttributeInterface $attribute,
ProductAttributeValueInterface $attributeValueEN,
ProductAttributeValueInterface $attributeValuePL,
- ProductAttributeValueInterface $attributeValueFR
+ ProductAttributeValueInterface $attributeValueFR,
): void {
$attribute->getCode()->willReturn('colour');
@@ -292,7 +292,7 @@ function it_has_no_variants_by_default(): void
function its_says_it_has_variants_only_if_multiple_variants_are_defined(
ProductVariantInterface $firstVariant,
- ProductVariantInterface $secondVariant
+ ProductVariantInterface $secondVariant,
): void {
$firstVariant->setProduct($this)->shouldBeCalled();
$secondVariant->setProduct($this)->shouldBeCalled();
@@ -316,7 +316,7 @@ function it_does_not_include_unavailable_variants_in_available_variants(ProductV
function it_returns_available_variants(
ProductVariantInterface $unavailableVariant,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$unavailableVariant->setProduct($this)->shouldBeCalled();
$variant->setProduct($this)->shouldBeCalled();
@@ -422,7 +422,7 @@ function it_is_simple_if_it_has_one_variant_and_no_options(ProductVariantInterfa
function it_is_configurable_if_it_has_at_least_two_variants(
ProductVariantInterface $firstVariant,
- ProductVariantInterface $secondVariant
+ ProductVariantInterface $secondVariant,
): void {
$firstVariant->setProduct($this)->shouldBeCalled();
$this->addVariant($firstVariant);
@@ -435,7 +435,7 @@ function it_is_configurable_if_it_has_at_least_two_variants(
function it_is_configurable_if_it_has_one_variant_and_at_least_one_option(
ProductOptionInterface $option,
- ProductVariantInterface $variant
+ ProductVariantInterface $variant,
): void {
$variant->setProduct($this)->shouldBeCalled();
$this->addVariant($variant);
diff --git a/src/Sylius/Component/Product/spec/Resolver/AvailableProductOptionValuesResolverSpec.php b/src/Sylius/Component/Product/spec/Resolver/AvailableProductOptionValuesResolverSpec.php
index 2a01cd82059..cf63bce91ae 100644
--- a/src/Sylius/Component/Product/spec/Resolver/AvailableProductOptionValuesResolverSpec.php
+++ b/src/Sylius/Component/Product/spec/Resolver/AvailableProductOptionValuesResolverSpec.php
@@ -29,7 +29,7 @@ class AvailableProductOptionValuesResolverSpec extends ObjectBehavior
function let(
ProductInterface $product,
- ProductOptionInterface $productOption
+ ProductOptionInterface $productOption,
) {
$product->getCode()->willReturn(self::PRODUCT_CODE);
$productOption->getCode()->willReturn(self::PRODUCT_OPTION_CODE);
@@ -43,7 +43,7 @@ function it_implements_available_product_options_resolver_interface()
function it_throws_if_option_does_not_belong_to_product(
ProductInterface $product,
- ProductOptionInterface $productOption
+ ProductOptionInterface $productOption,
) {
$product->hasOption($productOption)->willReturn(false);
@@ -52,9 +52,9 @@ function it_throws_if_option_does_not_belong_to_product(
sprintf(
'Cannot resolve available product option values. Option "%s" does not belong to product "%s".',
self::PRODUCT_CODE,
- self::PRODUCT_OPTION_CODE
- )
- )
+ self::PRODUCT_OPTION_CODE,
+ ),
+ ),
)->during('resolve', [$product, $productOption]);
}
@@ -63,15 +63,15 @@ function it_filters_out_values_without_related_enabled_variants(
ProductOptionInterface $productOption,
ProductOptionValueInterface $productOptionValue1,
ProductOptionValueInterface $productOptionValue2,
- ProductVariantInterface $productVariant
+ ProductVariantInterface $productVariant,
) {
$productOption->getValues()->willReturn(
new ArrayCollection(
[
$productOptionValue1->getWrappedObject(),
$productOptionValue2->getWrappedObject(),
- ]
- )
+ ],
+ ),
);
$product->getEnabledVariants()->willReturn(new ArrayCollection([$productVariant->getWrappedObject()]));
$productVariant->hasOptionValue($productOptionValue1)->willReturn(true);
diff --git a/src/Sylius/Component/Product/spec/Resolver/DefaultProductVariantResolverSpec.php b/src/Sylius/Component/Product/spec/Resolver/DefaultProductVariantResolverSpec.php
index e7dd399ec55..70150d5f643 100644
--- a/src/Sylius/Component/Product/spec/Resolver/DefaultProductVariantResolverSpec.php
+++ b/src/Sylius/Component/Product/spec/Resolver/DefaultProductVariantResolverSpec.php
@@ -29,7 +29,7 @@ function it_implements_variant_resolver_interface(): void
function it_returns_first_variant(
ProductInterface $product,
ProductVariantInterface $variant,
- Collection $variants
+ Collection $variants,
): void {
$product->getEnabledVariants()->willReturn($variants);
$variants->isEmpty()->willReturn(false);
diff --git a/src/Sylius/Component/Promotion/Exception/FailedGenerationException.php b/src/Sylius/Component/Promotion/Exception/FailedGenerationException.php
index 544b576c0ff..276f7ca17a0 100644
--- a/src/Sylius/Component/Promotion/Exception/FailedGenerationException.php
+++ b/src/Sylius/Component/Promotion/Exception/FailedGenerationException.php
@@ -20,12 +20,12 @@ final class FailedGenerationException extends \InvalidArgumentException
public function __construct(
PromotionCouponGeneratorInstructionInterface $instruction,
int $exceptionCode = 0,
- ?\Exception $previousException = null
+ ?\Exception $previousException = null,
) {
$message = sprintf(
'Invalid coupon code length or coupons amount. It is not possible to generate %d unique coupons with %d code length',
$instruction->getAmount(),
- $instruction->getCodeLength()
+ $instruction->getCodeLength(),
);
parent::__construct($message, $exceptionCode, $previousException);
diff --git a/src/Sylius/Component/Promotion/Factory/PromotionCouponFactory.php b/src/Sylius/Component/Promotion/Factory/PromotionCouponFactory.php
index 969d22a307d..97bd7d1c2f2 100644
--- a/src/Sylius/Component/Promotion/Factory/PromotionCouponFactory.php
+++ b/src/Sylius/Component/Promotion/Factory/PromotionCouponFactory.php
@@ -36,7 +36,7 @@ public function createForPromotion(PromotionInterface $promotion): PromotionCoup
{
Assert::true(
$promotion->isCouponBased(),
- sprintf('Promotion with name %s is not coupon based.', $promotion->getName())
+ sprintf('Promotion with name %s is not coupon based.', $promotion->getName()),
);
/** @var PromotionCouponInterface $coupon */
diff --git a/src/Sylius/Component/Promotion/Generator/PercentageGenerationPolicy.php b/src/Sylius/Component/Promotion/Generator/PercentageGenerationPolicy.php
index c6317aa8731..8c4e91cf9da 100644
--- a/src/Sylius/Component/Promotion/Generator/PercentageGenerationPolicy.php
+++ b/src/Sylius/Component/Promotion/Generator/PercentageGenerationPolicy.php
@@ -51,13 +51,13 @@ private function calculatePossibleGenerationAmount(PromotionCouponGeneratorInstr
Assert::allNotNull(
[$expectedAmount, $expectedCodeLength],
- 'Code length or amount cannot be null.'
+ 'Code length or amount cannot be null.',
);
$generatedAmount = $this->couponRepository->countByCodeLength(
$expectedCodeLength,
$instruction->getPrefix(),
- $instruction->getSuffix()
+ $instruction->getSuffix(),
);
$codeCombination = 16 ** $expectedCodeLength * $this->ratio;
diff --git a/src/Sylius/Component/Promotion/Generator/PromotionCouponGenerator.php b/src/Sylius/Component/Promotion/Generator/PromotionCouponGenerator.php
index a8f8bd88f32..adbf1c3dbf5 100644
--- a/src/Sylius/Component/Promotion/Generator/PromotionCouponGenerator.php
+++ b/src/Sylius/Component/Promotion/Generator/PromotionCouponGenerator.php
@@ -35,7 +35,7 @@ public function __construct(
FactoryInterface $couponFactory,
PromotionCouponRepositoryInterface $couponRepository,
ObjectManager $objectManager,
- GenerationPolicyInterface $generationPolicy
+ GenerationPolicyInterface $generationPolicy,
) {
$this->couponFactory = $couponFactory;
$this->couponRepository = $couponRepository;
@@ -53,7 +53,7 @@ public function generate(PromotionInterface $promotion, PromotionCouponGenerator
$instruction->getCodeLength(),
$generatedCoupons,
$instruction->getPrefix(),
- $instruction->getSuffix()
+ $instruction->getSuffix(),
);
/** @var PromotionCouponInterface $coupon */
@@ -80,7 +80,7 @@ private function generateUniqueCode(
int $codeLength,
array $generatedCoupons,
?string $prefix,
- ?string $suffix
+ ?string $suffix,
): string {
Assert::nullOrRange($codeLength, 1, 40, 'Invalid %d code length should be between %d and %d');
diff --git a/src/Sylius/Component/Promotion/Model/Promotion.php b/src/Sylius/Component/Promotion/Model/Promotion.php
index 38486c62845..3f3bd7ca525 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 06c7cc74650..7b380b646a4 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 0a77ecfbf8e..780dd8b4468 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 223653ffcbe..02e55bdfc22 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/Promotion/Processor/PromotionProcessor.php b/src/Sylius/Component/Promotion/Processor/PromotionProcessor.php
index 9e300a628ae..c1a802687bc 100644
--- a/src/Sylius/Component/Promotion/Processor/PromotionProcessor.php
+++ b/src/Sylius/Component/Promotion/Processor/PromotionProcessor.php
@@ -29,7 +29,7 @@ final class PromotionProcessor implements PromotionProcessorInterface
public function __construct(
PreQualifiedPromotionsProviderInterface $preQualifiedPromotionsProvider,
PromotionEligibilityCheckerInterface $promotionEligibilityChecker,
- PromotionApplicatorInterface $promotionApplicator
+ PromotionApplicatorInterface $promotionApplicator,
) {
$this->preQualifiedPromotionsProvider = $preQualifiedPromotionsProvider;
$this->promotionEligibilityChecker = $promotionEligibilityChecker;
diff --git a/src/Sylius/Component/Promotion/Repository/PromotionCouponRepositoryInterface.php b/src/Sylius/Component/Promotion/Repository/PromotionCouponRepositoryInterface.php
index be3a3afb817..4a011a955ec 100644
--- a/src/Sylius/Component/Promotion/Repository/PromotionCouponRepositoryInterface.php
+++ b/src/Sylius/Component/Promotion/Repository/PromotionCouponRepositoryInterface.php
@@ -24,7 +24,7 @@ public function createQueryBuilderByPromotionId($promotionId): QueryBuilder;
public function countByCodeLength(
int $codeLength,
?string $prefix = null,
- ?string $suffix = null
+ ?string $suffix = null,
): int;
public function findOneByCodeAndPromotionCode(string $code, string $promotionCode): ?PromotionCouponInterface;
diff --git a/src/Sylius/Component/Promotion/spec/Action/PromotionApplicatorSpec.php b/src/Sylius/Component/Promotion/spec/Action/PromotionApplicatorSpec.php
index db9a1aaa900..08696c3eeee 100644
--- a/src/Sylius/Component/Promotion/spec/Action/PromotionApplicatorSpec.php
+++ b/src/Sylius/Component/Promotion/spec/Action/PromotionApplicatorSpec.php
@@ -39,7 +39,7 @@ function it_executes_all_actions_registered(
PromotionActionCommandInterface $actionCommand,
PromotionSubjectInterface $subject,
PromotionInterface $promotion,
- PromotionActionInterface $action
+ PromotionActionInterface $action,
): void {
$configuration = [];
@@ -62,10 +62,10 @@ function it_applies_promotion_if_at_least_one_action_was_executed_even_if_the_la
PromotionSubjectInterface $subject,
PromotionInterface $promotion,
PromotionActionInterface $firstAction,
- PromotionActionInterface $secondAction
+ PromotionActionInterface $secondAction,
): void {
$promotion->getActions()->willReturn(
- new ArrayCollection([$firstAction->getWrappedObject(), $secondAction->getWrappedObject()])
+ new ArrayCollection([$firstAction->getWrappedObject(), $secondAction->getWrappedObject()]),
);
$firstAction->getType()->willReturn('first_action');
@@ -92,10 +92,10 @@ function it_applies_promotion_if_at_least_one_action_was_executed(
PromotionSubjectInterface $subject,
PromotionInterface $promotion,
PromotionActionInterface $firstAction,
- PromotionActionInterface $secondAction
+ PromotionActionInterface $secondAction,
): void {
$promotion->getActions()->willReturn(
- new ArrayCollection([$firstAction->getWrappedObject(), $secondAction->getWrappedObject()])
+ new ArrayCollection([$firstAction->getWrappedObject(), $secondAction->getWrappedObject()]),
);
$firstAction->getType()->willReturn('first_action');
@@ -122,10 +122,10 @@ function it_does_not_add_promotion_if_no_action_has_been_applied(
PromotionSubjectInterface $subject,
PromotionInterface $promotion,
PromotionActionInterface $firstAction,
- PromotionActionInterface $secondAction
+ PromotionActionInterface $secondAction,
): void {
$promotion->getActions()->willReturn(
- new ArrayCollection([$firstAction->getWrappedObject(), $secondAction->getWrappedObject()])
+ new ArrayCollection([$firstAction->getWrappedObject(), $secondAction->getWrappedObject()]),
);
$firstAction->getType()->willReturn('first_action');
@@ -150,7 +150,7 @@ function it_reverts_all_actions_registered(
PromotionActionCommandInterface $actionCommand,
PromotionSubjectInterface $subject,
PromotionInterface $promotion,
- PromotionActionInterface $action
+ PromotionActionInterface $action,
): void {
$configuration = [];
diff --git a/src/Sylius/Component/Promotion/spec/Checker/Eligibility/CompositePromotionCouponEligibilityCheckerSpec.php b/src/Sylius/Component/Promotion/spec/Checker/Eligibility/CompositePromotionCouponEligibilityCheckerSpec.php
index 328189ada6c..8420da4ddbf 100644
--- a/src/Sylius/Component/Promotion/spec/Checker/Eligibility/CompositePromotionCouponEligibilityCheckerSpec.php
+++ b/src/Sylius/Component/Promotion/spec/Checker/Eligibility/CompositePromotionCouponEligibilityCheckerSpec.php
@@ -34,7 +34,7 @@ function it_returns_true_if_all_eligibility_checker_returns_true(
PromotionCouponEligibilityCheckerInterface $firstPromotionCouponEligibilityChecker,
PromotionCouponEligibilityCheckerInterface $secondPromotionCouponEligibilityChecker,
PromotionSubjectInterface $promotionSubject,
- PromotionCouponInterface $promotionCoupon
+ PromotionCouponInterface $promotionCoupon,
): void {
$this->beConstructedWith([
$firstPromotionCouponEligibilityChecker,
@@ -51,7 +51,7 @@ function it_returns_false_if_any_eligibility_checker_returns_false(
PromotionCouponEligibilityCheckerInterface $firstPromotionCouponEligibilityChecker,
PromotionCouponEligibilityCheckerInterface $secondPromotionCouponEligibilityChecker,
PromotionSubjectInterface $promotionSubject,
- PromotionCouponInterface $promotionCoupon
+ PromotionCouponInterface $promotionCoupon,
): void {
$this->beConstructedWith([
$firstPromotionCouponEligibilityChecker,
@@ -68,7 +68,7 @@ function it_stops_checking_at_the_first_failing_eligibility_checker(
PromotionCouponEligibilityCheckerInterface $firstPromotionCouponEligibilityChecker,
PromotionCouponEligibilityCheckerInterface $secondPromotionCouponEligibilityChecker,
PromotionSubjectInterface $promotionSubject,
- PromotionCouponInterface $promotionCoupon
+ PromotionCouponInterface $promotionCoupon,
): void {
$this->beConstructedWith([
$firstPromotionCouponEligibilityChecker,
diff --git a/src/Sylius/Component/Promotion/spec/Checker/Eligibility/CompositePromotionEligibilityCheckerSpec.php b/src/Sylius/Component/Promotion/spec/Checker/Eligibility/CompositePromotionEligibilityCheckerSpec.php
index 49499a9566b..641b441d757 100644
--- a/src/Sylius/Component/Promotion/spec/Checker/Eligibility/CompositePromotionEligibilityCheckerSpec.php
+++ b/src/Sylius/Component/Promotion/spec/Checker/Eligibility/CompositePromotionEligibilityCheckerSpec.php
@@ -34,7 +34,7 @@ function it_returns_true_if_all_eligibility_checker_returns_true(
PromotionEligibilityCheckerInterface $firstPromotionEligibilityChecker,
PromotionEligibilityCheckerInterface $secondPromotionEligibilityChecker,
PromotionSubjectInterface $promotionSubject,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$this->beConstructedWith([
$firstPromotionEligibilityChecker,
@@ -51,7 +51,7 @@ function it_returns_false_if_any_eligibility_checker_returns_false(
PromotionEligibilityCheckerInterface $firstPromotionEligibilityChecker,
PromotionEligibilityCheckerInterface $secondPromotionEligibilityChecker,
PromotionSubjectInterface $promotionSubject,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$this->beConstructedWith([
$firstPromotionEligibilityChecker,
@@ -68,7 +68,7 @@ function it_stops_chcecking_at_the_first_failing_eligibility_checker(
PromotionEligibilityCheckerInterface $firstPromotionEligibilityChecker,
PromotionEligibilityCheckerInterface $secondPromotionEligibilityChecker,
PromotionSubjectInterface $promotionSubject,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$this->beConstructedWith([
$firstPromotionEligibilityChecker,
diff --git a/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionCouponDurationEligibilityCheckerSpec.php b/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionCouponDurationEligibilityCheckerSpec.php
index cbd788fcca4..6bf106350f6 100644
--- a/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionCouponDurationEligibilityCheckerSpec.php
+++ b/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionCouponDurationEligibilityCheckerSpec.php
@@ -27,7 +27,7 @@ function it_is_a_promotion_coupon_eligibility_checker(): void
function it_returns_true_if_promotion_coupon_does_not_expire(
PromotionSubjectInterface $promotionSubject,
- PromotionCouponInterface $promotionCoupon
+ PromotionCouponInterface $promotionCoupon,
): void {
$promotionCoupon->getExpiresAt()->willReturn(null);
@@ -36,7 +36,7 @@ function it_returns_true_if_promotion_coupon_does_not_expire(
function it_returns_true_if_promotion_coupon_has_not_expired_yet(
PromotionSubjectInterface $promotionSubject,
- PromotionCouponInterface $promotionCoupon
+ PromotionCouponInterface $promotionCoupon,
): void {
$promotionCoupon->getExpiresAt()->willReturn(new \DateTime('tomorrow'));
@@ -45,7 +45,7 @@ function it_returns_true_if_promotion_coupon_has_not_expired_yet(
function it_returns_false_if_promotion_coupon_has_already_expired(
PromotionSubjectInterface $promotionSubject,
- PromotionCouponInterface $promotionCoupon
+ PromotionCouponInterface $promotionCoupon,
): void {
$promotionCoupon->getExpiresAt()->willReturn(new \DateTime('yesterday'));
diff --git a/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionCouponUsageLimitEligibilityCheckerSpec.php b/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionCouponUsageLimitEligibilityCheckerSpec.php
index 12a9a235cb0..6feb105fb6e 100644
--- a/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionCouponUsageLimitEligibilityCheckerSpec.php
+++ b/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionCouponUsageLimitEligibilityCheckerSpec.php
@@ -27,7 +27,7 @@ function it_is_a_promotion_coupon_eligibility_checker(): void
function it_returns_true_if_usage_limit_is_not_defined(
PromotionSubjectInterface $promotionSubject,
- PromotionCouponInterface $promotionCoupon
+ PromotionCouponInterface $promotionCoupon,
): void {
$promotionCoupon->getUsageLimit()->willReturn(null);
@@ -36,7 +36,7 @@ function it_returns_true_if_usage_limit_is_not_defined(
function it_returns_true_if_usage_limit_has_not_been_reached_yet(
PromotionSubjectInterface $promotionSubject,
- PromotionCouponInterface $promotionCoupon
+ PromotionCouponInterface $promotionCoupon,
): void {
$promotionCoupon->getUsageLimit()->willReturn(42);
$promotionCoupon->getUsed()->willReturn(41);
@@ -46,7 +46,7 @@ function it_returns_true_if_usage_limit_has_not_been_reached_yet(
function it_returns_false_if_usage_limit_has_been_reached(
PromotionSubjectInterface $promotionSubject,
- PromotionCouponInterface $promotionCoupon
+ PromotionCouponInterface $promotionCoupon,
): void {
$promotionCoupon->getUsageLimit()->willReturn(42);
$promotionCoupon->getUsed()->willReturn(42);
diff --git a/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionDurationEligibilityCheckerSpec.php b/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionDurationEligibilityCheckerSpec.php
index 546a03eafe8..4b8d916e319 100644
--- a/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionDurationEligibilityCheckerSpec.php
+++ b/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionDurationEligibilityCheckerSpec.php
@@ -27,7 +27,7 @@ function it_implements_a_promotion_eligibility_checker_interface(): void
function it_returns_false_if_promotion_has_not_started_yet(
PromotionSubjectInterface $promotionSubject,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$promotion->getStartsAt()->willReturn(new \DateTime('+3 days'));
@@ -36,7 +36,7 @@ function it_returns_false_if_promotion_has_not_started_yet(
function it_returns_false_if_promotion_has_already_ended(
PromotionSubjectInterface $promotionSubject,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$promotion->getStartsAt()->willReturn(new \DateTime('-5 days'));
$promotion->getEndsAt()->willReturn(new \DateTime('-3 days'));
@@ -46,7 +46,7 @@ function it_returns_false_if_promotion_has_already_ended(
function it_returns_true_if_promotion_is_currently_available(
PromotionSubjectInterface $promotionSubject,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$promotion->getStartsAt()->willReturn(new \DateTime('-2 days'));
$promotion->getEndsAt()->willReturn(new \DateTime('+2 days'));
@@ -56,7 +56,7 @@ function it_returns_true_if_promotion_is_currently_available(
function it_returns_true_if_promotion_dates_are_not_specified(
PromotionSubjectInterface $promotionSubject,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$promotion->getStartsAt()->willReturn(null);
$promotion->getEndsAt()->willReturn(null);
diff --git a/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionRulesEligibilityCheckerSpec.php b/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionRulesEligibilityCheckerSpec.php
index 5dd209a7c0d..b7006cdecb3 100644
--- a/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionRulesEligibilityCheckerSpec.php
+++ b/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionRulesEligibilityCheckerSpec.php
@@ -36,7 +36,7 @@ function it_implements_a_promotion_eligibility_checker_interface(): void
function it_recognizes_a_subject_as_eligible_if_a_promotion_has_no_rules(
PromotionInterface $promotion,
- PromotionSubjectInterface $subject
+ PromotionSubjectInterface $subject,
): void {
$promotion->hasRules()->willReturn(false);
@@ -50,11 +50,11 @@ function it_recognizes_a_subject_as_eligible_if_all_of_promotion_rules_are_fulfi
PromotionRuleInterface $firstRule,
PromotionRuleInterface $secondRule,
PromotionInterface $promotion,
- PromotionSubjectInterface $subject
+ PromotionSubjectInterface $subject,
): void {
$promotion->hasRules()->willReturn(true);
$promotion->getRules()->willReturn(
- new ArrayCollection([$firstRule->getWrappedObject(), $secondRule->getWrappedObject()])
+ new ArrayCollection([$firstRule->getWrappedObject(), $secondRule->getWrappedObject()]),
);
$firstRule->getType()->willReturn('first_rule');
@@ -79,11 +79,11 @@ function it_recognizes_a_subject_as_not_eligible_if_any_of_promotion_rules_is_no
PromotionRuleInterface $firstRule,
PromotionRuleInterface $secondRule,
PromotionInterface $promotion,
- PromotionSubjectInterface $subject
+ PromotionSubjectInterface $subject,
): void {
$promotion->hasRules()->willReturn(true);
$promotion->getRules()->willReturn(
- new ArrayCollection([$firstRule->getWrappedObject(), $secondRule->getWrappedObject()])
+ new ArrayCollection([$firstRule->getWrappedObject(), $secondRule->getWrappedObject()]),
);
$firstRule->getType()->willReturn('first_rule');
@@ -108,11 +108,11 @@ function it_does_not_check_more_rules_if_one_has_returned_false(
PromotionRuleInterface $firstRule,
PromotionRuleInterface $secondRule,
PromotionInterface $promotion,
- PromotionSubjectInterface $subject
+ PromotionSubjectInterface $subject,
): void {
$promotion->hasRules()->willReturn(true);
$promotion->getRules()->willReturn(
- new ArrayCollection([$firstRule->getWrappedObject(), $secondRule->getWrappedObject()])
+ new ArrayCollection([$firstRule->getWrappedObject(), $secondRule->getWrappedObject()]),
);
$firstRule->getType()->willReturn('first_rule');
diff --git a/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionSubjectCouponEligibilityCheckerSpec.php b/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionSubjectCouponEligibilityCheckerSpec.php
index 6fe812d3549..39ee01528fe 100644
--- a/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionSubjectCouponEligibilityCheckerSpec.php
+++ b/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionSubjectCouponEligibilityCheckerSpec.php
@@ -37,7 +37,7 @@ function it_returns_true_if_subject_coupons_are_eligible_to_promotion(
PromotionCouponEligibilityCheckerInterface $promotionCouponEligibilityChecker,
PromotionCouponAwarePromotionSubjectInterface $promotionSubject,
PromotionInterface $promotion,
- PromotionCouponInterface $promotionCoupon
+ PromotionCouponInterface $promotionCoupon,
): void {
$promotion->isCouponBased()->willReturn(true);
@@ -51,7 +51,7 @@ function it_returns_true_if_subject_coupons_are_eligible_to_promotion(
function it_returns_false_if_subject_is_not_coupon_aware(
PromotionSubjectInterface $promotionSubject,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$promotion->isCouponBased()->willReturn(true);
@@ -60,7 +60,7 @@ function it_returns_false_if_subject_is_not_coupon_aware(
function it_returns_false_if_subject_has_no_coupon(
PromotionCouponAwarePromotionSubjectInterface $promotionSubject,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$promotion->isCouponBased()->willReturn(true);
@@ -73,7 +73,7 @@ function it_returns_false_if_subject_coupons_comes_from_an_another_promotion(
PromotionCouponAwarePromotionSubjectInterface $promotionSubject,
PromotionInterface $promotion,
PromotionInterface $otherPromotion,
- PromotionCouponInterface $promotionCoupon
+ PromotionCouponInterface $promotionCoupon,
): void {
$promotion->isCouponBased()->willReturn(true);
@@ -87,7 +87,7 @@ function it_returns_false_if_subject_coupons_is_not_eligible(
PromotionCouponEligibilityCheckerInterface $promotionCouponEligibilityChecker,
PromotionCouponAwarePromotionSubjectInterface $promotionSubject,
PromotionInterface $promotion,
- PromotionCouponInterface $promotionCoupon
+ PromotionCouponInterface $promotionCoupon,
): void {
$promotion->isCouponBased()->willReturn(true);
diff --git a/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionUsageLimitEligibilityCheckerSpec.php b/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionUsageLimitEligibilityCheckerSpec.php
index 0aea515ac4e..075149d1815 100644
--- a/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionUsageLimitEligibilityCheckerSpec.php
+++ b/src/Sylius/Component/Promotion/spec/Checker/Eligibility/PromotionUsageLimitEligibilityCheckerSpec.php
@@ -27,7 +27,7 @@ function it_implements_a_promotion_eligibility_checker_interface(): void
function it_returns_true_if_promotion_has_no_usage_limit(
PromotionSubjectInterface $promotionSubject,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$promotion->getUsageLimit()->willReturn(null);
@@ -36,7 +36,7 @@ function it_returns_true_if_promotion_has_no_usage_limit(
function it_returns_true_if_usage_limit_has_not_been_exceeded(
PromotionSubjectInterface $promotionSubject,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$promotion->getUsageLimit()->willReturn(10);
$promotion->getUsed()->willReturn(5);
@@ -46,7 +46,7 @@ function it_returns_true_if_usage_limit_has_not_been_exceeded(
function it_returns_false_if_usage_limit_has_been_exceeded(
PromotionSubjectInterface $promotionSubject,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$promotion->getUsageLimit()->willReturn(10);
$promotion->getUsed()->willReturn(15);
diff --git a/src/Sylius/Component/Promotion/spec/Checker/Rule/CartQuantityRuleCheckerSpec.php b/src/Sylius/Component/Promotion/spec/Checker/Rule/CartQuantityRuleCheckerSpec.php
index 69990b66bec..b4f950db7f1 100644
--- a/src/Sylius/Component/Promotion/spec/Checker/Rule/CartQuantityRuleCheckerSpec.php
+++ b/src/Sylius/Component/Promotion/spec/Checker/Rule/CartQuantityRuleCheckerSpec.php
@@ -32,7 +32,7 @@ function it_recognizes_empty_subject_as_not_eligible(CountablePromotionSubjectIn
}
function it_recognizes_a_subject_as_not_eligible_if_a_cart_quantity_is_less_then_configured(
- CountablePromotionSubjectInterface $subject
+ CountablePromotionSubjectInterface $subject,
): void {
$subject->getPromotionSubjectCount()->willReturn(7);
@@ -40,7 +40,7 @@ function it_recognizes_a_subject_as_not_eligible_if_a_cart_quantity_is_less_then
}
function it_recognizes_a_subject_as_eligible_if_a_cart_quantity_is_greater_then_configured(
- CountablePromotionSubjectInterface $subject
+ CountablePromotionSubjectInterface $subject,
): void {
$subject->getPromotionSubjectCount()->willReturn(12);
@@ -48,7 +48,7 @@ function it_recognizes_a_subject_as_eligible_if_a_cart_quantity_is_greater_then_
}
function it_recognizes_a_subject_as_eligible_if_a_cart_quantity_is_equal_with_configured(
- CountablePromotionSubjectInterface $subject
+ CountablePromotionSubjectInterface $subject,
): void {
$subject->getPromotionSubjectCount()->willReturn(10);
diff --git a/src/Sylius/Component/Promotion/spec/Checker/Rule/ItemTotalRuleCheckerSpec.php b/src/Sylius/Component/Promotion/spec/Checker/Rule/ItemTotalRuleCheckerSpec.php
index f843856ea3b..793f83939db 100644
--- a/src/Sylius/Component/Promotion/spec/Checker/Rule/ItemTotalRuleCheckerSpec.php
+++ b/src/Sylius/Component/Promotion/spec/Checker/Rule/ItemTotalRuleCheckerSpec.php
@@ -32,7 +32,7 @@ function it_recognizes_an_empty_subject_as_not_eligible(PromotionSubjectInterfac
}
function it_recognizes_a_subject_as_not_eligible_if_a_subject_total_is_less_then_configured(
- PromotionSubjectInterface $subject
+ PromotionSubjectInterface $subject,
): void {
$subject->getPromotionSubjectTotal()->willReturn(400);
@@ -40,7 +40,7 @@ function it_recognizes_a_subject_as_not_eligible_if_a_subject_total_is_less_then
}
function it_recognizes_a_subject_as_eligible_if_a_subject_total_is_greater_then_configured(
- PromotionSubjectInterface $subject
+ PromotionSubjectInterface $subject,
): void {
$subject->getPromotionSubjectTotal()->willReturn(600);
@@ -48,7 +48,7 @@ function it_recognizes_a_subject_as_eligible_if_a_subject_total_is_greater_then_
}
function it_recognizes_a_subject_as_eligible_if_a_subject_total_is_equal_with_configured(
- PromotionSubjectInterface $subject
+ PromotionSubjectInterface $subject,
): void {
$subject->getPromotionSubjectTotal()->willReturn(500);
diff --git a/src/Sylius/Component/Promotion/spec/Exception/FailedGenerationExceptionSpec.php b/src/Sylius/Component/Promotion/spec/Exception/FailedGenerationExceptionSpec.php
index 9ac86df1051..4815764e13d 100644
--- a/src/Sylius/Component/Promotion/spec/Exception/FailedGenerationExceptionSpec.php
+++ b/src/Sylius/Component/Promotion/spec/Exception/FailedGenerationExceptionSpec.php
@@ -20,7 +20,7 @@ final class FailedGenerationExceptionSpec extends ObjectBehavior
{
function let(
PromotionCouponGeneratorInstructionInterface $instruction,
- \InvalidArgumentException $previousException
+ \InvalidArgumentException $previousException,
): void {
$instruction->getAmount()->willReturn(17);
$instruction->getCodeLength()->willReturn(1);
diff --git a/src/Sylius/Component/Promotion/spec/Factory/PromotionCouponFactorySpec.php b/src/Sylius/Component/Promotion/spec/Factory/PromotionCouponFactorySpec.php
index 00c622a6282..3963a48da74 100644
--- a/src/Sylius/Component/Promotion/spec/Factory/PromotionCouponFactorySpec.php
+++ b/src/Sylius/Component/Promotion/spec/Factory/PromotionCouponFactorySpec.php
@@ -44,7 +44,7 @@ function it_creates_a_new_coupon(FactoryInterface $factory, PromotionCouponInter
}
function it_throws_an_invalid_argument_exception_when_promotion_is_not_coupon_based(
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$promotion->getName()->willReturn('Christmas sale');
$promotion->isCouponBased()->willReturn(false);
@@ -58,7 +58,7 @@ function it_throws_an_invalid_argument_exception_when_promotion_is_not_coupon_ba
function it_creates_a_coupon_and_assigns_a_promotion_to_id(
FactoryInterface $factory,
PromotionInterface $promotion,
- PromotionCouponInterface $coupon
+ PromotionCouponInterface $coupon,
): void {
$factory->createNew()->willReturn($coupon);
$promotion->getName()->willReturn('Christmas sale');
diff --git a/src/Sylius/Component/Promotion/spec/Generator/PercentageGenerationPolicySpec.php b/src/Sylius/Component/Promotion/spec/Generator/PercentageGenerationPolicySpec.php
index 14d302c5468..3bed790fc08 100644
--- a/src/Sylius/Component/Promotion/spec/Generator/PercentageGenerationPolicySpec.php
+++ b/src/Sylius/Component/Promotion/spec/Generator/PercentageGenerationPolicySpec.php
@@ -32,7 +32,7 @@ function it_implements_a_generator_validator_interface(): void
function it_examines_possibility_of_coupon_generation(
PromotionCouponGeneratorInstructionInterface $instruction,
- PromotionCouponRepositoryInterface $couponRepository
+ PromotionCouponRepositoryInterface $couponRepository,
): void {
$instruction->getAmount()->willReturn(17);
$instruction->getCodeLength()->willReturn(1);
@@ -45,7 +45,7 @@ function it_examines_possibility_of_coupon_generation(
function it_examines_possibility_of_coupon_generation_with_prefix_and_suffix(
PromotionCouponGeneratorInstructionInterface $instruction,
- PromotionCouponRepositoryInterface $couponRepository
+ PromotionCouponRepositoryInterface $couponRepository,
): void {
$instruction->getAmount()->willReturn(7);
$instruction->getCodeLength()->willReturn(1);
@@ -61,7 +61,7 @@ function it_examines_possibility_of_coupon_generation_with_prefix_and_suffix(
function it_returns_possible_generation_amount(
PromotionCouponGeneratorInstructionInterface $instruction,
- PromotionCouponRepositoryInterface $couponRepository
+ PromotionCouponRepositoryInterface $couponRepository,
): void {
$instruction->getAmount()->willReturn(17);
$instruction->getCodeLength()->willReturn(1);
@@ -74,7 +74,7 @@ function it_returns_possible_generation_amount(
function it_returns_php_int_max_value_as_possible_generation_amount_when_code_length_is_too_large(
PromotionCouponGeneratorInstructionInterface $instruction,
- PromotionCouponRepositoryInterface $couponRepository
+ PromotionCouponRepositoryInterface $couponRepository,
): void {
$instruction->getAmount()->willReturn(1000);
$instruction->getCodeLength()->willReturn(40);
@@ -87,7 +87,7 @@ function it_returns_php_int_max_value_as_possible_generation_amount_when_code_le
function it_returns_possible_generation_amount_with_prefix_and_suffix(
PromotionCouponGeneratorInstructionInterface $instruction,
- PromotionCouponRepositoryInterface $couponRepository
+ PromotionCouponRepositoryInterface $couponRepository,
): void {
$instruction->getAmount()->willReturn(3);
$instruction->getCodeLength()->willReturn(1);
@@ -102,7 +102,7 @@ function it_returns_possible_generation_amount_with_prefix_and_suffix(
}
function it_throws_an_invalid_argument_exception_when_expected_amount_is_null(
- PromotionCouponGeneratorInstructionInterface $instruction
+ PromotionCouponGeneratorInstructionInterface $instruction,
): void {
$instruction->getAmount()->willReturn(null);
$instruction->getCodeLength()->willReturn(1);
@@ -112,7 +112,7 @@ function it_throws_an_invalid_argument_exception_when_expected_amount_is_null(
}
function it_throws_an_invalid_argument_exception_when_expecte_code_length_is_null(
- PromotionCouponGeneratorInstructionInterface $instruction
+ PromotionCouponGeneratorInstructionInterface $instruction,
): void {
$instruction->getAmount()->willReturn(18);
$instruction->getCodeLength()->willReturn(null);
diff --git a/src/Sylius/Component/Promotion/spec/Generator/PromotionCouponGeneratorSpec.php b/src/Sylius/Component/Promotion/spec/Generator/PromotionCouponGeneratorSpec.php
index 77388efd229..d62cd5a69c7 100644
--- a/src/Sylius/Component/Promotion/spec/Generator/PromotionCouponGeneratorSpec.php
+++ b/src/Sylius/Component/Promotion/spec/Generator/PromotionCouponGeneratorSpec.php
@@ -31,13 +31,13 @@ function let(
FactoryInterface $promotionCouponFactory,
PromotionCouponRepositoryInterface $promotionCouponRepository,
ObjectManager $objectManager,
- GenerationPolicyInterface $generationPolicy
+ GenerationPolicyInterface $generationPolicy,
): void {
$this->beConstructedWith(
$promotionCouponFactory,
$promotionCouponRepository,
$objectManager,
- $generationPolicy
+ $generationPolicy,
);
}
@@ -53,7 +53,7 @@ function it_generates_coupons_according_to_an_instruction(
PromotionInterface $promotion,
PromotionCouponInterface $promotionCoupon,
PromotionCouponGeneratorInstructionInterface $instruction,
- GenerationPolicyInterface $generationPolicy
+ GenerationPolicyInterface $generationPolicy,
): void {
$instruction->getAmount()->willReturn(1);
$instruction->getUsageLimit()->willReturn(null);
@@ -83,7 +83,7 @@ function it_generates_coupons_with_prefix_and_suffix_according_to_an_instruction
PromotionInterface $promotion,
PromotionCouponInterface $promotionCoupon,
PromotionCouponGeneratorInstructionInterface $instruction,
- GenerationPolicyInterface $generationPolicy
+ GenerationPolicyInterface $generationPolicy,
): void {
$instruction->getAmount()->willReturn(1);
$instruction->getUsageLimit()->willReturn(null);
@@ -115,7 +115,7 @@ function it_generates_coupons_with_prefix_and_suffix_according_to_an_instruction
function it_throws_a_failed_generation_exception_when_generation_is_not_possible(
GenerationPolicyInterface $generationPolicy,
PromotionInterface $promotion,
- PromotionCouponGeneratorInstructionInterface $instruction
+ PromotionCouponGeneratorInstructionInterface $instruction,
): void {
$instruction->getAmount()->willReturn(16);
$instruction->getCodeLength()->willReturn(1);
@@ -131,7 +131,7 @@ function it_throws_an_invalid_argument_exception_when_code_length_is_not_between
FactoryInterface $promotionCouponFactory,
GenerationPolicyInterface $generationPolicy,
PromotionInterface $promotion,
- PromotionCouponGeneratorInstructionInterface $instruction
+ PromotionCouponGeneratorInstructionInterface $instruction,
): void {
$instruction->getAmount()->willReturn(16);
$instruction->getCodeLength()->willReturn(-1);
diff --git a/src/Sylius/Component/Promotion/spec/Processor/PromotionProcessorSpec.php b/src/Sylius/Component/Promotion/spec/Processor/PromotionProcessorSpec.php
index fe3a57da94f..4e346c51675 100644
--- a/src/Sylius/Component/Promotion/spec/Processor/PromotionProcessorSpec.php
+++ b/src/Sylius/Component/Promotion/spec/Processor/PromotionProcessorSpec.php
@@ -27,7 +27,7 @@ final class PromotionProcessorSpec extends ObjectBehavior
function let(
PreQualifiedPromotionsProviderInterface $preQualifiedPromotionsProvider,
PromotionEligibilityCheckerInterface $promotionEligibilityChecker,
- PromotionApplicatorInterface $promotionApplicator
+ PromotionApplicatorInterface $promotionApplicator,
): void {
$this->beConstructedWith($preQualifiedPromotionsProvider, $promotionEligibilityChecker, $promotionApplicator);
}
@@ -42,7 +42,7 @@ function it_does_not_apply_promotions_that_are_not_eligible(
PromotionEligibilityCheckerInterface $promotionEligibilityChecker,
PromotionApplicatorInterface $promotionApplicator,
PromotionSubjectInterface $subject,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$subject->getPromotions()->willReturn(new ArrayCollection([]));
$preQualifiedPromotionsProvider->getPromotions($subject)->willReturn([$promotion]);
@@ -61,7 +61,7 @@ function it_applies_promotions_that_are_eligible(
PromotionEligibilityCheckerInterface $promotionEligibilityChecker,
PromotionApplicatorInterface $promotionApplicator,
PromotionSubjectInterface $subject,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$subject->getPromotions()->willReturn(new ArrayCollection([]));
$preQualifiedPromotionsProvider->getPromotions($subject)->willReturn([$promotion]);
@@ -81,7 +81,7 @@ function it_applies_only_exclusive_promotion(
PromotionApplicatorInterface $promotionApplicator,
PromotionSubjectInterface $subject,
PromotionInterface $promotion,
- PromotionInterface $exclusivePromotion
+ PromotionInterface $exclusivePromotion,
): void {
$subject->getPromotions()->willReturn(new ArrayCollection([]));
$preQualifiedPromotionsProvider->getPromotions($subject)->willReturn([$promotion, $exclusivePromotion]);
@@ -104,7 +104,7 @@ function it_reverts_promotions_that_are_not_eligible_anymore(
PromotionEligibilityCheckerInterface $promotionEligibilityChecker,
PromotionApplicatorInterface $promotionApplicator,
PromotionSubjectInterface $subject,
- PromotionInterface $promotion
+ PromotionInterface $promotion,
): void {
$subject->getPromotions()->willReturn(new ArrayCollection([$promotion->getWrappedObject()]));
$preQualifiedPromotionsProvider->getPromotions($subject)->willReturn([$promotion]);
diff --git a/src/Sylius/Component/Promotion/spec/Provider/ActivePromotionsProviderSpec.php b/src/Sylius/Component/Promotion/spec/Provider/ActivePromotionsProviderSpec.php
index 749d5e5740c..acdcb25d667 100644
--- a/src/Sylius/Component/Promotion/spec/Provider/ActivePromotionsProviderSpec.php
+++ b/src/Sylius/Component/Promotion/spec/Provider/ActivePromotionsProviderSpec.php
@@ -35,7 +35,7 @@ function it_provides_active_promotions(
PromotionRepositoryInterface $promotionRepository,
PromotionInterface $promotion1,
PromotionInterface $promotion2,
- PromotionSubjectInterface $subject
+ PromotionSubjectInterface $subject,
): void {
$promotionRepository->findActive()->willReturn([$promotion1, $promotion2]);
diff --git a/src/Sylius/Component/Review/Model/Review.php b/src/Sylius/Component/Review/Model/Review.php
index 6bcb2973451..8f0c6d85483 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 d45cf673fa3..73e314ba877 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/Review/spec/Calculator/AverageRatingCalculatorSpec.php b/src/Sylius/Component/Review/spec/Calculator/AverageRatingCalculatorSpec.php
index 2e4bebd4c70..e530a515b7e 100644
--- a/src/Sylius/Component/Review/spec/Calculator/AverageRatingCalculatorSpec.php
+++ b/src/Sylius/Component/Review/spec/Calculator/AverageRatingCalculatorSpec.php
@@ -29,7 +29,7 @@ function it_implements_average_price_calculator_interface(): void
function it_calculates_average_price(
ReviewableInterface $reviewable,
ReviewInterface $review1,
- ReviewInterface $review2
+ ReviewInterface $review2,
): void {
$reviewable->getReviews()->willReturn(new ArrayCollection([$review1->getWrappedObject(), $review2->getWrappedObject()]));
@@ -51,7 +51,7 @@ function it_returns_zero_if_given_reviewable_object_has_no_reviews(ReviewableInt
function it_returns_zero_if_given_reviewable_object_has_reviews_but_none_of_them_is_accepted(
ReviewableInterface $reviewable,
- ReviewInterface $review
+ ReviewInterface $review,
): void {
$reviewable->getReviews()->willReturn(new ArrayCollection([$review->getWrappedObject()]));
$review->getStatus()->willReturn(ReviewInterface::STATUS_NEW);
diff --git a/src/Sylius/Component/Review/spec/Factory/ReviewFactorySpec.php b/src/Sylius/Component/Review/spec/Factory/ReviewFactorySpec.php
index f38f843979a..310598ca19f 100644
--- a/src/Sylius/Component/Review/spec/Factory/ReviewFactorySpec.php
+++ b/src/Sylius/Component/Review/spec/Factory/ReviewFactorySpec.php
@@ -47,7 +47,7 @@ function it_creates_a_new_review(FactoryInterface $factory, ReviewInterface $rev
function it_creates_a_review_with_subject(
FactoryInterface $factory,
ReviewableInterface $subject,
- ReviewInterface $review
+ ReviewInterface $review,
): void {
$factory->createNew()->willReturn($review);
$review->setReviewSubject($subject)->shouldBeCalled();
@@ -59,7 +59,7 @@ function it_creates_a_review_with_subject_and_reviewer(
FactoryInterface $factory,
ReviewableInterface $subject,
ReviewInterface $review,
- ReviewerInterface $reviewer
+ ReviewerInterface $reviewer,
): void {
$factory->createNew()->willReturn($review);
$review->setReviewSubject($subject)->shouldBeCalled();
diff --git a/src/Sylius/Component/Shipping/Model/Shipment.php b/src/Sylius/Component/Shipping/Model/Shipment.php
index 27efeca64b0..5d32f74ded5 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 ffb5f4cf823..21be5a6d46b 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 2cfb9f11dcf..4df09c4db07 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 8fcc12367d2..fb365a7ef04 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 d6717fcb5b8..c26ee68aa4d 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 9d0a3a3df89..83395751870 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/Shipping/Resolver/ShippingMethodsResolver.php b/src/Sylius/Component/Shipping/Resolver/ShippingMethodsResolver.php
index 99d4a929590..376eac774aa 100644
--- a/src/Sylius/Component/Shipping/Resolver/ShippingMethodsResolver.php
+++ b/src/Sylius/Component/Shipping/Resolver/ShippingMethodsResolver.php
@@ -25,7 +25,7 @@ final class ShippingMethodsResolver implements ShippingMethodsResolverInterface
public function __construct(
ObjectRepository $shippingMethodRepository,
- ShippingMethodEligibilityCheckerInterface $eligibilityChecker
+ ShippingMethodEligibilityCheckerInterface $eligibilityChecker,
) {
$this->shippingMethodRepository = $shippingMethodRepository;
$this->eligibilityChecker = $eligibilityChecker;
diff --git a/src/Sylius/Component/Shipping/spec/Calculator/DelegatingCalculatorSpec.php b/src/Sylius/Component/Shipping/spec/Calculator/DelegatingCalculatorSpec.php
index 902cc518a15..7c3067feab6 100644
--- a/src/Sylius/Component/Shipping/spec/Calculator/DelegatingCalculatorSpec.php
+++ b/src/Sylius/Component/Shipping/spec/Calculator/DelegatingCalculatorSpec.php
@@ -47,7 +47,7 @@ function it_should_delegate_calculation_to_a_calculator_defined_on_shipping_meth
ServiceRegistryInterface $registry,
ShipmentInterface $shipment,
ShippingMethodInterface $method,
- CalculatorInterface $calculator
+ CalculatorInterface $calculator,
): void {
$shipment->getMethod()->willReturn($method);
diff --git a/src/Sylius/Component/Shipping/spec/Calculator/PerUnitRateCalculatorSpec.php b/src/Sylius/Component/Shipping/spec/Calculator/PerUnitRateCalculatorSpec.php
index e908d9c9533..2eb7f712f69 100644
--- a/src/Sylius/Component/Shipping/spec/Calculator/PerUnitRateCalculatorSpec.php
+++ b/src/Sylius/Component/Shipping/spec/Calculator/PerUnitRateCalculatorSpec.php
@@ -30,7 +30,7 @@ function it_returns_per_unit_type(): void
}
function it_should_calculate_the_total_with_the_per_unit_amount_configured_on_the_method(
- ShipmentInterface $subject
+ ShipmentInterface $subject,
): void {
$subject->getShippingUnitCount()->willReturn(11);
diff --git a/src/Sylius/Component/Shipping/spec/Checker/Eligibility/CategoryRequirementEligibilityCheckerSpec.php b/src/Sylius/Component/Shipping/spec/Checker/Eligibility/CategoryRequirementEligibilityCheckerSpec.php
index 498656fe8b1..6a53e1faf15 100644
--- a/src/Sylius/Component/Shipping/spec/Checker/Eligibility/CategoryRequirementEligibilityCheckerSpec.php
+++ b/src/Sylius/Component/Shipping/spec/Checker/Eligibility/CategoryRequirementEligibilityCheckerSpec.php
@@ -33,18 +33,18 @@ function it_approves_category_requirement_if_categories_match(
ShippingMethodInterface $shippingMethod,
ShippingCategoryInterface $shippingCategory,
ShippingCategoryInterface $shippingCategory2,
- ShippableInterface $shippable
+ ShippableInterface $shippable,
): void {
$shippingMethod->getCategory()->willReturn($shippingCategory);
$shippingMethod->getCategoryRequirement()->willReturn(
ShippingMethodInterface::CATEGORY_REQUIREMENT_MATCH_ANY,
ShippingMethodInterface::CATEGORY_REQUIREMENT_MATCH_ALL,
- ShippingMethodInterface::CATEGORY_REQUIREMENT_MATCH_NONE
+ ShippingMethodInterface::CATEGORY_REQUIREMENT_MATCH_NONE,
);
$shippable->getShippingCategory()->willReturn(
$shippingCategory,
$shippingCategory,
- $shippingCategory2
+ $shippingCategory2,
); // first two times we will return the same shippingCategory. But we need different for the third test to pass
$subject->getShippables()->willReturn(new ArrayCollection([$shippable->getWrappedObject()]));
@@ -55,7 +55,7 @@ function it_approves_category_requirement_if_categories_match(
function it_approves_category_requirement_if_no_category_is_required(
ShippingSubjectInterface $subject,
- ShippingMethodInterface $shippingMethod
+ ShippingMethodInterface $shippingMethod,
): void {
$shippingMethod->getCategory()->willReturn(null);
@@ -67,17 +67,17 @@ function it_denies_category_requirement_if_categories_do_not_match(
ShippingMethodInterface $shippingMethod,
ShippingCategoryInterface $shippingCategory,
ShippingCategoryInterface $shippingCategory2,
- ShippableInterface $shippable
+ ShippableInterface $shippable,
): void {
$shippingMethod->getCategory()->willReturn(
$shippingCategory,
$shippingCategory,
- $shippingCategory2
+ $shippingCategory2,
);
$shippingMethod->getCategoryRequirement()->willReturn(
ShippingMethodInterface::CATEGORY_REQUIREMENT_MATCH_ANY,
ShippingMethodInterface::CATEGORY_REQUIREMENT_MATCH_ALL,
- ShippingMethodInterface::CATEGORY_REQUIREMENT_MATCH_NONE
+ ShippingMethodInterface::CATEGORY_REQUIREMENT_MATCH_NONE,
);
$shippable->getShippingCategory()->willReturn($shippingCategory2);
diff --git a/src/Sylius/Component/Shipping/spec/Checker/Eligibility/CompositeShippingMethodEligibilityCheckerSpec.php b/src/Sylius/Component/Shipping/spec/Checker/Eligibility/CompositeShippingMethodEligibilityCheckerSpec.php
index f8e2f885b98..8a1142d88f7 100644
--- a/src/Sylius/Component/Shipping/spec/Checker/Eligibility/CompositeShippingMethodEligibilityCheckerSpec.php
+++ b/src/Sylius/Component/Shipping/spec/Checker/Eligibility/CompositeShippingMethodEligibilityCheckerSpec.php
@@ -43,7 +43,7 @@ public function it_returns_true_if_all_eligibility_checker_returns_true(
ShippingMethodEligibilityCheckerInterface $firstShippingMethodEligibilityChecker,
ShippingMethodEligibilityCheckerInterface $secondShippingMethodEligibilityChecker,
ShippingSubjectInterface $promotionSubject,
- ShippingMethodInterface $promotion
+ ShippingMethodInterface $promotion,
): void {
$this->beConstructedWith([
$firstShippingMethodEligibilityChecker,
@@ -60,7 +60,7 @@ public function it_returns_false_if_any_eligibility_checker_returns_false(
ShippingMethodEligibilityCheckerInterface $firstShippingMethodEligibilityChecker,
ShippingMethodEligibilityCheckerInterface $secondShippingMethodEligibilityChecker,
ShippingSubjectInterface $promotionSubject,
- ShippingMethodInterface $promotion
+ ShippingMethodInterface $promotion,
): void {
$this->beConstructedWith([
$firstShippingMethodEligibilityChecker,
@@ -77,7 +77,7 @@ public function it_stops_checking_at_the_first_failing_eligibility_checker(
ShippingMethodEligibilityCheckerInterface $firstShippingMethodEligibilityChecker,
ShippingMethodEligibilityCheckerInterface $secondShippingMethodEligibilityChecker,
ShippingSubjectInterface $promotionSubject,
- ShippingMethodInterface $promotion
+ ShippingMethodInterface $promotion,
): void {
$this->beConstructedWith([
$firstShippingMethodEligibilityChecker,
diff --git a/src/Sylius/Component/Shipping/spec/Checker/Eligibility/ShippingMethodRulesEligibilityCheckerSpec.php b/src/Sylius/Component/Shipping/spec/Checker/Eligibility/ShippingMethodRulesEligibilityCheckerSpec.php
index c068a811409..4cf6ee6ff49 100644
--- a/src/Sylius/Component/Shipping/spec/Checker/Eligibility/ShippingMethodRulesEligibilityCheckerSpec.php
+++ b/src/Sylius/Component/Shipping/spec/Checker/Eligibility/ShippingMethodRulesEligibilityCheckerSpec.php
@@ -47,11 +47,11 @@ public function it_recognizes_a_subject_as_eligible_if_all_of_shipping_method_ru
ShippingMethodRuleInterface $firstRule,
ShippingMethodRuleInterface $secondRule,
ShippingSubjectInterface $subject,
- ShippingMethodInterface $shippingMethod
+ ShippingMethodInterface $shippingMethod,
): void {
$shippingMethod->hasRules()->willReturn(true);
$shippingMethod->getRules()->willReturn(
- new ArrayCollection([$firstRule->getWrappedObject(), $secondRule->getWrappedObject()])
+ new ArrayCollection([$firstRule->getWrappedObject(), $secondRule->getWrappedObject()]),
);
$firstRule->getType()->willReturn('first_rule');
@@ -76,11 +76,11 @@ public function it_recognizes_a_subject_as_not_eligible_if_any_of_shipping_metho
ShippingMethodRuleInterface $firstRule,
ShippingMethodRuleInterface $secondRule,
ShippingSubjectInterface $subject,
- ShippingMethodInterface $shippingMethod
+ ShippingMethodInterface $shippingMethod,
): void {
$shippingMethod->hasRules()->willReturn(true);
$shippingMethod->getRules()->willReturn(
- new ArrayCollection([$firstRule->getWrappedObject(), $secondRule->getWrappedObject()])
+ new ArrayCollection([$firstRule->getWrappedObject(), $secondRule->getWrappedObject()]),
);
$firstRule->getType()->willReturn('first_rule');
@@ -105,11 +105,11 @@ function it_does_not_check_more_rules_if_one_has_returned_false(
ShippingMethodRuleInterface $firstRule,
ShippingMethodRuleInterface $secondRule,
ShippingMethodInterface $shippingMethod,
- ShippingSubjectInterface $subject
+ ShippingSubjectInterface $subject,
): void {
$shippingMethod->hasRules()->willReturn(true);
$shippingMethod->getRules()->willReturn(
- new ArrayCollection([$firstRule->getWrappedObject(), $secondRule->getWrappedObject()])
+ new ArrayCollection([$firstRule->getWrappedObject(), $secondRule->getWrappedObject()]),
);
$firstRule->getType()->willReturn('first_rule');
diff --git a/src/Sylius/Component/Shipping/spec/Checker/ShippingMethodEligibilityCheckerSpec.php b/src/Sylius/Component/Shipping/spec/Checker/ShippingMethodEligibilityCheckerSpec.php
index c2257267af5..f5019847c1d 100644
--- a/src/Sylius/Component/Shipping/spec/Checker/ShippingMethodEligibilityCheckerSpec.php
+++ b/src/Sylius/Component/Shipping/spec/Checker/ShippingMethodEligibilityCheckerSpec.php
@@ -32,7 +32,7 @@ function it_approves_category_requirement_if_categories_match(
ShippingSubjectInterface $subject,
ShippingMethodInterface $shippingMethod,
ShippingCategoryInterface $shippingCategory,
- ShippableInterface $shippable
+ ShippableInterface $shippable,
): void {
$shippingMethod->getCategory()->willReturn($shippingCategory);
$shippingMethod->getCategoryRequirement()->willReturn(ShippingMethodInterface::CATEGORY_REQUIREMENT_MATCH_ANY);
@@ -45,7 +45,7 @@ function it_approves_category_requirement_if_categories_match(
function it_approves_category_requirement_if_no_category_is_required(
ShippingSubjectInterface $subject,
- ShippingMethodInterface $shippingMethod
+ ShippingMethodInterface $shippingMethod,
): void {
$shippingMethod->getCategory()->willReturn(null);
@@ -57,7 +57,7 @@ function it_denies_category_requirement_if_categories_do_not_match(
ShippingMethodInterface $shippingMethod,
ShippingCategoryInterface $shippingCategory,
ShippingCategoryInterface $shippingCategory2,
- ShippableInterface $shippable
+ ShippableInterface $shippable,
): void {
$shippingMethod->getCategory()->willReturn($shippingCategory);
$shippingMethod->getCategoryRequirement()->willReturn(ShippingMethodInterface::CATEGORY_REQUIREMENT_MATCH_ANY);
diff --git a/src/Sylius/Component/Shipping/spec/Resolver/CompositeMethodsResolverSpec.php b/src/Sylius/Component/Shipping/spec/Resolver/CompositeMethodsResolverSpec.php
index c2407a64042..0fbfe77dedf 100644
--- a/src/Sylius/Component/Shipping/spec/Resolver/CompositeMethodsResolverSpec.php
+++ b/src/Sylius/Component/Shipping/spec/Resolver/CompositeMethodsResolverSpec.php
@@ -36,7 +36,7 @@ function it_uses_registry_to_provide_shipping_methods_for_shipping_subject(
ShippingMethodsResolverInterface $secondMethodsResolver,
PrioritizedServiceRegistryInterface $resolversRegistry,
ShippingMethodInterface $shippingMethod,
- ShippingSubjectInterface $shippingSubject
+ ShippingSubjectInterface $shippingSubject,
): void {
$resolversRegistry->all()->willReturn([$firstMethodsResolver, $secondMethodsResolver]);
@@ -52,7 +52,7 @@ function it_returns_empty_array_if_none_of_registered_resolvers_support_passed_s
ShippingMethodsResolverInterface $firstMethodsResolver,
ShippingMethodsResolverInterface $secondMethodsResolver,
PrioritizedServiceRegistryInterface $resolversRegistry,
- ShippingSubjectInterface $shippingSubject
+ ShippingSubjectInterface $shippingSubject,
): void {
$resolversRegistry->all()->willReturn([$firstMethodsResolver, $secondMethodsResolver]);
@@ -66,7 +66,7 @@ function it_supports_subject_if_any_resolver_from_registry_supports_it(
ShippingMethodsResolverInterface $firstMethodsResolver,
ShippingMethodsResolverInterface $secondMethodsResolver,
PrioritizedServiceRegistryInterface $resolversRegistry,
- ShippingSubjectInterface $shippingSubject
+ ShippingSubjectInterface $shippingSubject,
): void {
$resolversRegistry->all()->willReturn([$firstMethodsResolver, $secondMethodsResolver]);
@@ -80,7 +80,7 @@ function it_does_not_support_subject_if_none_of_resolvers_from_registry_supports
ShippingMethodsResolverInterface $firstMethodsResolver,
ShippingMethodsResolverInterface $secondMethodsResolver,
PrioritizedServiceRegistryInterface $resolversRegistry,
- ShippingSubjectInterface $shippingSubject
+ ShippingSubjectInterface $shippingSubject,
): void {
$resolversRegistry->all()->willReturn([$firstMethodsResolver, $secondMethodsResolver]);
diff --git a/src/Sylius/Component/Shipping/spec/Resolver/DefaultShippingMethodResolverSpec.php b/src/Sylius/Component/Shipping/spec/Resolver/DefaultShippingMethodResolverSpec.php
index 49386d878ce..64e8a0f2beb 100644
--- a/src/Sylius/Component/Shipping/spec/Resolver/DefaultShippingMethodResolverSpec.php
+++ b/src/Sylius/Component/Shipping/spec/Resolver/DefaultShippingMethodResolverSpec.php
@@ -36,7 +36,7 @@ function it_returns_first_enabled_shipping_method_as_default(
ShippingMethodInterface $firstShippingMethod,
ShippingMethodInterface $secondShippingMethod,
ShippingMethodRepositoryInterface $shippingMethodRepository,
- ShipmentInterface $shipment
+ ShipmentInterface $shipment,
): void {
$shippingMethodRepository->findBy(['enabled' => true])->willReturn([$firstShippingMethod, $secondShippingMethod]);
@@ -45,7 +45,7 @@ function it_returns_first_enabled_shipping_method_as_default(
function it_throws_exception_if_there_is_no_enabled_shipping_methods(
ShippingMethodRepositoryInterface $shippingMethodRepository,
- ShipmentInterface $shipment
+ ShipmentInterface $shipment,
): void {
$shippingMethodRepository->findBy(['enabled' => true])->willReturn([]);
diff --git a/src/Sylius/Component/Shipping/spec/Resolver/ShippingMethodsResolverSpec.php b/src/Sylius/Component/Shipping/spec/Resolver/ShippingMethodsResolverSpec.php
index 708fcf703b0..ad135c87931 100644
--- a/src/Sylius/Component/Shipping/spec/Resolver/ShippingMethodsResolverSpec.php
+++ b/src/Sylius/Component/Shipping/spec/Resolver/ShippingMethodsResolverSpec.php
@@ -24,7 +24,7 @@ final class ShippingMethodsResolverSpec extends ObjectBehavior
{
function let(
ObjectRepository $methodRepository,
- ShippingMethodEligibilityCheckerInterface $eligibilityChecker
+ ShippingMethodEligibilityCheckerInterface $eligibilityChecker,
): void {
$this->beConstructedWith($methodRepository, $eligibilityChecker);
}
@@ -40,7 +40,7 @@ function it_returns_all_methods_eligible_for_given_subject(
ShippingSubjectInterface $subject,
ShippingMethodInterface $method1,
ShippingMethodInterface $method2,
- ShippingMethodInterface $method3
+ ShippingMethodInterface $method3,
): void {
$methods = [$method1, $method2, $method3];
$methodRepository->findBy(['enabled' => true])->shouldBeCalled()->willReturn($methods);
diff --git a/src/Sylius/Component/Taxation/Model/TaxCategory.php b/src/Sylius/Component/Taxation/Model/TaxCategory.php
index 4fe4e20d5f6..68a5ec32f22 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 580a0c2115c..4e251fed125 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/Taxation/spec/Calculator/DefaultCalculatorSpec.php b/src/Sylius/Component/Taxation/spec/Calculator/DefaultCalculatorSpec.php
index b8897af6642..9d3667c90fa 100644
--- a/src/Sylius/Component/Taxation/spec/Calculator/DefaultCalculatorSpec.php
+++ b/src/Sylius/Component/Taxation/spec/Calculator/DefaultCalculatorSpec.php
@@ -25,7 +25,7 @@ function it_implements_Sylius_tax_calculator_interface(): void
}
function it_calculates_tax_as_percentage_of_given_base_if_rate_is_not_included_in_price(
- TaxRateInterface $rate
+ TaxRateInterface $rate,
): void {
$rate->isIncludedInPrice()->willReturn(false);
$rate->getAmount()->willReturn(0.23);
@@ -36,7 +36,7 @@ function it_calculates_tax_as_percentage_of_given_base_if_rate_is_not_included_i
}
function it_calculates_correct_tax_for_given_base_if_rate_is_included_in_price(
- TaxRateInterface $rate
+ TaxRateInterface $rate,
): void {
$rate->isIncludedInPrice()->willReturn(true);
$rate->getAmount()->willReturn(0.23);
diff --git a/src/Sylius/Component/Taxation/spec/Calculator/DelegatingCalculatorSpec.php b/src/Sylius/Component/Taxation/spec/Calculator/DelegatingCalculatorSpec.php
index 2fe19a4b4fa..4652acd2249 100644
--- a/src/Sylius/Component/Taxation/spec/Calculator/DelegatingCalculatorSpec.php
+++ b/src/Sylius/Component/Taxation/spec/Calculator/DelegatingCalculatorSpec.php
@@ -34,7 +34,7 @@ function it_is_a_calculator(): void
function it_should_delegate_calculation_to_a_correct_calculator(
CalculatorInterface $calculator,
- TaxRateInterface $rate
+ TaxRateInterface $rate,
): void {
$rate->getCalculator()->willReturn('default');
diff --git a/src/Sylius/Component/Taxation/spec/Resolver/TaxRateResolverSpec.php b/src/Sylius/Component/Taxation/spec/Resolver/TaxRateResolverSpec.php
index 5b975c9527e..a52bc2e1a91 100644
--- a/src/Sylius/Component/Taxation/spec/Resolver/TaxRateResolverSpec.php
+++ b/src/Sylius/Component/Taxation/spec/Resolver/TaxRateResolverSpec.php
@@ -36,7 +36,7 @@ function it_returns_tax_rate_for_given_taxable_category(
$taxRateRepository,
TaxableInterface $taxable,
TaxCategoryInterface $taxCategory,
- TaxRateInterface $taxRate
+ TaxRateInterface $taxRate,
): void {
$taxable->getTaxCategory()->willReturn($taxCategory);
$taxRateRepository->findOneBy(['category' => $taxCategory])->shouldBeCalled()->willReturn($taxRate);
@@ -47,7 +47,7 @@ function it_returns_tax_rate_for_given_taxable_category(
function it_returns_null_if_tax_rate_for_given_taxable_category_does_not_exist(
$taxRateRepository,
TaxableInterface $taxable,
- TaxCategoryInterface $taxCategory
+ TaxCategoryInterface $taxCategory,
): void {
$taxable->getTaxCategory()->willReturn($taxCategory);
$taxRateRepository->findOneBy(['category' => $taxCategory])->shouldBeCalled()->willReturn(null);
@@ -56,7 +56,7 @@ function it_returns_null_if_tax_rate_for_given_taxable_category_does_not_exist(
}
function it_returns_null_if_taxable_does_not_belong_to_any_category(
- TaxableInterface $taxable
+ TaxableInterface $taxable,
): void {
$taxable->getTaxCategory()->willReturn(null);
diff --git a/src/Sylius/Component/Taxonomy/Model/Taxon.php b/src/Sylius/Component/Taxonomy/Model/Taxon.php
index 8f960b7a7f2..aa8654419ef 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()
@@ -174,7 +160,7 @@ public function getEnabledChildren(): Collection
return $this->children->filter(
function (TaxonInterface $childTaxon) {
return $childTaxon->isEnabled();
- }
+ },
);
}
@@ -198,7 +184,7 @@ public function getFullname(string $pathDelimiter = ' / '): ?string
'%s%s%s',
$this->getParent()->getFullname($pathDelimiter),
$pathDelimiter,
- $this->getName()
+ $this->getName(),
);
}
diff --git a/src/Sylius/Component/Taxonomy/Model/TaxonTranslation.php b/src/Sylius/Component/Taxonomy/Model/TaxonTranslation.php
index d1995696c94..929c1bc09ee 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/Taxonomy/spec/Factory/TaxonFactorySpec.php b/src/Sylius/Component/Taxonomy/spec/Factory/TaxonFactorySpec.php
index 6cdbabb3105..540121794ef 100644
--- a/src/Sylius/Component/Taxonomy/spec/Factory/TaxonFactorySpec.php
+++ b/src/Sylius/Component/Taxonomy/spec/Factory/TaxonFactorySpec.php
@@ -32,7 +32,7 @@ function it_implements_taxon_factory_interface(): void
function it_uses_decorated_factory_to_create_new_taxon(
FactoryInterface $factory,
- TaxonInterface $taxon
+ TaxonInterface $taxon,
): void {
$factory->createNew()->willReturn($taxon);
@@ -42,7 +42,7 @@ function it_uses_decorated_factory_to_create_new_taxon(
function it_creates_taxon_for_given_parent_taxon(
FactoryInterface $factory,
TaxonInterface $parent,
- TaxonInterface $taxon
+ TaxonInterface $taxon,
): void {
$factory->createNew()->willReturn($taxon);
$taxon->setParent($parent)->shouldBeCalled();
diff --git a/src/Sylius/Component/Taxonomy/spec/Generator/TaxonSlugGeneratorSpec.php b/src/Sylius/Component/Taxonomy/spec/Generator/TaxonSlugGeneratorSpec.php
index bf42afbbeb2..19feff0968e 100644
--- a/src/Sylius/Component/Taxonomy/spec/Generator/TaxonSlugGeneratorSpec.php
+++ b/src/Sylius/Component/Taxonomy/spec/Generator/TaxonSlugGeneratorSpec.php
@@ -27,7 +27,7 @@ function it_implements_taxon_slug_generator_interface(): void
function it_generates_slug_for_root_taxon(
TaxonInterface $taxon,
- TaxonTranslationInterface $taxonTranslation
+ TaxonTranslationInterface $taxonTranslation,
): void {
$taxon->getTranslation('pl_PL')->willReturn($taxonTranslation);
$taxonTranslation->getName()->willReturn('Board games');
@@ -39,7 +39,7 @@ function it_generates_slug_for_root_taxon(
function it_generates_slug_for_root_taxon_replacing_apostrophes_with_hyphens(
TaxonInterface $taxon,
- TaxonTranslationInterface $taxonTranslation
+ TaxonTranslationInterface $taxonTranslation,
): void {
$taxon->getTranslation('pl_PL')->willReturn($taxonTranslation);
$taxonTranslation->getName()->willReturn('Rock\'n\'roll');
@@ -53,7 +53,7 @@ function it_generates_slug_for_child_taxon_when_parent_taxon_already_has_slug(
TaxonInterface $taxon,
TaxonTranslationInterface $taxonTranslation,
TaxonInterface $parentTaxon,
- TaxonTranslationInterface $parentTaxonTranslation
+ TaxonTranslationInterface $parentTaxonTranslation,
): void {
$taxon->getTranslation('pl_PL')->willReturn($taxonTranslation);
$taxonTranslation->getName()->willReturn('Battle games');
@@ -70,7 +70,7 @@ function it_generates_slug_for_child_taxon_even_when_parent_taxon_does_not_have_
TaxonInterface $taxon,
TaxonTranslationInterface $taxonTranslation,
TaxonInterface $parentTaxon,
- TaxonTranslationInterface $parentTaxonTranslation
+ TaxonTranslationInterface $parentTaxonTranslation,
): void {
$taxon->getTranslation('pl_PL')->willReturn($taxonTranslation);
$taxonTranslation->getName()->willReturn('Battle games');
@@ -88,7 +88,7 @@ function it_generates_slug_for_child_taxon_even_when_parent_taxon_does_not_have_
function it_throws_an_exception_if_passed_taxon_has_no_name(
TaxonInterface $taxon,
- TaxonTranslationInterface $taxonTranslation
+ TaxonTranslationInterface $taxonTranslation,
): void {
$taxon->getTranslation('pl_PL')->willReturn($taxonTranslation);
$taxonTranslation->getName()->willReturn('');
diff --git a/src/Sylius/Component/Taxonomy/spec/Model/TaxonSpec.php b/src/Sylius/Component/Taxonomy/spec/Model/TaxonSpec.php
index ab9f4f76a4e..9d30dfc1685 100644
--- a/src/Sylius/Component/Taxonomy/spec/Model/TaxonSpec.php
+++ b/src/Sylius/Component/Taxonomy/spec/Model/TaxonSpec.php
@@ -77,7 +77,7 @@ function it_is_root_when_has_no_parent(TaxonInterface $taxon): void
function it_returns_a_list_of_ancestors(
TaxonInterface $categoryTaxon,
- TaxonInterface $tshirtsTaxon
+ TaxonInterface $tshirtsTaxon,
): void {
$tshirtsTaxon->getParent()->willReturn($categoryTaxon);
@@ -220,7 +220,7 @@ function it_has_children_when_you_have_added_child(TaxonInterface $taxon): void
function it_returns_enabled_children(
TaxonInterface $enabledChildTaxon,
- TaxonInterface $disabledChildTaxon
+ TaxonInterface $disabledChildTaxon,
): void {
$enabledChildTaxon->isEnabled()->willReturn(true);
$enabledChildTaxon->getParent()->willReturn(null);
diff --git a/src/Sylius/Component/User/Model/User.php b/src/Sylius/Component/User/Model/User.php
index 96c0d58fc1b..34483e07720 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 2cd79b63933..cfe89e2063f 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/src/Sylius/Component/User/Security/Generator/UniquePinGenerator.php b/src/Sylius/Component/User/Security/Generator/UniquePinGenerator.php
index 8e9f62b12fa..d3aa0fc6ffe 100644
--- a/src/Sylius/Component/User/Security/Generator/UniquePinGenerator.php
+++ b/src/Sylius/Component/User/Security/Generator/UniquePinGenerator.php
@@ -31,7 +31,7 @@ final class UniquePinGenerator implements GeneratorInterface
public function __construct(
RandomnessGeneratorInterface $generator,
UniquenessCheckerInterface $uniquenessChecker,
- int $pinLength
+ int $pinLength,
) {
Assert::greaterThanEq($pinLength, 1, 'The value of token length has to be at least 1.');
diff --git a/src/Sylius/Component/User/Security/Generator/UniqueTokenGenerator.php b/src/Sylius/Component/User/Security/Generator/UniqueTokenGenerator.php
index e2f5121c077..60510ff0d84 100644
--- a/src/Sylius/Component/User/Security/Generator/UniqueTokenGenerator.php
+++ b/src/Sylius/Component/User/Security/Generator/UniqueTokenGenerator.php
@@ -31,7 +31,7 @@ final class UniqueTokenGenerator implements GeneratorInterface
public function __construct(
RandomnessGeneratorInterface $generator,
UniquenessCheckerInterface $uniquenessChecker,
- int $tokenLength
+ int $tokenLength,
) {
Assert::greaterThanEq($tokenLength, 1, 'The value of token length has to be at least 1.');
diff --git a/src/Sylius/Component/User/Security/UserPbkdf2PasswordEncoder.php b/src/Sylius/Component/User/Security/UserPbkdf2PasswordEncoder.php
index 13447bad673..96fcde34642 100644
--- a/src/Sylius/Component/User/Security/UserPbkdf2PasswordEncoder.php
+++ b/src/Sylius/Component/User/Security/UserPbkdf2PasswordEncoder.php
@@ -44,7 +44,7 @@ public function __construct(
?string $algorithm = null,
?bool $encodeHashAsBase64 = null,
?int $iterations = null,
- ?int $length = null
+ ?int $length = null,
) {
$this->algorithm = $algorithm ?? 'sha512';
$this->encodeHashAsBase64 = $encodeHashAsBase64 ?? true;
@@ -69,7 +69,7 @@ private function encodePassword(string $plainPassword, string $salt): string
Assert::lessThanEq(
strlen($plainPassword),
self::MAX_PASSWORD_LENGTH,
- sprintf('The password must be at most %d characters long.', self::MAX_PASSWORD_LENGTH)
+ sprintf('The password must be at most %d characters long.', self::MAX_PASSWORD_LENGTH),
);
if (!in_array($this->algorithm, hash_algos(), true)) {
diff --git a/src/Sylius/Component/User/spec/Security/Generator/UniquePinGeneratorSpec.php b/src/Sylius/Component/User/spec/Security/Generator/UniquePinGeneratorSpec.php
index 45694540c94..e6b85157073 100644
--- a/src/Sylius/Component/User/spec/Security/Generator/UniquePinGeneratorSpec.php
+++ b/src/Sylius/Component/User/spec/Security/Generator/UniquePinGeneratorSpec.php
@@ -32,7 +32,7 @@ function it_implements_generator_interface(): void
function it_throws_invalid_argument_exception_on_instantiation_with_an_out_of_range_length(
RandomnessGeneratorInterface $generator,
- UniquenessCheckerInterface $checker
+ UniquenessCheckerInterface $checker,
): void {
$this->beConstructedWith($generator, $checker, -1);
$this->shouldThrow(\InvalidArgumentException::class)->duringInstantiation();
@@ -42,7 +42,7 @@ function it_throws_invalid_argument_exception_on_instantiation_with_an_out_of_ra
function it_generates_pins_with_length_stated_on_instantiation(
RandomnessGeneratorInterface $generator,
- UniquenessCheckerInterface $checker
+ UniquenessCheckerInterface $checker,
): void {
$pin = '001100';
diff --git a/src/Sylius/Component/User/spec/Security/Generator/UniqueTokenGeneratorSpec.php b/src/Sylius/Component/User/spec/Security/Generator/UniqueTokenGeneratorSpec.php
index e63823b6306..062eeadffdc 100644
--- a/src/Sylius/Component/User/spec/Security/Generator/UniqueTokenGeneratorSpec.php
+++ b/src/Sylius/Component/User/spec/Security/Generator/UniqueTokenGeneratorSpec.php
@@ -32,7 +32,7 @@ function it_implements_generator_interface(): void
function it_throws_invalid_argument_exception_on_instantiation_with_an_out_of_range_length(
RandomnessGeneratorInterface $generator,
- UniquenessCheckerInterface $checker
+ UniquenessCheckerInterface $checker,
): void {
$this->beConstructedWith($generator, $checker, -1);
$this->shouldThrow(\InvalidArgumentException::class)->duringInstantiation();
@@ -42,7 +42,7 @@ function it_throws_invalid_argument_exception_on_instantiation_with_an_out_of_ra
function it_generates_tokens_with_length_stated_on_instantiation(
RandomnessGeneratorInterface $generator,
- UniquenessCheckerInterface $checker
+ UniquenessCheckerInterface $checker,
): void {
$token = 'vanquishable';