Skip to content

Commit

Permalink
Ran php-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
sebprt committed Jan 16, 2024
1 parent 7b95d87 commit 35a53d0
Show file tree
Hide file tree
Showing 28 changed files with 58 additions and 58 deletions.
4 changes: 2 additions & 2 deletions src/Action/ConfigurationApplier.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

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 / phpstan6

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.

public function __construct(
Expand All @@ -22,7 +22,7 @@ public function __construct(

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: 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
2 changes: 1 addition & 1 deletion src/Adapter/AdapterChoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,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
8 changes: 4 additions & 4 deletions src/Cloud/Pipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function (string $namespace) {
);
}

public static function fromApiWithId(Api\Client $client, PipelineId $id, array $configuration): DTO\ReferencedPipeline
public static function fromApiWithId(Api\Client $client, PipelineId $id, array $configuration): ReferencedPipeline
{
$item = $client->getPipelineItem($id->asString());

Expand All @@ -99,7 +99,7 @@ public static function fromApiWithId(Api\Client $client, PipelineId $id, array $
);
}

public static function fromApiWithCode(Api\Client $client, string $code, array $configuration): DTO\ReferencedPipeline
public static function fromApiWithCode(Api\Client $client, string $code, array $configuration): ReferencedPipeline
{
$collection = $client->getPipelineCollection(['code' => $code]);

Expand Down Expand Up @@ -199,7 +199,7 @@ public function create(DTO\PipelineInterface $pipeline): DTO\CommandBatch
);
}

public function update(DTO\ReferencedPipeline $actual, DTO\PipelineInterface $desired): DTO\CommandBatch
public function update(ReferencedPipeline $actual, DTO\PipelineInterface $desired): DTO\CommandBatch
{
if ($actual->code() !== $desired->code()) {
throw new \RuntimeException('Code does not match between actual and desired pipeline definition.');
Expand All @@ -220,7 +220,7 @@ public function update(DTO\ReferencedPipeline $actual, DTO\PipelineInterface $de
return new DTO\CommandBatch(...$commands);
}

public function remove(DTO\PipelineId $id): DTO\CommandBatch
public function remove(PipelineId $id): DTO\CommandBatch
{
return new DTO\CommandBatch(
new Command\Pipeline\RemovePipelineCommand($id),
Expand Down
2 changes: 1 addition & 1 deletion src/Cloud/PipelineInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ public function create(DTO\PipelineInterface $pipeline): DTO\CommandBatch;

public function update(DTO\ReferencedPipeline $actual, DTO\PipelineInterface $desired): DTO\CommandBatch;

public function remove(DTO\PipelineId $id): DTO\CommandBatch;
public function remove(PipelineId $id): DTO\CommandBatch;
}
4 changes: 2 additions & 2 deletions src/ComposerScripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class ComposerScripts
public static function postInstall(Event $event): void
{
self::updatePlugins(
$packages = new Composer\Accumulator(),
$packages = new Accumulator(),
$repository = $event->getComposer()
->getRepositoryManager()
->getLocalRepository(),
Expand All @@ -26,7 +26,7 @@ public static function postInstall(Event $event): void
public static function postUpdate(Event $event): void
{
self::updatePlugins(
$packages = new Composer\Accumulator(),
$packages = new Accumulator(),
$repository = $event->getComposer()
->getRepositoryManager()
->getLocalRepository(),
Expand Down
2 changes: 1 addition & 1 deletion src/ConfigLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Kiboko\Contract\Configurator\InvalidConfigurationException;
use Symfony\Component\Config;

class ConfigLoader implements ConfigLoaderInterface
class ConfigLoader implements Satellite\ConfigLoaderInterface
{
public function __construct(private readonly string $basePath)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Command/BuildCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,6 @@ public function log($level, $message, array $context = []): void
}
}

return \Symfony\Component\Console\Command\Command::SUCCESS;
return Console\Command\Command::SUCCESS;
}
}
2 changes: 1 addition & 1 deletion src/Console/Command/ValidateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O

$style->writeln(json_encode($configuration, \JSON_PRETTY_PRINT));

return \Symfony\Component\Console\Command\Command::SUCCESS;
return Console\Command\Command::SUCCESS;
}
}
4 changes: 2 additions & 2 deletions src/Feature/Logger/Factory/ElasticSearchFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function validate(array $config): bool
return false;
}

public function compile(array $config): Repository\ElasticSearchRepository
public function compile(array $config): Logger\Factory\Repository\ElasticSearchRepository
{
$builder = new Logger\Builder\Monolog\ElasticSearchBuilder($this->interpreter);

Expand All @@ -69,6 +69,6 @@ public function compile(array $config): Repository\ElasticSearchRepository
$builder->withIndex($config['index']);
}

return new Repository\ElasticSearchRepository($builder);
return new Logger\Factory\Repository\ElasticSearchRepository($builder);
}
}
4 changes: 2 additions & 2 deletions src/Feature/Logger/Factory/GelfFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function validate(array $config): bool
return false;
}

public function compile(array $config): Repository\GelfRepository
public function compile(array $config): Logger\Factory\Repository\GelfRepository
{
$builder = new Logger\Builder\Monolog\GelfBuilder();

Expand All @@ -74,6 +74,6 @@ public function compile(array $config): Repository\GelfRepository
);
}

return new Repository\GelfRepository($builder);
return new Logger\Factory\Repository\GelfRepository($builder);
}
}
4 changes: 2 additions & 2 deletions src/Feature/Logger/Factory/StreamFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function validate(array $config): bool
return false;
}

public function compile(array $config): Repository\StreamRepository
public function compile(array $config): Logger\Factory\Repository\StreamRepository
{
$builder = new Logger\Builder\Monolog\StreamBuilder($config['path']);

Expand All @@ -66,6 +66,6 @@ public function compile(array $config): Repository\StreamRepository
$builder->withLocking($config['use_locking']);
}

return new Repository\StreamRepository($builder);
return new Logger\Factory\Repository\StreamRepository($builder);
}
}
4 changes: 2 additions & 2 deletions src/Feature/Logger/Factory/SyslogFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function validate(array $config): bool
return false;
}

public function compile(array $config): Repository\SyslogRepository
public function compile(array $config): Logger\Factory\Repository\SyslogRepository
{
$builder = new Logger\Builder\Monolog\SyslogBuilder($config['ident']);

Expand All @@ -66,6 +66,6 @@ public function compile(array $config): Repository\SyslogRepository
$builder->withLogopts($config['logopts']);
}

return new Repository\SyslogRepository($builder);
return new Logger\Factory\Repository\SyslogRepository($builder);
}
}
16 changes: 8 additions & 8 deletions src/Feature/Rejection/Builder/RabbitMQBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,25 @@ public function withExchange(
public function getNode(): Node\Expr
{
$args = [
new Node\Arg($this->host, name: new Node\Identifier('host')),
new Node\Arg($this->vhost, name: new Node\Identifier('vhost')),
new Node\Arg($this->topic, name: new Node\Identifier('topic')),
new Node\Arg($this->stepUuid, name: new Node\Identifier('stepUuid')),
new Node\Arg($this->host, name: new Identifier('host')),
new Node\Arg($this->vhost, name: new Identifier('vhost')),
new Node\Arg($this->topic, name: new Identifier('topic')),
new Node\Arg($this->stepUuid, name: new Identifier('stepUuid')),
];

if (null !== $this->exchange) {
$args[] = new Node\Arg($this->exchange, name: new Node\Identifier('exchange'));
$args[] = new Node\Arg($this->exchange, name: new Identifier('exchange'));
}

if (null !== $this->port) {
$args[] = new Node\Arg($this->port, name: new Node\Identifier('port'));
$args[] = new Node\Arg($this->port, name: new Identifier('port'));
}

if (null !== $this->user) {
array_push(
$args,
new Node\Arg($this->user, name: new Node\Identifier('user')),
new Node\Arg($this->password, name: new Node\Identifier('password')),
new Node\Arg($this->user, name: new Identifier('user')),
new Node\Arg($this->password, name: new Identifier('password')),
);

return new Node\Expr\StaticCall(
Expand Down
4 changes: 2 additions & 2 deletions src/Feature/Rejection/Factory/RabbitMQFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function validate(array $config): bool
return false;
}

public function compile(array $config): Repository\RabbitMQRepository
public function compile(array $config): Rejection\Factory\Repository\RabbitMQRepository
{
$builder = new Rejection\Builder\RabbitMQBuilder(
stepUuid: compileValueWhenExpression($this->interpreter, uniqid()),
Expand All @@ -76,6 +76,6 @@ public function compile(array $config): Repository\RabbitMQRepository
$builder->withExchange(compileValueWhenExpression($this->interpreter, $config['exchange']));
}

return new Repository\RabbitMQRepository($builder);
return new Rejection\Factory\Repository\RabbitMQRepository($builder);
}
}
4 changes: 2 additions & 2 deletions src/Plugin/Custom/Factory/Extractor.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\Extractor
public function compile(array $config): Custom\Factory\Repository\Extractor
{
$containerName = sprintf('ProjectServiceContainer%s', ByteString::fromRandom(8)->toString());

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

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

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

$dumper = new PhpDumper($container);
$repository->addFiles(
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/Custom/Factory/Loader.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\Loader
public function compile(array $config): Custom\Factory\Repository\Loader
{
$containerName = sprintf('ProjectServiceContainer%s', ByteString::fromRandom(8)->toString());

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

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

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

$dumper = new PhpDumper($container);
$repository->addFiles(
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/Custom/Factory/Transformer.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\Transformer
public function compile(array $config): Custom\Factory\Repository\Transformer
{
$containerName = sprintf('ProjectServiceContainer%s', ByteString::fromRandom(8)->toString());

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

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

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

$dumper = new PhpDumper($container);
$repository->addFiles(
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/Custom/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __construct(
private ExpressionLanguage $interpreter = new Satellite\ExpressionLanguage()
) {
$this->processor = new Processor();
$this->configuration = new Configuration();
$this->configuration = new Custom\Configuration();
}

public function interpreter(): ExpressionLanguage
Expand Down
14 changes: 7 additions & 7 deletions src/Plugin/FTP/Builder/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private function getPutNode($index, $server, $path, $content, $mode): array
new Node\Expr\ArrayDimFetch(
new Node\Expr\PropertyFetch(
new Node\Expr\Variable('this'),
new Node\Identifier('servers')
new Identifier('servers')
),
new Node\Scalar\LNumber($index),
),
Expand All @@ -124,7 +124,7 @@ private function getPutNode($index, $server, $path, $content, $mode): array
new Node\Expr\ArrayDimFetch(
new Node\Expr\PropertyFetch(
new Node\Expr\Variable('this'),
new Node\Identifier('serversMapping')
new Identifier('serversMapping')
),
dim: new Node\Scalar\LNumber($index),
),
Expand Down Expand Up @@ -222,7 +222,7 @@ class: new Node\Stmt\Class_(
],
'stmts' => [
new Node\Stmt\ClassMethod(
name: new Node\Identifier('__construct'),
name: new Identifier('__construct'),
subNodes: [
'flags' => Node\Stmt\Class_::MODIFIER_PUBLIC,
'params' => [
Expand Down Expand Up @@ -255,7 +255,7 @@ class: new Node\Stmt\Class_(
new Node\Expr\ArrayDimFetch(
new Node\Expr\PropertyFetch(
new Node\Expr\Variable('this'),
new Node\Identifier('servers')
new Identifier('servers')
),
new Node\Scalar\LNumber($index),
),
Expand All @@ -269,7 +269,7 @@ class: new Node\Stmt\Class_(
],
),
new Node\Stmt\ClassMethod(
name: new Node\Identifier('load'),
name: new Identifier('load'),
subNodes: [
'flags' => Node\Stmt\Class_::MODIFIER_PUBLIC,
'stmts' => [
Expand Down Expand Up @@ -315,7 +315,7 @@ class: new Node\Name\FullyQualified('Kiboko\\Component\\Bucket\\ComplexResultBuc
],
),
new Node\Stmt\ClassMethod(
name: new Node\Identifier('createDirectories'),
name: new Identifier('createDirectories'),
subNodes: [
'flags' => Node\Stmt\Class_::MODIFIER_PUBLIC,
'returnType' => new Node\Expr\ConstFetch(new Node\Name('void')),
Expand Down Expand Up @@ -528,7 +528,7 @@ public function compileCloseServers(): array
new Node\Expr\ArrayDimFetch(
var: new Node\Expr\PropertyFetch(
var: new Node\Expr\Variable('this'),
name: new Node\Identifier('servers')
name: new Identifier('servers')
),
dim: new Node\Scalar\LNumber($key),
),
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/Filtering/Factory/Drop.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ public function validate(array $config): bool
/**
* @throws Configurator\ConfigurationExceptionInterface
*/
public function compile(array $config): Repository\Drop
public function compile(array $config): Filtering\Factory\Repository\Drop
{
$interpreter = clone $this->interpreter;

$builder = new Filtering\Builder\Drop();

$repository = new Repository\Drop($builder);
$repository = new Filtering\Factory\Repository\Drop($builder);

foreach ($config as $condition) {
$builder->withExclusions(
Expand Down
Loading

0 comments on commit 35a53d0

Please sign in to comment.