-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated code to be compatible with php-etl/pipeline-contracts:0.5 and…
… php-etl/satellite-contracts:0.1
- Loading branch information
Showing
7 changed files
with
129 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Kiboko\Component\Runtime\Workflow; | ||
|
||
use Kiboko\Component\Runtime\Action\Action; | ||
use Kiboko\Component\Runtime\Pipeline\Pipeline; | ||
use Symfony\Component\Console\Output\ConsoleOutput; | ||
|
||
final class Workflow | ||
{ | ||
/** @var list<Action|Pipeline> */ | ||
private array $jobs = []; | ||
private string $index = 'A'; | ||
|
||
public function __construct( | ||
private readonly ConsoleOutput $output, | ||
) { | ||
} | ||
|
||
public function withPipeline(string $label): Pipeline | ||
{ | ||
return $this->jobs[] = new Pipeline($this->output, $this->index++, $label); | ||
} | ||
|
||
public function withAction(string $label): Action | ||
{ | ||
return $this->jobs[] = new Action($this->output, $this->index++, $label); | ||
} | ||
|
||
public function update(): void | ||
{ | ||
foreach ($this->jobs as $job) { | ||
$job->update(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters