diff --git a/.github/workflows/quality.yaml b/.github/workflows/quality.yaml index 81e014bd..75470482 100644 --- a/.github/workflows/quality.yaml +++ b/.github/workflows/quality.yaml @@ -14,7 +14,7 @@ jobs: run: | wget -q https://cs.symfony.com/download/php-cs-fixer-v3.phar -O php-cs-fixer chmod a+x php-cs-fixer - PHP_CS_FIXER_IGNORE_ENV=true ./php-cs-fixer fix src --dry-run + ./php-cs-fixer fix src --dry-run phpstan: runs-on: ubuntu-latest diff --git a/src/Action/Custom/Factory/Action.php b/src/Action/Custom/Factory/Action.php index 29279a9c..eb70c1ec 100644 --- a/src/Action/Custom/Factory/Action.php +++ b/src/Action/Custom/Factory/Action.php @@ -44,7 +44,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -55,7 +55,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Action/Custom/Factory/Repository/RepositoryTrait.php b/src/Action/Custom/Factory/Repository/RepositoryTrait.php index 200ef6c0..447d6fa4 100644 --- a/src/Action/Custom/Factory/Repository/RepositoryTrait.php +++ b/src/Action/Custom/Factory/Repository/RepositoryTrait.php @@ -14,7 +14,7 @@ trait RepositoryTrait /** @var string[] */ private array $packages; - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface { array_push($this->files, ...$files); diff --git a/src/Action/Custom/Service.php b/src/Action/Custom/Service.php index be6c7550..4bd351ca 100644 --- a/src/Action/Custom/Service.php +++ b/src/Action/Custom/Service.php @@ -43,7 +43,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -54,7 +54,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Action/SFTP/Factory/Action.php b/src/Action/SFTP/Factory/Action.php index 03a51221..968853a7 100644 --- a/src/Action/SFTP/Factory/Action.php +++ b/src/Action/SFTP/Factory/Action.php @@ -39,7 +39,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -50,7 +50,7 @@ public function validate(array $config): bool $this->normalize($config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } @@ -68,7 +68,7 @@ public function compile(array $config): Repository try { return new Repository($builder); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException(message: $exception->getMessage(), previous: $exception); } } diff --git a/src/Action/SFTP/Factory/Repository/Repository.php b/src/Action/SFTP/Factory/Repository/Repository.php index 278c67dd..30614486 100644 --- a/src/Action/SFTP/Factory/Repository/Repository.php +++ b/src/Action/SFTP/Factory/Repository/Repository.php @@ -12,7 +12,7 @@ { public function __construct(private Builder\Action $builder) {} - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { return $this; } diff --git a/src/Action/SFTP/Service.php b/src/Action/SFTP/Service.php index 9255277d..53385fa1 100644 --- a/src/Action/SFTP/Service.php +++ b/src/Action/SFTP/Service.php @@ -45,7 +45,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -56,7 +56,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Adapter/Docker/Satellite.php b/src/Adapter/Docker/Satellite.php index e5742f2a..fd34801a 100644 --- a/src/Adapter/Docker/Satellite.php +++ b/src/Adapter/Docker/Satellite.php @@ -22,7 +22,7 @@ final class Satellite implements Configurator\SatelliteInterface public function __construct( private readonly Dockerfile\Dockerfile $dockerfile, private readonly string $workdir, - Packaging\FileInterface|Packaging\DirectoryInterface ...$files + Packaging\DirectoryInterface|Packaging\FileInterface ...$files ) { $this->files = $files; } @@ -34,7 +34,7 @@ public function addTags(string ...$imageTags): self return $this; } - public function withFile(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function withFile(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { array_push($this->files, ...$files); diff --git a/src/Adapter/Docker/SatelliteBuilder.php b/src/Adapter/Docker/SatelliteBuilder.php index a5b71496..1ad2594c 100644 --- a/src/Adapter/Docker/SatelliteBuilder.php +++ b/src/Adapter/Docker/SatelliteBuilder.php @@ -23,8 +23,8 @@ final class SatelliteBuilder implements Configurator\SatelliteBuilderInterface private iterable $command = []; /** @var iterable */ private iterable $tags = []; - private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile = null; - private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null; + private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile = null; + private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null; /** @var iterable> */ private iterable $paths = []; /** @var \AppendIterator> */ @@ -66,8 +66,8 @@ public function withComposerRequire(string ...$package): self } public function withComposerFile( - PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile, - PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null + PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile, + PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null ): self { $this->composerJsonFile = $composerJsonFile; $this->composerLockFile = $composerLockFile; @@ -76,7 +76,7 @@ public function withComposerFile( } public function withFile( - PackagingContract\FileInterface|PackagingContract\AssetInterface $source, + PackagingContract\AssetInterface|PackagingContract\FileInterface $source, string $destinationPath = null ): self { if (!$source instanceof PackagingContract\FileInterface) { diff --git a/src/Adapter/Filesystem/Satellite.php b/src/Adapter/Filesystem/Satellite.php index 092aaadb..d8edbc01 100644 --- a/src/Adapter/Filesystem/Satellite.php +++ b/src/Adapter/Filesystem/Satellite.php @@ -18,12 +18,12 @@ final class Satellite implements Configurator\SatelliteInterface public function __construct( private readonly string $workdir, private readonly Composer $composer, - Packaging\FileInterface|Packaging\DirectoryInterface ...$files + Packaging\DirectoryInterface|Packaging\FileInterface ...$files ) { $this->files = $files; } - public function withFile(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function withFile(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { array_push($this->files, ...$files); diff --git a/src/Adapter/Filesystem/SatelliteBuilder.php b/src/Adapter/Filesystem/SatelliteBuilder.php index a7ce0409..1a400c38 100644 --- a/src/Adapter/Filesystem/SatelliteBuilder.php +++ b/src/Adapter/Filesystem/SatelliteBuilder.php @@ -20,8 +20,8 @@ final class SatelliteBuilder implements Configurator\SatelliteBuilderInterface ]; private array $authenticationTokens = []; private array $repositories = []; - private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile = null; - private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null; + private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile = null; + private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null; /** @var iterable> */ private iterable $paths = []; /** @var \AppendIterator> */ @@ -54,8 +54,8 @@ public function withComposerRequire(string ...$package): self } public function withComposerFile( - PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile, - PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null + PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile, + PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null ): self { $this->composerJsonFile = $composerJsonFile; $this->composerLockFile = $composerLockFile; @@ -64,7 +64,7 @@ public function withComposerFile( } public function withFile( - PackagingContract\FileInterface|PackagingContract\AssetInterface $source, + PackagingContract\AssetInterface|PackagingContract\FileInterface $source, string $destinationPath = null ): self { if (!$source instanceof PackagingContract\FileInterface) { diff --git a/src/Adapter/Tar/Satellite.php b/src/Adapter/Tar/Satellite.php index e80c81b9..2eb47e88 100644 --- a/src/Adapter/Tar/Satellite.php +++ b/src/Adapter/Tar/Satellite.php @@ -19,7 +19,7 @@ final class Satellite implements Configurator\SatelliteInterface public function __construct( private readonly string $outputPath, - Packaging\FileInterface|Packaging\DirectoryInterface ...$files + Packaging\DirectoryInterface|Packaging\FileInterface ...$files ) { $this->files = $files; } @@ -31,7 +31,7 @@ public function addTags(string ...$imageTags): self return $this; } - public function withFile(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function withFile(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { array_push($this->files, ...$files); diff --git a/src/Adapter/Tar/SatelliteBuilder.php b/src/Adapter/Tar/SatelliteBuilder.php index c65ac1c7..68c89afd 100644 --- a/src/Adapter/Tar/SatelliteBuilder.php +++ b/src/Adapter/Tar/SatelliteBuilder.php @@ -13,8 +13,8 @@ final class SatelliteBuilder implements Configurator\SatelliteBuilderInterface { /** @var iterable */ private iterable $composerRequire = []; - private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile = null; - private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null; + private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile = null; + private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null; /** @var \AppendIterator> */ private readonly iterable $files; /** @var array> */ @@ -47,8 +47,8 @@ public function withComposerRequire(string ...$package): self } public function withComposerFile( - PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile, - PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null + PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile, + PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null ): self { $this->composerJsonFile = $composerJsonFile; $this->composerLockFile = $composerLockFile; @@ -57,7 +57,7 @@ public function withComposerFile( } public function withFile( - PackagingContract\FileInterface|PackagingContract\AssetInterface $source, + PackagingContract\AssetInterface|PackagingContract\FileInterface $source, string $destinationPath = null ): self { if (!$source instanceof PackagingContract\FileInterface) { diff --git a/src/Builder/Action.php b/src/Builder/Action.php index fea89225..3bcc2282 100644 --- a/src/Builder/Action.php +++ b/src/Builder/Action.php @@ -16,8 +16,8 @@ public function __construct( ) {} public function addAction( - Node\Expr|Builder $loader, - Node\Expr|Builder $state, + Builder|Node\Expr $loader, + Builder|Node\Expr $state, ): self { $this->action = new Node\Expr\MethodCall( var: $this->runtime, diff --git a/src/Builder/Pipeline.php b/src/Builder/Pipeline.php index 80aa8c8c..2c6a3eb1 100644 --- a/src/Builder/Pipeline.php +++ b/src/Builder/Pipeline.php @@ -16,9 +16,9 @@ public function __construct( ) {} public function addExtractor( - Node\Expr|Builder $extractor, - Node\Expr|Builder $rejection, - Node\Expr|Builder $state, + Builder|Node\Expr $extractor, + Builder|Node\Expr $rejection, + Builder|Node\Expr $state, ): self { $this->steps[] = fn (Node\Expr $runtime) => new Node\Expr\MethodCall( var: $runtime, @@ -34,9 +34,9 @@ public function addExtractor( } public function addTransformer( - Node\Expr|Builder $transformer, - Node\Expr|Builder $rejection, - Node\Expr|Builder $state, + Builder|Node\Expr $transformer, + Builder|Node\Expr $rejection, + Builder|Node\Expr $state, ): self { $this->steps[] = fn (Node\Expr $runtime) => new Node\Expr\MethodCall( var: $runtime, @@ -52,9 +52,9 @@ public function addTransformer( } public function addLoader( - Node\Expr|Builder $loader, - Node\Expr|Builder $rejection, - Node\Expr|Builder $state, + Builder|Node\Expr $loader, + Builder|Node\Expr $rejection, + Builder|Node\Expr $state, ): self { $this->steps[] = fn (Node\Expr $runtime) => new Node\Expr\MethodCall( var: $runtime, diff --git a/src/Builder/Repository/API.php b/src/Builder/Repository/API.php index 6f084207..ec96aca5 100644 --- a/src/Builder/Repository/API.php +++ b/src/Builder/Repository/API.php @@ -17,7 +17,7 @@ final class API implements Configurator\RepositoryInterface public function __construct(private readonly Satellite\Builder\API $builder) {} - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface { array_push($this->files, ...$files); diff --git a/src/Builder/Repository/Action.php b/src/Builder/Repository/Action.php index 807566ea..be8a0e73 100644 --- a/src/Builder/Repository/Action.php +++ b/src/Builder/Repository/Action.php @@ -17,7 +17,7 @@ final class Action implements Configurator\RepositoryInterface public function __construct(private readonly Satellite\Builder\Action $builder) {} - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface { array_push($this->files, ...$files); diff --git a/src/Builder/Repository/Hook.php b/src/Builder/Repository/Hook.php index 849f88a6..d7d56b3a 100644 --- a/src/Builder/Repository/Hook.php +++ b/src/Builder/Repository/Hook.php @@ -17,7 +17,7 @@ final class Hook implements Configurator\RepositoryInterface public function __construct(private readonly Satellite\Builder\Hook $builder) {} - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface { array_push($this->files, ...$files); diff --git a/src/Builder/Repository/Pipeline.php b/src/Builder/Repository/Pipeline.php index ac171e2d..2d82a798 100644 --- a/src/Builder/Repository/Pipeline.php +++ b/src/Builder/Repository/Pipeline.php @@ -17,7 +17,7 @@ final class Pipeline implements Configurator\RepositoryInterface public function __construct(private readonly Satellite\Builder\Pipeline $builder) {} - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface { array_push($this->files, ...$files); diff --git a/src/Builder/Repository/Workflow.php b/src/Builder/Repository/Workflow.php index 23aac5b6..f4516fe6 100644 --- a/src/Builder/Repository/Workflow.php +++ b/src/Builder/Repository/Workflow.php @@ -17,7 +17,7 @@ final class Workflow implements Configurator\RepositoryInterface public function __construct(private readonly Satellite\Builder\Workflow $builder) {} - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface { array_push($this->files, ...$files); diff --git a/src/Cloud/Console/Command/CreateCommand.php b/src/Cloud/Console/Command/CreateCommand.php index 834c6ae9..c3446ba4 100644 --- a/src/Cloud/Console/Command/CreateCommand.php +++ b/src/Cloud/Console/Command/CreateCommand.php @@ -82,7 +82,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O try { $configuration = $service->normalize($configuration); - } catch (Config\Definition\Exception\InvalidTypeException|Config\Definition\Exception\InvalidConfigurationException $exception) { + } catch (Config\Definition\Exception\InvalidConfigurationException|Config\Definition\Exception\InvalidTypeException $exception) { $style->error($exception->getMessage()); return self::FAILURE; diff --git a/src/Cloud/Console/Command/RemoveCommand.php b/src/Cloud/Console/Command/RemoveCommand.php index 6608d1f8..f48e1ae7 100644 --- a/src/Cloud/Console/Command/RemoveCommand.php +++ b/src/Cloud/Console/Command/RemoveCommand.php @@ -82,7 +82,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O try { $configuration = $service->normalize($configuration); - } catch (Config\Definition\Exception\InvalidTypeException|Config\Definition\Exception\InvalidConfigurationException $exception) { + } catch (Config\Definition\Exception\InvalidConfigurationException|Config\Definition\Exception\InvalidTypeException $exception) { $style->error($exception->getMessage()); return self::FAILURE; diff --git a/src/Cloud/Console/Command/UpdateCommand.php b/src/Cloud/Console/Command/UpdateCommand.php index 4fcd5e77..7fb93962 100644 --- a/src/Cloud/Console/Command/UpdateCommand.php +++ b/src/Cloud/Console/Command/UpdateCommand.php @@ -82,7 +82,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O try { $configuration = $service->normalize($configuration); - } catch (Config\Definition\Exception\InvalidTypeException|Config\Definition\Exception\InvalidConfigurationException $exception) { + } catch (Config\Definition\Exception\InvalidConfigurationException|Config\Definition\Exception\InvalidTypeException $exception) { $style->error($exception->getMessage()); return self::FAILURE; diff --git a/src/Console/Command/BuildCommand.php b/src/Console/Command/BuildCommand.php index 5e6ad29c..2d1487b9 100644 --- a/src/Console/Command/BuildCommand.php +++ b/src/Console/Command/BuildCommand.php @@ -67,7 +67,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O try { $configuration = $service->normalize($configuration); - } catch (Config\Definition\Exception\InvalidTypeException|Config\Definition\Exception\InvalidConfigurationException $exception) { + } catch (Config\Definition\Exception\InvalidConfigurationException|Config\Definition\Exception\InvalidTypeException $exception) { $style->error($exception->getMessage()); return 255; diff --git a/src/Console/Command/ValidateCommand.php b/src/Console/Command/ValidateCommand.php index e342d78c..2ae8db02 100644 --- a/src/Console/Command/ValidateCommand.php +++ b/src/Console/Command/ValidateCommand.php @@ -66,7 +66,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O try { $configuration = $service->normalize($configuration); - } catch (Config\Definition\Exception\InvalidTypeException|Config\Definition\Exception\InvalidConfigurationException $exception) { + } catch (Config\Definition\Exception\InvalidConfigurationException|Config\Definition\Exception\InvalidTypeException $exception) { $style->error($exception->getMessage()); return 255; diff --git a/src/Feature/Logger/Builder/Monolog/ElasticSearchBuilder.php b/src/Feature/Logger/Builder/Monolog/ElasticSearchBuilder.php index 1bb4018a..be01985f 100644 --- a/src/Feature/Logger/Builder/Monolog/ElasticSearchBuilder.php +++ b/src/Feature/Logger/Builder/Monolog/ElasticSearchBuilder.php @@ -34,7 +34,7 @@ public function withIndex(string $index): self return $this; } - public function withHosts(string|array|Expression ...$hosts): self + public function withHosts(array|Expression|string ...$hosts): self { array_push($this->hosts, ...$hosts); diff --git a/src/Feature/Logger/Factory/ElasticSearchFactory.php b/src/Feature/Logger/Factory/ElasticSearchFactory.php index 366bdcf0..7e265448 100644 --- a/src/Feature/Logger/Factory/ElasticSearchFactory.php +++ b/src/Feature/Logger/Factory/ElasticSearchFactory.php @@ -36,7 +36,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } diff --git a/src/Feature/Logger/Factory/GelfFactory.php b/src/Feature/Logger/Factory/GelfFactory.php index 132872ef..c7017afe 100644 --- a/src/Feature/Logger/Factory/GelfFactory.php +++ b/src/Feature/Logger/Factory/GelfFactory.php @@ -33,7 +33,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } diff --git a/src/Feature/Logger/Factory/StreamFactory.php b/src/Feature/Logger/Factory/StreamFactory.php index 2886bac7..0048058d 100644 --- a/src/Feature/Logger/Factory/StreamFactory.php +++ b/src/Feature/Logger/Factory/StreamFactory.php @@ -33,7 +33,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } diff --git a/src/Feature/Logger/Factory/SyslogFactory.php b/src/Feature/Logger/Factory/SyslogFactory.php index 7bf4b8f5..9d2ad46c 100644 --- a/src/Feature/Logger/Factory/SyslogFactory.php +++ b/src/Feature/Logger/Factory/SyslogFactory.php @@ -33,7 +33,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } diff --git a/src/Feature/Logger/RepositoryTrait.php b/src/Feature/Logger/RepositoryTrait.php index ed522a90..f2d6ae88 100644 --- a/src/Feature/Logger/RepositoryTrait.php +++ b/src/Feature/Logger/RepositoryTrait.php @@ -14,7 +14,7 @@ trait RepositoryTrait /** @var string[] */ private array $packages; - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { array_push($this->files, ...$files); diff --git a/src/Feature/Logger/Service.php b/src/Feature/Logger/Service.php index 7e1af794..9de85707 100644 --- a/src/Feature/Logger/Service.php +++ b/src/Feature/Logger/Service.php @@ -42,7 +42,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -158,7 +158,7 @@ public function compile(array $config): Repository $builder->withLogger($monologBuilder->getNode()); return $repository; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException(message: $exception->getMessage(), previous: $exception); } } diff --git a/src/Feature/Rejection/Factory/RabbitMQFactory.php b/src/Feature/Rejection/Factory/RabbitMQFactory.php index 2f785ba9..7de68b4f 100644 --- a/src/Feature/Rejection/Factory/RabbitMQFactory.php +++ b/src/Feature/Rejection/Factory/RabbitMQFactory.php @@ -38,7 +38,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } diff --git a/src/Feature/Rejection/RepositoryTrait.php b/src/Feature/Rejection/RepositoryTrait.php index c0545d79..118dc131 100644 --- a/src/Feature/Rejection/RepositoryTrait.php +++ b/src/Feature/Rejection/RepositoryTrait.php @@ -14,7 +14,7 @@ trait RepositoryTrait /** @var string[] */ private array $packages; - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { array_push($this->files, ...$files); diff --git a/src/Feature/Rejection/Service.php b/src/Feature/Rejection/Service.php index 9a10e741..3296a24a 100644 --- a/src/Feature/Rejection/Service.php +++ b/src/Feature/Rejection/Service.php @@ -41,7 +41,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -82,7 +82,7 @@ public function compile(array $config): Repository } return $repository; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException(message: $exception->getMessage(), previous: $exception); } } diff --git a/src/Feature/State/RepositoryTrait.php b/src/Feature/State/RepositoryTrait.php index 1d0943d6..c2f89736 100644 --- a/src/Feature/State/RepositoryTrait.php +++ b/src/Feature/State/RepositoryTrait.php @@ -14,7 +14,7 @@ trait RepositoryTrait /** @var string[] */ private array $packages; - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { array_push($this->files, ...$files); diff --git a/src/Feature/State/Service.php b/src/Feature/State/Service.php index 72720cba..7b6cf1b5 100644 --- a/src/Feature/State/Service.php +++ b/src/Feature/State/Service.php @@ -41,7 +41,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } diff --git a/src/Interpreter.php b/src/Interpreter.php index 1b98d7f5..87221bfb 100644 --- a/src/Interpreter.php +++ b/src/Interpreter.php @@ -14,7 +14,7 @@ final class Interpreter private readonly array $expressionFunctions; public function __construct( - ExpressionFunctionProviderInterface|ExpressionFunction ...$expressionFunctions + ExpressionFunction|ExpressionFunctionProviderInterface ...$expressionFunctions ) { $this->expressionFunctions = $expressionFunctions; } diff --git a/src/Plugin/Batching/Repository.php b/src/Plugin/Batching/Repository.php index 23dd6c42..cb4d4e14 100644 --- a/src/Plugin/Batching/Repository.php +++ b/src/Plugin/Batching/Repository.php @@ -11,9 +11,9 @@ final readonly class Repository implements Configurator\StepRepositoryInterface { - public function __construct(private Merge|Fork $builder) {} + public function __construct(private Fork|Merge $builder) {} - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { return $this; } @@ -33,7 +33,7 @@ public function getPackages(): iterable return new \EmptyIterator(); } - public function getBuilder(): Merge|Fork + public function getBuilder(): Fork|Merge { return $this->builder; } diff --git a/src/Plugin/Batching/Service.php b/src/Plugin/Batching/Service.php index 9bf76aab..d3204bb9 100644 --- a/src/Plugin/Batching/Service.php +++ b/src/Plugin/Batching/Service.php @@ -55,7 +55,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -66,7 +66,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Plugin/Custom/Factory/Extractor.php b/src/Plugin/Custom/Factory/Extractor.php index ccf1088d..5690023d 100644 --- a/src/Plugin/Custom/Factory/Extractor.php +++ b/src/Plugin/Custom/Factory/Extractor.php @@ -44,7 +44,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -55,7 +55,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Plugin/Custom/Factory/Loader.php b/src/Plugin/Custom/Factory/Loader.php index aed11d17..69a17a52 100644 --- a/src/Plugin/Custom/Factory/Loader.php +++ b/src/Plugin/Custom/Factory/Loader.php @@ -44,7 +44,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -55,7 +55,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Plugin/Custom/Factory/Repository/RepositoryTrait.php b/src/Plugin/Custom/Factory/Repository/RepositoryTrait.php index c8a7b63b..fb9a52a6 100644 --- a/src/Plugin/Custom/Factory/Repository/RepositoryTrait.php +++ b/src/Plugin/Custom/Factory/Repository/RepositoryTrait.php @@ -14,7 +14,7 @@ trait RepositoryTrait /** @var string[] */ private array $packages; - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface { array_push($this->files, ...$files); diff --git a/src/Plugin/Custom/Factory/Transformer.php b/src/Plugin/Custom/Factory/Transformer.php index 23a99803..5beb12e3 100644 --- a/src/Plugin/Custom/Factory/Transformer.php +++ b/src/Plugin/Custom/Factory/Transformer.php @@ -44,7 +44,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -55,7 +55,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Plugin/Custom/Service.php b/src/Plugin/Custom/Service.php index 69a862dd..0818a8e4 100644 --- a/src/Plugin/Custom/Service.php +++ b/src/Plugin/Custom/Service.php @@ -47,7 +47,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -58,7 +58,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Plugin/FTP/Factory/Loader.php b/src/Plugin/FTP/Factory/Loader.php index 0e501b8c..f9caa4a7 100644 --- a/src/Plugin/FTP/Factory/Loader.php +++ b/src/Plugin/FTP/Factory/Loader.php @@ -39,7 +39,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -50,7 +50,7 @@ public function validate(array $config): bool $this->normalize($config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } @@ -88,7 +88,7 @@ public function compile(array $config): RepositoryInterface try { return new FTP\Factory\Repository\Repository($builder); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException(message: $exception->getMessage(), previous: $exception); } } diff --git a/src/Plugin/FTP/Factory/Repository/Repository.php b/src/Plugin/FTP/Factory/Repository/Repository.php index 240170e9..81b74abf 100644 --- a/src/Plugin/FTP/Factory/Repository/Repository.php +++ b/src/Plugin/FTP/Factory/Repository/Repository.php @@ -12,7 +12,7 @@ { public function __construct(private Builder\Loader|Builder\Server $builder) {} - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { return $this; } diff --git a/src/Plugin/FTP/Factory/Server.php b/src/Plugin/FTP/Factory/Server.php index 28530ff6..8bd71dd2 100644 --- a/src/Plugin/FTP/Factory/Server.php +++ b/src/Plugin/FTP/Factory/Server.php @@ -38,7 +38,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -49,7 +49,7 @@ public function validate(array $config): bool $this->normalize($config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } @@ -75,7 +75,7 @@ public function compile(array $config): FTP\Factory\Repository\Repository try { return new FTP\Factory\Repository\Repository($builder); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException(message: $exception->getMessage(), previous: $exception); } } diff --git a/src/Plugin/FTP/Service.php b/src/Plugin/FTP/Service.php index 33a816de..da93e63e 100644 --- a/src/Plugin/FTP/Service.php +++ b/src/Plugin/FTP/Service.php @@ -45,7 +45,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -56,7 +56,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Plugin/Filtering/Builder/Reject.php b/src/Plugin/Filtering/Builder/Reject.php index b3779a4c..a84ded29 100644 --- a/src/Plugin/Filtering/Builder/Reject.php +++ b/src/Plugin/Filtering/Builder/Reject.php @@ -133,7 +133,7 @@ class: new Node\Stmt\Class_(null, [ new Node\Expr\New_( new Node\Name\FullyQualified(RejectionResultBucket::class), [ - $this->serialize_rejection !== null ? new Node\Arg($this->serialize_rejection) : new Node\Arg(new Node\Expr\Variable('input')) + null !== $this->serialize_rejection ? new Node\Arg($this->serialize_rejection) : new Node\Arg(new Node\Expr\Variable('input')), ] ), ), diff --git a/src/Plugin/Filtering/Factory/Drop.php b/src/Plugin/Filtering/Factory/Drop.php index 5236e40a..0736b536 100644 --- a/src/Plugin/Filtering/Factory/Drop.php +++ b/src/Plugin/Filtering/Factory/Drop.php @@ -40,7 +40,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -51,7 +51,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Plugin/Filtering/Factory/Reject.php b/src/Plugin/Filtering/Factory/Reject.php index 6fc25475..d809c5b5 100644 --- a/src/Plugin/Filtering/Factory/Reject.php +++ b/src/Plugin/Filtering/Factory/Reject.php @@ -40,7 +40,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -51,7 +51,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } @@ -71,7 +71,7 @@ public function compile(array $config): Repository\Reject $builder->withExclusions( compileExpression($interpreter, $condition['when']) ); - if (array_key_exists('serialize_rejection', $condition)) { + if (\array_key_exists('serialize_rejection', $condition)) { $builder->withSerialiazeRejection(compileExpression($interpreter, $condition['serialize_rejection'])); } } diff --git a/src/Plugin/Filtering/Factory/Repository/RepositoryTrait.php b/src/Plugin/Filtering/Factory/Repository/RepositoryTrait.php index f332d595..1457f00d 100644 --- a/src/Plugin/Filtering/Factory/Repository/RepositoryTrait.php +++ b/src/Plugin/Filtering/Factory/Repository/RepositoryTrait.php @@ -14,7 +14,7 @@ trait RepositoryTrait /** @var string[] */ private array $packages; - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface { array_push($this->files, ...$files); diff --git a/src/Plugin/Filtering/Service.php b/src/Plugin/Filtering/Service.php index f63c4021..8c04104b 100644 --- a/src/Plugin/Filtering/Service.php +++ b/src/Plugin/Filtering/Service.php @@ -46,7 +46,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -57,7 +57,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Plugin/SFTP/Factory/Extractor.php b/src/Plugin/SFTP/Factory/Extractor.php index 014eb4e9..dc4e97ed 100644 --- a/src/Plugin/SFTP/Factory/Extractor.php +++ b/src/Plugin/SFTP/Factory/Extractor.php @@ -39,7 +39,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -50,7 +50,7 @@ public function validate(array $config): bool $this->normalize($config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } @@ -87,7 +87,7 @@ public function compile(array $config): Repository try { return new Repository($builder); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException(message: $exception->getMessage(), previous: $exception); } } diff --git a/src/Plugin/SFTP/Factory/Loader.php b/src/Plugin/SFTP/Factory/Loader.php index 1213dcee..e24b3611 100644 --- a/src/Plugin/SFTP/Factory/Loader.php +++ b/src/Plugin/SFTP/Factory/Loader.php @@ -39,7 +39,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -50,7 +50,7 @@ public function validate(array $config): bool $this->normalize($config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } @@ -87,7 +87,7 @@ public function compile(array $config): Repository try { return new Repository($builder); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException(message: $exception->getMessage(), previous: $exception); } } diff --git a/src/Plugin/SFTP/Factory/Repository/Repository.php b/src/Plugin/SFTP/Factory/Repository/Repository.php index 8ed17a76..d6277f17 100644 --- a/src/Plugin/SFTP/Factory/Repository/Repository.php +++ b/src/Plugin/SFTP/Factory/Repository/Repository.php @@ -12,7 +12,7 @@ { public function __construct(private Builder\Loader|Builder\Server $builder) {} - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { return $this; } diff --git a/src/Plugin/SFTP/Factory/Server.php b/src/Plugin/SFTP/Factory/Server.php index 62e498fa..1a2f7d02 100644 --- a/src/Plugin/SFTP/Factory/Server.php +++ b/src/Plugin/SFTP/Factory/Server.php @@ -38,7 +38,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -49,7 +49,7 @@ public function validate(array $config): bool $this->normalize($config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } @@ -84,7 +84,7 @@ public function compile(array $config): SFTP\Factory\Repository\Repository try { return new SFTP\Factory\Repository\Repository($builder); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException(message: $exception->getMessage(), previous: $exception); } } diff --git a/src/Plugin/SFTP/Service.php b/src/Plugin/SFTP/Service.php index ba5992c5..e0ae7a85 100644 --- a/src/Plugin/SFTP/Service.php +++ b/src/Plugin/SFTP/Service.php @@ -46,7 +46,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -57,7 +57,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Plugin/Stream/Repository.php b/src/Plugin/Stream/Repository.php index 79bb0dff..c2f9b53c 100644 --- a/src/Plugin/Stream/Repository.php +++ b/src/Plugin/Stream/Repository.php @@ -10,10 +10,10 @@ final readonly class Repository implements Configurator\StepRepositoryInterface { public function __construct( - private Builder\StderrLoader|Builder\StdoutLoader|Builder\JSONStreamLoader|Builder\DebugLoader $builder + private Builder\DebugLoader|Builder\JSONStreamLoader|Builder\StderrLoader|Builder\StdoutLoader $builder ) {} - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { return $this; } @@ -33,7 +33,7 @@ public function getPackages(): iterable return new \EmptyIterator(); } - public function getBuilder(): Builder\StderrLoader|Builder\StdoutLoader|Builder\JSONStreamLoader|Builder\DebugLoader + public function getBuilder(): Builder\DebugLoader|Builder\JSONStreamLoader|Builder\StderrLoader|Builder\StdoutLoader { return $this->builder; } diff --git a/src/Plugin/Stream/Service.php b/src/Plugin/Stream/Service.php index 3f3e11a9..c1fba50c 100644 --- a/src/Plugin/Stream/Service.php +++ b/src/Plugin/Stream/Service.php @@ -45,7 +45,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -56,7 +56,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Service.php b/src/Service.php index e55a0ca8..079ddec4 100644 --- a/src/Service.php +++ b/src/Service.php @@ -147,7 +147,7 @@ public function registerRuntimes(Satellite\Runtime\FactoryInterface ...$runtimes return $this; } - public function registerPlugins(Configurator\PipelinePluginInterface|Configurator\PipelineFeatureInterface ...$plugins): self + public function registerPlugins(Configurator\PipelineFeatureInterface|Configurator\PipelinePluginInterface ...$plugins): self { foreach ($plugins as $plugin) { /** @var Configurator\Feature $attribute */ @@ -188,7 +188,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -199,7 +199,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } }