Skip to content

Commit

Permalink
cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
JoMessina committed Nov 20, 2023
1 parent 0492d94 commit bb64f43
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 16 deletions.
3 changes: 1 addition & 2 deletions src/Builder/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Kiboko\Plugin\Sylius\Validator\ApiType;
use PhpParser\Builder;
use PhpParser\Node;
use UnhandledMatchError;

final class Client implements Builder
{
Expand Down Expand Up @@ -138,7 +137,7 @@ private function getClientBuilderNode(): Node\Expr\MethodCall
ApiType::ADMIN->value => SyliusAdminClientBuilder::class,
ApiType::SHOP->value => SyliusShopClientBuilder::class,
ApiType::LEGACY->value => 'Diglin\\Sylius\\ApiClient\\SyliusClientBuilder',
default => throw new UnhandledMatchError($this->apiType)
default => throw new \UnhandledMatchError($this->apiType)
};

return new Node\Expr\MethodCall(
Expand Down
3 changes: 1 addition & 2 deletions src/Builder/Extractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Kiboko\Contract\Configurator\StepBuilderInterface;
use PhpParser\Builder;
use PhpParser\Node;
use UnhandledMatchError;

final class Extractor implements StepBuilderInterface
{
Expand Down Expand Up @@ -136,7 +135,7 @@ public function getParamsNode(): array
Client::API_ADMIN_KEY => \Diglin\Sylius\ApiClient\SyliusAdminClientInterface::class,
Client::API_LEGACY_KEY => \Diglin\Sylius\ApiClient\SyliusLegacyClientInterface::class,
Client::API_SHOP_KEY => \Diglin\Sylius\ApiClient\SyliusShopClientInterface::class,
default => throw new UnhandledMatchError($this->apiType)
default => throw new \UnhandledMatchError($this->apiType)
};

return [
Expand Down
3 changes: 1 addition & 2 deletions src/Builder/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Kiboko\Contract\Configurator\StepBuilderInterface;
use PhpParser\Builder;
use PhpParser\Node;
use UnhandledMatchError;

final class Loader implements StepBuilderInterface
{
Expand Down Expand Up @@ -142,7 +141,7 @@ public function getParamsNode(): array
Client::API_ADMIN_KEY => \Diglin\Sylius\ApiClient\SyliusAdminClientInterface::class,
Client::API_LEGACY_KEY => \Diglin\Sylius\ApiClient\SyliusLegacyClientInterface::class,
Client::API_SHOP_KEY => \Diglin\Sylius\ApiClient\SyliusShopClientInterface::class,
default => throw new UnhandledMatchError($this->apiType)
default => throw new \UnhandledMatchError($this->apiType)
};

return [
Expand Down
3 changes: 1 addition & 2 deletions src/Capacity/Create.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Kiboko\Plugin\Sylius;
use PhpParser\Builder;
use PhpParser\Node;
use UnhandledMatchError;

final class Create implements CapacityInterface
{
Expand Down Expand Up @@ -86,7 +85,7 @@ public function applies(array $config): bool
'admin' => self::$endpointsAdmin,
'shop' => self::$endpointsShop,
'legacy' => self::$endpointsLegacy,
default => throw new UnhandledMatchError($config['api_type'])
default => throw new \UnhandledMatchError($config['api_type'])
};

return isset($config['type'])
Expand Down
3 changes: 1 addition & 2 deletions src/Capacity/Upsert.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Kiboko\Plugin\Sylius;
use PhpParser\Builder;
use PhpParser\Node;
use UnhandledMatchError;

final class Upsert implements CapacityInterface
{
Expand Down Expand Up @@ -78,7 +77,7 @@ public function applies(array $config): bool
'admin' => self::$endpointsAdmin,
'shop' => self::$endpointsShop,
'legacy' => self::$endpointsLegacy,
default => throw new UnhandledMatchError($config['api_type'])
default => throw new \UnhandledMatchError($config['api_type'])
};

return isset($config['type'])
Expand Down
5 changes: 2 additions & 3 deletions src/Validator/ExtractorConfigurationValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace Kiboko\Plugin\Sylius\Validator;

use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
use UnhandledMatchError;

class ExtractorConfigurationValidator implements ConfigurationValidatorInterface
{
Expand Down Expand Up @@ -468,7 +467,7 @@ public static function getEndpointsApiType(): array
ApiType::ADMIN->value => self::$endpointsAdmin,
ApiType::SHOP->value => self::$endpointsShop,
ApiType::LEGACY->value => self::$endpointsLegacy,
default => throw new UnhandledMatchError(self::$currentApiType)
default => throw new \UnhandledMatchError(self::$currentApiType)
};
}

Expand All @@ -478,7 +477,7 @@ public static function getDoubleEndpointsApiType(): array
ApiType::ADMIN->value => self::$doubleEndpointsAdmin,
ApiType::SHOP->value => self::$doubleEndpointsShop,
ApiType::LEGACY->value => self::$doubleEndpointsLegacy,
default => throw new UnhandledMatchError(self::$currentApiType)
default => throw new \UnhandledMatchError(self::$currentApiType)
};
}
public static string $currentApiType;
Expand Down
4 changes: 1 addition & 3 deletions src/Validator/LoaderConfigurationValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace Kiboko\Plugin\Sylius\Validator;

use UnhandledMatchError;

class LoaderConfigurationValidator implements ConfigurationValidatorInterface
{
private static array $endpointsLegacy = [
Expand Down Expand Up @@ -263,7 +261,7 @@ public static function getEndpointsApiType(): array
ApiType::ADMIN->value => self::$endpointsAdmin,
ApiType::SHOP->value => self::$endpointsShop,
ApiType::LEGACY->value => self::$endpointsLegacy,
default => throw new UnhandledMatchError(self::$currentApiType),
default => throw new \UnhandledMatchError(self::$currentApiType),
};
}

Expand Down

0 comments on commit bb64f43

Please sign in to comment.