Skip to content

Commit

Permalink
cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JoMessina committed Jan 17, 2024
1 parent 98d82d7 commit ca4a50a
Show file tree
Hide file tree
Showing 163 changed files with 414 additions and 215 deletions.
4 changes: 3 additions & 1 deletion src/Action/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

final readonly class Action
{
public function __construct(private ?string $plugin, private ExpressionLanguage $interpreter = new Satellite\ExpressionLanguage()) {}
public function __construct(private ?string $plugin, private ExpressionLanguage $interpreter = new Satellite\ExpressionLanguage())
{
}

public function __invoke(array $config, ActionBuilder $action, RepositoryInterface $repository): void

Check failure on line 22 in src/Action/Action.php

View workflow job for this annotation

GitHub Actions / phpstan7

Method Kiboko\Component\Satellite\Action\Action::__invoke() has parameter $config with no value type specified in iterable type array.

Check failure on line 22 in src/Action/Action.php

View workflow job for this annotation

GitHub Actions / phpstan8

Method Kiboko\Component\Satellite\Action\Action::__invoke() has parameter $config with no value type specified in iterable type array.

Check failure on line 22 in src/Action/Action.php

View workflow job for this annotation

GitHub Actions / phpstan6

Method Kiboko\Component\Satellite\Action\Action::__invoke() has parameter $config with no value type specified in iterable type array.
{
Expand Down
7 changes: 4 additions & 3 deletions src/Action/ConfigurationApplier.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@

final class ConfigurationApplier
{
private ?Action $action = null;
private ?Satellite\Action\Action $action = null;
private array $packages = [];

Check failure on line 14 in src/Action/ConfigurationApplier.php

View workflow job for this annotation

GitHub Actions / phpstan7

Property Kiboko\Component\Satellite\Action\ConfigurationApplier::$packages type has no value type specified in iterable type array.

Check failure on line 14 in src/Action/ConfigurationApplier.php

View workflow job for this annotation

GitHub Actions / phpstan8

Property Kiboko\Component\Satellite\Action\ConfigurationApplier::$packages type has no value type specified in iterable type array.

Check failure on line 14 in src/Action/ConfigurationApplier.php

View workflow job for this annotation

GitHub Actions / phpstan6

Property Kiboko\Component\Satellite\Action\ConfigurationApplier::$packages type has no value type specified in iterable type array.

public function __construct(
private readonly string $plugin,
private readonly FactoryInterface $service,
private readonly ExpressionLanguage $interpreter,
) {}
) {
}

public function withAction(): self
{
$this->action = new Action($this->plugin, clone $this->interpreter);
$this->action = new Satellite\Action\Action($this->plugin, clone $this->interpreter);

return $this;
}
Expand Down
4 changes: 3 additions & 1 deletion src/Action/Custom/Builder/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ final class Action implements ActionBuilderInterface
private ?Node\Expr $logger = null;

Check failure on line 12 in src/Action/Custom/Builder/Action.php

View workflow job for this annotation

GitHub Actions / phpstan7

Property Kiboko\Component\Satellite\Action\Custom\Builder\Action::$logger is never read, only written.

Check failure on line 12 in src/Action/Custom/Builder/Action.php

View workflow job for this annotation

GitHub Actions / phpstan8

Property Kiboko\Component\Satellite\Action\Custom\Builder\Action::$logger is never read, only written.

Check failure on line 12 in src/Action/Custom/Builder/Action.php

View workflow job for this annotation

GitHub Actions / phpstan6

Property Kiboko\Component\Satellite\Action\Custom\Builder\Action::$logger is never read, only written.

Check failure on line 12 in src/Action/Custom/Builder/Action.php

View workflow job for this annotation

GitHub Actions / phpstan5

Property Kiboko\Component\Satellite\Action\Custom\Builder\Action::$logger is never read, only written.
private ?Node\Expr $state = null;

Check failure on line 13 in src/Action/Custom/Builder/Action.php

View workflow job for this annotation

GitHub Actions / phpstan7

Property Kiboko\Component\Satellite\Action\Custom\Builder\Action::$state is never read, only written.

Check failure on line 13 in src/Action/Custom/Builder/Action.php

View workflow job for this annotation

GitHub Actions / phpstan8

Property Kiboko\Component\Satellite\Action\Custom\Builder\Action::$state is never read, only written.

Check failure on line 13 in src/Action/Custom/Builder/Action.php

View workflow job for this annotation

GitHub Actions / phpstan6

Property Kiboko\Component\Satellite\Action\Custom\Builder\Action::$state is never read, only written.

Check failure on line 13 in src/Action/Custom/Builder/Action.php

View workflow job for this annotation

GitHub Actions / phpstan5

Property Kiboko\Component\Satellite\Action\Custom\Builder\Action::$state is never read, only written.

public function __construct(private readonly Node\Expr $service, private readonly string $containerNamespace) {}
public function __construct(private readonly Node\Expr $service, private readonly string $containerNamespace)
{
}

public function withLogger(Node\Expr $logger): self
{
Expand Down
4 changes: 2 additions & 2 deletions src/Action/Custom/Factory/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function validate(array $config): bool
/**
* @throws Configurator\ConfigurationExceptionInterface
*/
public function compile(array $config): Repository\Action
public function compile(array $config): Custom\Factory\Repository\Action
{
$containerName = sprintf('ProjectServiceContainer%s', ByteString::fromRandom(8)->toString());

Expand All @@ -74,7 +74,7 @@ public function compile(array $config): Repository\Action

$container = (new SatelliteDependencyInjection(...$this->providers))($config);

$repository = new Repository\Action($builder);
$repository = new Custom\Factory\Repository\Action($builder);

$dumper = new PhpDumper($container);
$repository->addFiles(
Expand Down
3 changes: 2 additions & 1 deletion src/Action/SFTP/Builder/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public function __construct(
private readonly Node\Expr $password,
private readonly Node\Expr $localFilePath,
private readonly Node\Expr $serverFilePath,
) {}
) {
}

public function withLogger(Node\Expr $logger): self
{
Expand Down
4 changes: 3 additions & 1 deletion src/Action/SFTP/Factory/Repository/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@

final readonly class Repository implements Configurator\RepositoryInterface
{
public function __construct(private Builder\Action $builder) {}
public function __construct(private Builder\Action $builder)
{
}

public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self
{
Expand Down
5 changes: 3 additions & 2 deletions src/Adapter/AdapterChoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
{
public function __construct(

Check failure on line 11 in src/Adapter/AdapterChoice.php

View workflow job for this annotation

GitHub Actions / phpstan6

Method Kiboko\Component\Satellite\Adapter\AdapterChoice::__construct() has parameter $adapters with no value type specified in iterable type array.
private array $adapters,
) {}
) {
}

public function __invoke(array $configuration): Configurator\SatelliteBuilderInterface

Check failure on line 16 in src/Adapter/AdapterChoice.php

View workflow job for this annotation

GitHub Actions / phpstan6

Method Kiboko\Component\Satellite\Adapter\AdapterChoice::__invoke() has parameter $configuration with no value type specified in iterable type array.
{
Expand All @@ -22,7 +23,7 @@ public function __invoke(array $configuration): Configurator\SatelliteBuilderInt
}
}

\assert($factory instanceof \Kiboko\Contract\Configurator\Adapter\FactoryInterface, new AdapterNotFoundException('No compatible adapter was found for your satellite configuration.'));
\assert($factory instanceof Configurator\Adapter\FactoryInterface, new AdapterNotFoundException('No compatible adapter was found for your satellite configuration.'));

return $factory($configuration);
}
Expand Down
4 changes: 3 additions & 1 deletion src/Adapter/AdapterNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

namespace Kiboko\Component\Satellite\Adapter;

final class AdapterNotFoundException extends \RuntimeException {}
final class AdapterNotFoundException extends \RuntimeException
{
}
4 changes: 3 additions & 1 deletion src/Adapter/Docker/FileOrDirectoryNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

namespace Kiboko\Component\Satellite\Adapter\Docker;

class FileOrDirectoryNotFoundException extends \RuntimeException {}
class FileOrDirectoryNotFoundException extends \RuntimeException
{
}
4 changes: 3 additions & 1 deletion src/Adapter/Docker/NetworkInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

namespace Kiboko\Component\Satellite\Adapter\Docker;

interface NetworkInterface {}
interface NetworkInterface
{
}
4 changes: 2 additions & 2 deletions src/Adapter/FactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

trigger_deprecation('php-etl/satellite', '0.4', 'The "%s" interface is deprecated, use "%s" instead.', 'Kiboko\\Component\\Satellite\\Adapter\\FactoryInterface', \Kiboko\Contract\Configurator\Adapter\FactoryInterface::class);
trigger_deprecation('php-etl/satellite', '0.4', 'The "%s" interface is deprecated, use "%s" instead.', 'Kiboko\\Component\\Satellite\\Adapter\\FactoryInterface', Kiboko\Contract\Configurator\Adapter\FactoryInterface::class);

/*
* @deprecated since Satellite 0.4, use Kiboko\Contract\Configurator\Adapter\FactoryInterface instead.
*/
class_alias(\Kiboko\Contract\Configurator\Adapter\FactoryInterface::class, 'Kiboko\\Component\\Satellite\\Adapter\\FactoryInterface');
class_alias(Kiboko\Contract\Configurator\Adapter\FactoryInterface::class, 'Kiboko\\Component\\Satellite\\Adapter\\FactoryInterface');
4 changes: 3 additions & 1 deletion src/Builder/API/PipelineBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

final readonly class PipelineBuilder
{
public function __construct(private Builder $builder) {}
public function __construct(private Builder $builder)
{
}

public function getNode(): Node\Expr
{
Expand Down
3 changes: 2 additions & 1 deletion src/Builder/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ final class Action implements Builder

public function __construct(
private readonly Node\Expr $runtime,
) {}
) {
}

public function addAction(
Builder|Node\Expr $loader,
Expand Down
4 changes: 3 additions & 1 deletion src/Builder/Hook/PipelineBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

final readonly class PipelineBuilder
{
public function __construct(private Builder $builder) {}
public function __construct(private Builder $builder)
{
}

public function getNode(): Node\Expr
{
Expand Down
3 changes: 2 additions & 1 deletion src/Builder/Pipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ final class Pipeline implements Builder

public function __construct(
private readonly Node\Expr $runtime
) {}
) {
}

public function addExtractor(
Builder|Node\Expr $extractor,
Expand Down
4 changes: 3 additions & 1 deletion src/Builder/Repository/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ final class API implements Configurator\RepositoryInterface
/** @var string[] */
private array $packages = [];

public function __construct(private readonly Satellite\Builder\API $builder) {}
public function __construct(private readonly Satellite\Builder\API $builder)
{
}

public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface
{
Expand Down
4 changes: 3 additions & 1 deletion src/Builder/Repository/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ final class Action implements Configurator\RepositoryInterface
/** @var string[] */
private array $packages = [];

public function __construct(private readonly Satellite\Builder\Action $builder) {}
public function __construct(private readonly Satellite\Builder\Action $builder)
{
}

public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface
{
Expand Down
4 changes: 3 additions & 1 deletion src/Builder/Repository/Hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ final class Hook implements Configurator\RepositoryInterface
/** @var string[] */
private array $packages = [];

public function __construct(private readonly Satellite\Builder\Hook $builder) {}
public function __construct(private readonly Satellite\Builder\Hook $builder)
{
}

public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface
{
Expand Down
4 changes: 3 additions & 1 deletion src/Builder/Repository/Pipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ final class Pipeline implements Configurator\RepositoryInterface
/** @var string[] */
private array $packages = [];

public function __construct(private readonly Satellite\Builder\Pipeline $builder) {}
public function __construct(private readonly Satellite\Builder\Pipeline $builder)
{
}

public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface
{
Expand Down
4 changes: 3 additions & 1 deletion src/Builder/Repository/Workflow.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ final class Workflow implements Configurator\RepositoryInterface
/** @var string[] */
private array $packages = [];

public function __construct(private readonly Satellite\Builder\Workflow $builder) {}
public function __construct(private readonly Satellite\Builder\Workflow $builder)
{
}

public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface
{
Expand Down
3 changes: 2 additions & 1 deletion src/Builder/Workflow.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ final class Workflow implements Builder

public function __construct(
private readonly Node\Expr $runtime
) {}
) {
}

public function addPipeline(
string $pipelineFilename,
Expand Down
4 changes: 3 additions & 1 deletion src/Builder/Workflow/ActionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

final readonly class ActionBuilder implements Builder
{
public function __construct(private Builder $builder) {}
public function __construct(private Builder $builder)
{
}

public function getNode(): Node\Expr
{
Expand Down
4 changes: 3 additions & 1 deletion src/Builder/Workflow/PipelineBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

final readonly class PipelineBuilder implements Builder
{
public function __construct(private Builder $builder) {}
public function __construct(private Builder $builder)
{
}

public function getNode(): Node\Expr
{
Expand Down
4 changes: 3 additions & 1 deletion src/Cloud/AccessDeniedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

namespace Kiboko\Component\Satellite\Cloud;

final class AccessDeniedException extends \RuntimeException {}
final class AccessDeniedException extends \RuntimeException
{
}
4 changes: 3 additions & 1 deletion src/Cloud/AddAfterPipelineStepFailedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

namespace Kiboko\Component\Satellite\Cloud;

class AddAfterPipelineStepFailedException extends \RuntimeException {}
class AddAfterPipelineStepFailedException extends \RuntimeException
{
}
4 changes: 3 additions & 1 deletion src/Cloud/AddBeforePipelineStepFailedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

namespace Kiboko\Component\Satellite\Cloud;

class AddBeforePipelineStepFailedException extends \RuntimeException {}
class AddBeforePipelineStepFailedException extends \RuntimeException
{
}
4 changes: 3 additions & 1 deletion src/Cloud/AddPipelineComposerPSR4AutoloadFailedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

namespace Kiboko\Component\Satellite\Cloud;

class AddPipelineComposerPSR4AutoloadFailedException extends \RuntimeException {}
class AddPipelineComposerPSR4AutoloadFailedException extends \RuntimeException
{
}
4 changes: 3 additions & 1 deletion src/Cloud/AddPipelineStepProbeFailedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

namespace Kiboko\Component\Satellite\Cloud;

class AddPipelineStepProbeFailedException extends \RuntimeException {}
class AddPipelineStepProbeFailedException extends \RuntimeException
{
}
4 changes: 3 additions & 1 deletion src/Cloud/AppendPipelineStepFailedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

namespace Kiboko\Component\Satellite\Cloud;

class AppendPipelineStepFailedException extends \RuntimeException {}
class AppendPipelineStepFailedException extends \RuntimeException
{
}
4 changes: 3 additions & 1 deletion src/Cloud/Command/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

namespace Kiboko\Component\Satellite\Cloud\Command;

interface Command {}
interface Command
{
}
3 changes: 2 additions & 1 deletion src/Cloud/Command/Pipeline/AddAfterPipelineStepCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ public function __construct(
public PipelineId $pipeline,
public StepCode $previous,
public Step $step,
) {}
) {
}
}
3 changes: 2 additions & 1 deletion src/Cloud/Command/Pipeline/AddBeforePipelineStepCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ public function __construct(
public PipelineId $pipeline,
public StepCode $next,
public Step $step,
) {}
) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ public function __construct(
public PipelineId $pipeline,
public string $namespace,
public array $paths
) {}
) {
}
}
3 changes: 2 additions & 1 deletion src/Cloud/Command/Pipeline/AddPipelineStepProbeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ public function __construct(
public DTO\PipelineId $pipeline,
public DTO\StepCode $stepCode,
public DTO\Probe $probe,
) {}
) {
}
}
3 changes: 2 additions & 1 deletion src/Cloud/Command/Pipeline/AppendPipelineStepCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ final class AppendPipelineStepCommand implements Command
public function __construct(
public PipelineId $pipeline,
public Step $step,
) {}
) {
}
}
3 changes: 2 additions & 1 deletion src/Cloud/Command/Pipeline/CompilePipelineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ final class CompilePipelineCommand implements Command
{
public function __construct(
public PipelineId $pipeline
) {}
) {
}
}
3 changes: 2 additions & 1 deletion src/Cloud/Command/Pipeline/DeclarePipelineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ public function __construct(
public DTO\AuthList $auths,
public DTO\OrganizationId $organizationId,
public DTO\WorkspaceId $project,
) {}
) {
}
}
3 changes: 2 additions & 1 deletion src/Cloud/Command/Pipeline/MoveAfterPipelineStepCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ public function __construct(
public PipelineId $pipeline,
public StepCode $previous,
public StepCode $current,
) {}
) {
}
}
3 changes: 2 additions & 1 deletion src/Cloud/Command/Pipeline/MoveBeforePipelineStepCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ public function __construct(
public PipelineId $pipeline,
public StepCode $next,
public StepCode $current,
) {}
) {
}
}
Loading

0 comments on commit ca4a50a

Please sign in to comment.