Skip to content

Commit

Permalink
Added a JobCode value object
Browse files Browse the repository at this point in the history
  • Loading branch information
gplanchat committed Nov 21, 2023
1 parent c06b089 commit a45031d
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/JobCode.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

declare(strict_types=1);

namespace Kiboko\Component\Workflow;

use Kiboko\Contract\Satellite\CodeInterface;

final class JobCode implements CodeInterface
{
private function __construct(
private string $reference,
) {}

public static function fromString(string $reference): self
{
return new self($reference);
}

public function __toString(): string
{
return $this->reference;
}
}

0 comments on commit a45031d

Please sign in to comment.