Skip to content

Commit

Permalink
Updated generated code dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
gplanchat committed Nov 21, 2023
1 parent 2f32599 commit d1357cb
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
12 changes: 9 additions & 3 deletions src/Pipeline/Extractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,19 @@ public function __invoke(array $config, Pipeline $pipeline, StepRepositoryInterf
}

if (array_key_exists('code', $config)) {
$code = new Node\Scalar\String_($config['code']);
$code = $config['code'];
} else {
$code = new node\Scalar\String_(sprintf('%s.%s', $this->plugin, $this->key));
$code = sprintf('%s.%s', $this->plugin, $this->key);
}

$pipeline->addExtractor(
$code,
new Node\Expr\StaticCall(
new Node\Name\FullyQualified('Kiboko\\Component\\Pipeline\\StepCode'),
new Node\Identifier('fromString'),
[
new Node\Arg(new Node\Scalar\String_($code))
]
),
$repository->getBuilder()
->withLogger($logger)
->withRejection($rejection)
Expand Down
12 changes: 9 additions & 3 deletions src/Pipeline/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,19 @@ public function __invoke(array $config, Pipeline $pipeline, StepRepositoryInterf
}

if (array_key_exists('code', $config)) {
$code = new Node\Scalar\String_($config['code']);
$code = $config['code'];
} else {
$code = new node\Scalar\String_(sprintf('%s.%s', $this->plugin, $this->key));
$code = sprintf('%s.%s', $this->plugin, $this->key);
}

$pipeline->addLoader(
$code,
new Node\Expr\StaticCall(
new Node\Name\FullyQualified('Kiboko\\Component\\Pipeline\\StepCode'),
new Node\Identifier('fromString'),
[
new Node\Arg(new Node\Scalar\String_($code))
]
),
$repository->getBuilder()
->withLogger($logger)
->withRejection($rejection)
Expand Down
12 changes: 9 additions & 3 deletions src/Pipeline/Transformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,19 @@ public function __invoke(array $config, Pipeline $pipeline, StepRepositoryInterf
}

if (array_key_exists('code', $config)) {
$code = new Node\Scalar\String_($config['code']);
$code = $config['code'];
} else {
$code = new node\Scalar\String_(sprintf('%s.%s', $this->plugin, $this->key));
$code = sprintf('%s.%s', $this->plugin, $this->key);
}

$pipeline->addTransformer(
$code,
new Node\Expr\StaticCall(
new Node\Name\FullyQualified('Kiboko\\Component\\Pipeline\\StepCode'),
new Node\Identifier('fromString'),
[
new Node\Arg(new Node\Scalar\String_($code))
]
),
$repository->getBuilder()
->withLogger($logger)
->withRejection($rejection)
Expand Down

0 comments on commit d1357cb

Please sign in to comment.