[CS][DX] Refactor (#17135)

This PR has been generated automatically.
For more details see
[refactor.yaml](/Sylius/Sylius/blob/1.12/.github/workflows/refactor.yaml).
This commit is contained in:
Michał Pysiak 2024-10-08 06:18:31 +02:00 committed by GitHub
commit ced0f8d8ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 20 additions and 10 deletions

View file

@ -121,6 +121,7 @@ final readonly class ManagingOrdersContext implements Context
$this->client->addRequestData('tracking', $trackingCode);
$this->client->update();
}
/**
* @When /^I try to view the summary of the (customer's latest cart)$/
*/

View file

@ -345,9 +345,9 @@ final class CheckoutContext implements Context
/**
* @Given I confirmed my order
* @Given the customer confirmed the order
* @When I confirm my order
* @When /^the (?:visitor|customer) confirm his order$/
* @Given the customer confirmed the order
*/
public function iConfirmMyOrder(): void
{

View file

@ -890,7 +890,6 @@ final readonly class OrderContext implements Context
/** @var OrderInterface $order */
$order = $this->orderFactory->createNew();
$customer->getUser() === null
? $order->setCustomer($customer)
: $order->setCustomerWithAuthorization($customer)

View file

@ -32,8 +32,8 @@ final readonly class ShopSecurityContext implements Context
/**
* @Given I am logged in as :email
* @When I log in as :email
* @Given the customer logged in as :email
* @When I log in as :email
*/
public function iAmLoggedInAs(string $email): void
{

View file

@ -868,7 +868,8 @@ final readonly class ManagingOrdersContext implements Context
/**
* @Then I should see this customer's IP address
*/
public function iShouldSeeCustomersIpAddress(): void {
public function iShouldSeeCustomersIpAddress(): void
{
Assert::notEmpty($this->showPage->getIpAddressAssigned());
}

View file

@ -78,9 +78,9 @@ final readonly class CheckoutCompleteContext implements Context
* @Given I have confirmed order
* @Given the visitor confirm his order
* @Given the customer confirm his order
* @Given the customer confirmed the order
* @When I confirm my order
* @When I try to confirm my order
* @Given the customer confirmed the order
*/
public function iConfirmMyOrder(): void
{

View file

@ -25,7 +25,7 @@ final class ApiLoaderTest extends TestCase
{
use ProphecyTrait;
private ObjectProphecy|LoaderInterface $baseApiLoader;
private LoaderInterface|ObjectProphecy $baseApiLoader;
private LoaderInterface $apiLoader;
@ -49,7 +49,7 @@ final class ApiLoaderTest extends TestCase
}
/** @test */
function it_removes_routes_from_route_collection_loaded_by_base_api_loader(): void
public function it_removes_routes_from_route_collection_loaded_by_base_api_loader(): void
{
$routeCollection = $this->prophesize(RouteCollection::class);
@ -66,7 +66,7 @@ final class ApiLoaderTest extends TestCase
}
/** @test */
function it_uses_base_api_loader_for_supports_method(): void
public function it_uses_base_api_loader_for_supports_method(): void
{
$this->baseApiLoader->supports('.', 'api_platform')->willReturn(true);
@ -74,7 +74,7 @@ final class ApiLoaderTest extends TestCase
}
/** @test */
function it_uses_base_api_loader_to_get_resolver(): void
public function it_uses_base_api_loader_to_get_resolver(): void
{
$loaderResolver = $this->prophesize(LoaderResolverInterface::class);
@ -84,7 +84,7 @@ final class ApiLoaderTest extends TestCase
}
/** @test */
function it_uses_base_api_loader_to_set_resolver(): void
public function it_uses_base_api_loader_to_set_resolver(): void
{
$loaderResolver = $this->prophesize(LoaderResolverInterface::class);

View file

@ -1,5 +1,14 @@
<?php
/*
* This file is part of the Sylius package.
*
* (c) Sylius Sp. z o.o.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Sylius\Bundle\ShopBundle\Form\Extension;