From c718f95cbb9f1e9e6f6364ad6a0eb42b250f0e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fr=C3=A9mont?= Date: Fri, 10 Nov 2023 11:51:22 +0100 Subject: [PATCH] Fix PHpstan errors and fix dezerialize provider namespace --- phpstan.neon | 1 + src/Component/Tests/State/Provider/DeserializeProviderTest.php | 2 +- src/Component/src/State/Provider/DeserializeProvider.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index dbbdfe668..bb2c7bcb8 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -77,6 +77,7 @@ parameters: - '/Method Sylius\\Component\\Resource\\Model\\TimestampableInterface\:\:setCreatedAt\(\) has no return type specified\./' - '/Method Sylius\\Component\\Resource\\Model\\TimestampableInterface\:\:setUpdatedAt\(\) has no return type specified\./' - '/Method Sylius\\Component\\Resource\\Repository\\InMemoryRepository\:\:findAll\(\) should return array\ but returns array\./' + - '/Method Sylius\\Resource\\State\\Provider\\DeserializeProvider\:\:provide\(\) should return array\|object\|null but returns mixed./' - '/Method Sylius\\Resource\\Symfony\\EventDispatcher\\GenericEvent\:\:stop\(\) has no return type specified./' - '/Method Sylius\\Bundle\\ResourceBundle\\Form\\Extension\\HttpFoundation\\HttpFoundationRequestHandler::handleRequest\(\) has no return type specified./' - '/Method Sylius\\Bundle\\ResourceBundle\\Grid\\Controller\\ResourcesResolver::getResources\(\) has no return type specified./' diff --git a/src/Component/Tests/State/Provider/DeserializeProviderTest.php b/src/Component/Tests/State/Provider/DeserializeProviderTest.php index 5462b0670..b91ce68f6 100644 --- a/src/Component/Tests/State/Provider/DeserializeProviderTest.php +++ b/src/Component/Tests/State/Provider/DeserializeProviderTest.php @@ -16,12 +16,12 @@ use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ObjectProphecy; -use Sylius\Component\Resource\src\State\Provider\DeserializeProvider; use Sylius\Resource\Context\Context; use Sylius\Resource\Context\Option\RequestOption; use Sylius\Resource\Metadata\Delete; use Sylius\Resource\Metadata\HttpOperation; use Sylius\Resource\Metadata\ResourceMetadata; +use Sylius\Resource\State\Provider\DeserializeProvider; use Sylius\Resource\State\ProviderInterface; use Symfony\Component\HttpFoundation\ParameterBag; use Symfony\Component\HttpFoundation\Request; diff --git a/src/Component/src/State/Provider/DeserializeProvider.php b/src/Component/src/State/Provider/DeserializeProvider.php index fa1ff32a3..865787d74 100644 --- a/src/Component/src/State/Provider/DeserializeProvider.php +++ b/src/Component/src/State/Provider/DeserializeProvider.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Sylius\Component\Resource\src\State\Provider; +namespace Sylius\Resource\State\Provider; use Sylius\Resource\Context\Context; use Sylius\Resource\Context\Option\RequestOption;