Skip to content

fix file expression language #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Action/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
{
}

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

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.
{
if (!\array_key_exists($this->plugin, $config)) {

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

View workflow job for this annotation

GitHub Actions / phpstan8

Parameter #1 $key of function array_key_exists expects int|string, string|null given.
return;
}

Expand All @@ -33,7 +33,7 @@
$logger = $compiled->getBuilder()->getNode();
} else {
$logger = new Node\Expr\New_(
new Node\Name\FullyQualified('Psr\\Log\\NullLogger'),
new Node\Name\FullyQualified('Psr\Log\NullLogger'),
);
}

Expand All @@ -45,7 +45,7 @@
$state = $compiled->getBuilder()->getNode();
} else {
$state = new Node\Expr\New_(
new Node\Name\FullyQualified('Kiboko\\Contract\\Action\\NullState'),
new Node\Name\FullyQualified('Kiboko\Contract\Action\NullState'),
);
}

Expand All @@ -55,8 +55,8 @@
$action->addAction(
$builder
->withLogger($logger)
->withState($state),

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

View workflow job for this annotation

GitHub Actions / phpstan8

Parameter #1 $state of method Kiboko\Component\Satellite\Action\SFTP\Builder\ActionBuilderInterface::withState() expects PhpParser\Node\Expr, PhpParser\Node\Expr\New_|PhpParser\Node\Stmt given.

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

View workflow job for this annotation

GitHub Actions / phpstan7

Parameter #1 $state of method Kiboko\Component\Satellite\Action\SFTP\Builder\ActionBuilderInterface::withState() expects PhpParser\Node\Expr, PhpParser\Node\Expr\New_|PhpParser\Node\Stmt given.
$state,

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

View workflow job for this annotation

GitHub Actions / phpstan8

Parameter #2 $state of method Kiboko\Component\Satellite\Builder\Action::addAction() expects PhpParser\Builder|PhpParser\Node\Expr, PhpParser\Node\Expr\New_|PhpParser\Node\Stmt given.

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

View workflow job for this annotation

GitHub Actions / phpstan7

Parameter #2 $state of method Kiboko\Component\Satellite\Builder\Action::addAction() expects PhpParser\Builder|PhpParser\Node\Expr, PhpParser\Node\Expr\New_|PhpParser\Node\Stmt given.
);
}
}
4 changes: 2 additions & 2 deletions src/Action/ConfigurationApplier.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

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

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.

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.

public function __construct(
private readonly string $plugin,
Expand All @@ -22,7 +22,7 @@

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

return $this;
}
Expand All @@ -34,11 +34,11 @@
return $this;
}

public function appendTo(array $config, Satellite\Builder\Repository\Action $action): void

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

View workflow job for this annotation

GitHub Actions / phpstan8

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

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

View workflow job for this annotation

GitHub Actions / phpstan6

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

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

View workflow job for this annotation

GitHub Actions / phpstan7

Method Kiboko\Component\Satellite\Action\ConfigurationApplier::appendTo() has parameter $config with no value type specified in iterable type array.
{
$repository = $this->service->compile($config[$this->plugin]);

($this->action)($config, $action->getBuilder(), $repository);

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

View workflow job for this annotation

GitHub Actions / phpstan8

Trying to invoke Kiboko\Component\Satellite\Action\Action|null but it might not be a callable.

$action->addPackages(...$this->packages);

Expand Down
6 changes: 3 additions & 3 deletions src/Action/Custom/Factory/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
private readonly Processor $processor;
private readonly ConfigurationInterface $configuration;

public function __construct(

Check failure on line 27 in src/Action/Custom/Factory/Action.php

View workflow job for this annotation

GitHub Actions / phpstan8

Method Kiboko\Component\Satellite\Action\Custom\Factory\Action::__construct() has parameter $providers with no value type specified in iterable type array.

Check failure on line 27 in src/Action/Custom/Factory/Action.php

View workflow job for this annotation

GitHub Actions / phpstan6

Method Kiboko\Component\Satellite\Action\Custom\Factory\Action::__construct() has parameter $providers with no value type specified in iterable type array.

Check failure on line 27 in src/Action/Custom/Factory/Action.php

View workflow job for this annotation

GitHub Actions / phpstan7

Method Kiboko\Component\Satellite\Action\Custom\Factory\Action::__construct() has parameter $providers with no value type specified in iterable type array.
private readonly ExpressionLanguage $interpreter = new Satellite\ExpressionLanguage(),
private readonly array $providers = [],
) {
Expand Down Expand Up @@ -63,25 +63,25 @@
/**
* @throws Configurator\ConfigurationExceptionInterface
*/
public function compile(array $config): Custom\Factory\Repository\Action
public function compile(array $config): Repository\Action
{
$containerName = sprintf('ProjectServiceContainer%s', ByteString::fromRandom(8)->toString());

$builder = new Custom\Builder\Action(
compileValueWhenExpression($this->interpreter, $config['use']),
sprintf('GyroscopsGenerated\\%s', $containerName),
sprintf('GyroscopsGenerated\%s', $containerName),
);

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

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

$dumper = new PhpDumper($container);
$repository->addFiles(
new Packaging\File(
sprintf('%s.php', $containerName),
new Packaging\Asset\InMemory(
$dumper->dump(['class' => $containerName, 'namespace' => 'GyroscopsGenerated'])

Check failure on line 84 in src/Action/Custom/Factory/Action.php

View workflow job for this annotation

GitHub Actions / phpstan7

Parameter #1 $content of class Kiboko\Component\Packaging\Asset\InMemory constructor expects string, array|string given.
)
),
);
Expand Down
5 changes: 2 additions & 3 deletions src/Action/Custom/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Kiboko\Component\Satellite\Action\Custom;

use Kiboko\Component\Satellite\Action\Custom;
use Kiboko\Component\Satellite\ExpressionLanguage as Satellite;
use Kiboko\Contract\Configurator;
use Symfony\Component\Config\Definition\Exception as Symfony;
Expand All @@ -26,7 +25,7 @@
private ExpressionLanguage $interpreter = new Satellite\ExpressionLanguage()
) {
$this->processor = new Processor();
$this->configuration = new Custom\Configuration();
$this->configuration = new Configuration();
}

public function interpreter(): ExpressionLanguage
Expand Down Expand Up @@ -74,11 +73,11 @@
&& \count($config['expression_language'])
) {
foreach ($config['expression_language'] as $provider) {
$interpreter->registerProvider(new $provider());

Check failure on line 76 in src/Action/Custom/Service.php

View workflow job for this annotation

GitHub Actions / phpstan7

Parameter #1 $provider of method Symfony\Component\ExpressionLanguage\ExpressionLanguage::registerProvider() expects Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface, object given.
}
}

$actionFactory = new Custom\Factory\Action($this->interpreter);
$actionFactory = new Factory\Action($this->interpreter);

return $actionFactory->compile($config);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Action/SFTP/Builder/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

final class Action implements ActionBuilderInterface
{
private ?Node\Expr $logger = null;

Check failure on line 11 in src/Action/SFTP/Builder/Action.php

View workflow job for this annotation

GitHub Actions / phpstan5

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

Check failure on line 11 in src/Action/SFTP/Builder/Action.php

View workflow job for this annotation

GitHub Actions / phpstan6

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

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

View workflow job for this annotation

GitHub Actions / phpstan5

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

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

View workflow job for this annotation

GitHub Actions / phpstan6

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

public function __construct(
private readonly Node\Expr $host,
Expand Down Expand Up @@ -38,7 +38,7 @@
public function getNode(): Node
{
return new Node\Expr\New_(
class: new Node\Name\FullyQualified('Kiboko\\Component\\Action\\Flow\\SFTP\\UploadFile'),
class: new Node\Name\FullyQualified('Kiboko\Component\Action\Flow\SFTP\UploadFile'),
args: [
new Node\Arg(
value: $this->host,
Expand Down
2 changes: 1 addition & 1 deletion src/Adapter/ComposerFailureException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

final class ComposerFailureException extends \RuntimeException
{
public function __construct(private readonly string $command = '', string $message = '', int $code = 0, \Throwable $previous = null)
public function __construct(private readonly string $command = '', string $message = '', int $code = 0, ?\Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
}
Expand Down
10 changes: 5 additions & 5 deletions src/Adapter/Docker/SatelliteBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
private iterable $command = [];
/** @var iterable<string> */
private iterable $tags = [];
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile = null;
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null;
private PackagingContract\AssetInterface|PackagingContract\FileInterface|null $composerJsonFile = null;
private PackagingContract\AssetInterface|PackagingContract\FileInterface|null $composerLockFile = null;
/** @var iterable<array<string, string>> */
private iterable $paths = [];
/** @var \AppendIterator<string,PackagingContract\FileInterface, \Iterator<string,PackagingContract\FileInterface>> */
Expand Down Expand Up @@ -67,7 +67,7 @@

public function withComposerFile(
PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile,
PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null
PackagingContract\AssetInterface|PackagingContract\FileInterface|null $composerLockFile = null
): self {
$this->composerJsonFile = $composerJsonFile;
$this->composerLockFile = $composerLockFile;
Expand All @@ -77,7 +77,7 @@

public function withFile(
PackagingContract\AssetInterface|PackagingContract\FileInterface $source,
string $destinationPath = null
?string $destinationPath = null
): self {
if (!$source instanceof PackagingContract\FileInterface) {
$source = new Packaging\VirtualFile($source);
Expand All @@ -85,14 +85,14 @@

$this->paths[] = [$source->getPath(), $destinationPath ?? $source->getPath()];

$this->files->append(new \ArrayIterator([

Check failure on line 88 in src/Adapter/Docker/SatelliteBuilder.php

View workflow job for this annotation

GitHub Actions / phpstan5

Parameter #1 $iterator of method AppendIterator<string,Kiboko\Contract\Packaging\FileInterface,Iterator<string, Kiboko\Contract\Packaging\FileInterface>>::append() expects Iterator<string, Kiboko\Contract\Packaging\FileInterface>, ArrayIterator<int, Kiboko\Component\Packaging\File> given.
new Packaging\File($destinationPath, $source),
]));

return $this;
}

public function withDirectory(PackagingContract\DirectoryInterface $source, string $destinationPath = null): self
public function withDirectory(PackagingContract\DirectoryInterface $source, ?string $destinationPath = null): self
{
$this->paths[] = [$source->getPath(), $destinationPath ?? $source->getPath()];

Expand Down Expand Up @@ -152,13 +152,13 @@

if (null !== $this->composerJsonFile) {
$dockerfile->push(new Dockerfile\Dockerfile\Copy('composer.json', 'composer.json'));
$this->files->append(new \ArrayIterator([

Check failure on line 155 in src/Adapter/Docker/SatelliteBuilder.php

View workflow job for this annotation

GitHub Actions / phpstan5

Parameter #1 $iterator of method AppendIterator<string,Kiboko\Contract\Packaging\FileInterface,Iterator<string, Kiboko\Contract\Packaging\FileInterface>>::append() expects Iterator<string, Kiboko\Contract\Packaging\FileInterface>, ArrayIterator<int, Kiboko\Component\Packaging\File> given.
new Packaging\File('composer.json', $this->composerJsonFile),
]));

if (null !== $this->composerLockFile) {
$dockerfile->push(new Dockerfile\Dockerfile\Copy('composer.json', 'composer.lock'));
$this->files->append(new \ArrayIterator([

Check failure on line 161 in src/Adapter/Docker/SatelliteBuilder.php

View workflow job for this annotation

GitHub Actions / phpstan5

Parameter #1 $iterator of method AppendIterator<string,Kiboko\Contract\Packaging\FileInterface,Iterator<string, Kiboko\Contract\Packaging\FileInterface>>::append() expects Iterator<string, Kiboko\Contract\Packaging\FileInterface>, ArrayIterator<int, Kiboko\Component\Packaging\File> given.
new Packaging\File('composer.lock', $this->composerLockFile),
]));
}
Expand Down
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');
10 changes: 5 additions & 5 deletions src/Adapter/Filesystem/SatelliteBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
];
private array $authenticationTokens = [];
private array $repositories = [];
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile = null;
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null;
private PackagingContract\AssetInterface|PackagingContract\FileInterface|null $composerJsonFile = null;
private PackagingContract\AssetInterface|PackagingContract\FileInterface|null $composerLockFile = null;
/** @var iterable<array<string, string>> */
private iterable $paths = [];

Check failure on line 26 in src/Adapter/Filesystem/SatelliteBuilder.php

View workflow job for this annotation

GitHub Actions / phpstan5

Property Kiboko\Component\Satellite\Adapter\Filesystem\SatelliteBuilder::$paths is never read, only written.
/** @var \AppendIterator<string,PackagingContract\FileInterface, \Iterator<string,PackagingContract\FileInterface>> */
private readonly iterable $files;

Expand Down Expand Up @@ -55,7 +55,7 @@

public function withComposerFile(
PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile,
PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null
PackagingContract\AssetInterface|PackagingContract\FileInterface|null $composerLockFile = null
): self {
$this->composerJsonFile = $composerJsonFile;
$this->composerLockFile = $composerLockFile;
Expand All @@ -65,7 +65,7 @@

public function withFile(
PackagingContract\AssetInterface|PackagingContract\FileInterface $source,
string $destinationPath = null
?string $destinationPath = null
): self {
if (!$source instanceof PackagingContract\FileInterface) {
$source = new Packaging\VirtualFile($source);
Expand All @@ -73,14 +73,14 @@

$this->paths[] = [$source->getPath(), $destinationPath ?? $source->getPath()];

$this->files->append(new \ArrayIterator([

Check failure on line 76 in src/Adapter/Filesystem/SatelliteBuilder.php

View workflow job for this annotation

GitHub Actions / phpstan5

Parameter #1 $iterator of method AppendIterator<string,Kiboko\Contract\Packaging\FileInterface,Iterator<string, Kiboko\Contract\Packaging\FileInterface>>::append() expects Iterator<string, Kiboko\Contract\Packaging\FileInterface>, ArrayIterator<int, Kiboko\Component\Packaging\File> given.
new Packaging\File($destinationPath, $source),
]));

return $this;
}

public function withDirectory(PackagingContract\DirectoryInterface $source, string $destinationPath = null): self
public function withDirectory(PackagingContract\DirectoryInterface $source, ?string $destinationPath = null): self
{
$this->paths[] = [$source->getPath(), $destinationPath ?? $source->getPath()];

Expand Down
10 changes: 5 additions & 5 deletions src/Adapter/Tar/SatelliteBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ final class SatelliteBuilder implements Configurator\SatelliteBuilderInterface
{
/** @var iterable<string> */
private iterable $composerRequire = [];
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile = null;
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null;
private PackagingContract\AssetInterface|PackagingContract\FileInterface|null $composerJsonFile = null;
private PackagingContract\AssetInterface|PackagingContract\FileInterface|null $composerLockFile = null;
/** @var \AppendIterator<string,PackagingContract\FileInterface, \Iterator<string,PackagingContract\FileInterface>> */
private readonly iterable $files;
/** @var array<string, array<string, string>> */
Expand Down Expand Up @@ -48,7 +48,7 @@ public function withComposerRequire(string ...$package): self

public function withComposerFile(
PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile,
PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null
PackagingContract\AssetInterface|PackagingContract\FileInterface|null $composerLockFile = null
): self {
$this->composerJsonFile = $composerJsonFile;
$this->composerLockFile = $composerLockFile;
Expand All @@ -58,7 +58,7 @@ public function withComposerFile(

public function withFile(
PackagingContract\AssetInterface|PackagingContract\FileInterface $source,
string $destinationPath = null
?string $destinationPath = null
): self {
if (!$source instanceof PackagingContract\FileInterface) {
$source = new Packaging\VirtualFile($source);
Expand All @@ -71,7 +71,7 @@ public function withFile(
return $this;
}

public function withDirectory(PackagingContract\DirectoryInterface $source, string $destinationPath = null): self
public function withDirectory(PackagingContract\DirectoryInterface $source, ?string $destinationPath = null): self
{
$this->files->append(new \RecursiveIteratorIterator($source, \RecursiveIteratorIterator::SELF_FIRST));

Expand Down
8 changes: 4 additions & 4 deletions src/Builder/API/APIRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ final class APIRuntime
public function getNode(): Node\Expr
{
return new Node\Expr\New_(
class: new Node\Name\FullyQualified('Kiboko\\Component\\Runtime\\API\\APIRuntime'),
class: new Node\Name\FullyQualified('Kiboko\Component\Runtime\API\APIRuntime'),
args: [
new Node\Arg(
value: new Node\Expr\New_(
class: new Node\Name\FullyQualified('Kiboko\\Component\\Pipeline\\Pipeline'),
class: new Node\Name\FullyQualified('Kiboko\Component\Pipeline\Pipeline'),
args: [
new Node\Arg(
value: new Node\Expr\New_(
class: new Node\Name\FullyQualified('Kiboko\\Component\\Pipeline\\PipelineRunner'),
class: new Node\Name\FullyQualified('Kiboko\Component\Pipeline\PipelineRunner'),
args: [
new Node\Arg(
value: new Node\Expr\New_(
class: new Node\Name\FullyQualified('Psr\\Log\\NullLogger')
class: new Node\Name\FullyQualified('Psr\Log\NullLogger')
)
),
]
Expand Down
2 changes: 1 addition & 1 deletion src/Builder/API/PipelineBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function getNode(): Node\Expr
'params' => [
new Node\Param(
var: new Node\Expr\Variable('runtime'),
type: new Node\Name\FullyQualified('Kiboko\\Component\\Runtime\\Hook\\HookRuntimeInterface'),
type: new Node\Name\FullyQualified('Kiboko\Component\Runtime\Hook\HookRuntimeInterface'),
),
],
'stmts' => [
Expand Down
8 changes: 4 additions & 4 deletions src/Builder/Hook/HookRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ final class HookRuntime
public function getNode(): Node\Expr
{
return new Node\Expr\New_(
class: new Node\Name\FullyQualified('Kiboko\\Component\\Runtime\\Hook\\HookRuntime'),
class: new Node\Name\FullyQualified('Kiboko\Component\Runtime\Hook\HookRuntime'),
args: [
new Node\Arg(
value: new Node\Expr\New_(
class: new Node\Name\FullyQualified('Kiboko\\Component\\Pipeline\\Pipeline'),
class: new Node\Name\FullyQualified('Kiboko\Component\Pipeline\Pipeline'),
args: [
new Node\Arg(
value: new Node\Expr\New_(
class: new Node\Name\FullyQualified('Kiboko\\Component\\Pipeline\\PipelineRunner'),
class: new Node\Name\FullyQualified('Kiboko\Component\Pipeline\PipelineRunner'),
args: [
new Node\Arg(
value: new Node\Expr\New_(
class: new Node\Name\FullyQualified('Psr\\Log\\NullLogger')
class: new Node\Name\FullyQualified('Psr\Log\NullLogger')
)
),
]
Expand Down
2 changes: 1 addition & 1 deletion src/Builder/Hook/PipelineBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function getNode(): Node\Expr
'params' => [
new Node\Param(
var: new Node\Expr\Variable('runtime'),
type: new Node\Name\FullyQualified('Kiboko\\Component\\Runtime\\Hook\\HookRuntimeInterface'),
type: new Node\Name\FullyQualified('Kiboko\Component\Runtime\Hook\HookRuntimeInterface'),
),
],
'stmts' => [
Expand Down
10 changes: 5 additions & 5 deletions src/Builder/Pipeline/ConsoleRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@ final class ConsoleRuntime implements Builder
public function getNode(): Node\Expr
{
return new Node\Expr\New_(
class: new Node\Name\FullyQualified('Kiboko\\Component\\Runtime\\Pipeline\\Console'),
class: new Node\Name\FullyQualified('Kiboko\Component\Runtime\Pipeline\Console'),
args: [
new Node\Arg(
value: new Node\Expr\New_(
class: new Node\Name\FullyQualified('Symfony\\Component\\Console\\Output\\ConsoleOutput'),
class: new Node\Name\FullyQualified('Symfony\Component\Console\Output\ConsoleOutput'),
)
),
new Node\Arg(
value: new Node\Expr\New_(
class: new Node\Name\FullyQualified('Kiboko\\Component\\Pipeline\\Pipeline'),
class: new Node\Name\FullyQualified('Kiboko\Component\Pipeline\Pipeline'),
args: [
new Node\Arg(
new Node\Expr\New_(
class: new Node\Name\FullyQualified('Kiboko\\Component\\Pipeline\\PipelineRunner'),
class: new Node\Name\FullyQualified('Kiboko\Component\Pipeline\PipelineRunner'),
args: [
new Node\Arg(
value: new Node\Expr\New_(
class: new Node\Name\FullyQualified('Psr\\Log\\NullLogger'),
class: new Node\Name\FullyQualified('Psr\Log\NullLogger'),
)
),
],
Expand Down
8 changes: 4 additions & 4 deletions src/Builder/Workflow.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function addPipeline(string $code, string $pipelineFilename): self
args: [
new Node\Arg(
new Node\Expr\StaticCall(
new Node\Name\FullyQualified('Kiboko\\Component\\Workflow\\JobCode'),
new Node\Name\FullyQualified('Kiboko\Component\Workflow\JobCode'),
new Node\Identifier('fromString'),
[
new Node\Arg(new Node\Scalar\String_($code)),
Expand All @@ -38,7 +38,7 @@ public function addPipeline(string $code, string $pipelineFilename): self
args: [
new Node\Arg(
new Node\Expr\StaticCall(
new Node\Name\FullyQualified('Kiboko\\Component\\Workflow\\JobCode'),
new Node\Name\FullyQualified('Kiboko\Component\Workflow\JobCode'),
new Node\Identifier('fromString'),
[
new Node\Arg(new Node\Scalar\String_($code)),
Expand Down Expand Up @@ -73,7 +73,7 @@ public function addAction(string $code, string $pipelineFilename): self
args: [
new Node\Arg(
new Node\Expr\StaticCall(
new Node\Name\FullyQualified('Kiboko\\Component\\Workflow\\JobCode'),
new Node\Name\FullyQualified('Kiboko\Component\Workflow\JobCode'),
new Node\Identifier('fromString'),
[
new Node\Arg(new Node\Scalar\String_($code)),
Expand All @@ -87,7 +87,7 @@ public function addAction(string $code, string $pipelineFilename): self
args: [
new Node\Arg(
new Node\Expr\StaticCall(
new Node\Name\FullyQualified('Kiboko\\Component\\Workflow\\JobCode'),
new Node\Name\FullyQualified('Kiboko\Component\Workflow\JobCode'),
new Node\Identifier('fromString'),
[
new Node\Arg(new Node\Scalar\String_($code)),
Expand Down
2 changes: 1 addition & 1 deletion src/Builder/Workflow/ActionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function getNode(): Node\Expr
'params' => [
new Node\Param(
var: new Node\Expr\Variable('runtime'),
type: new Node\Name\FullyQualified('Kiboko\\Component\\Runtime\\Action\\ActionRuntimeInterface'),
type: new Node\Name\FullyQualified('Kiboko\Component\Runtime\Action\ActionRuntimeInterface'),
),
],
'stmts' => [
Expand Down
Loading
Loading