Skip to content

Commit a45031d

Browse files
committed
Added a JobCode value object
1 parent c06b089 commit a45031d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/JobCode.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Kiboko\Component\Workflow;
6+
7+
use Kiboko\Contract\Satellite\CodeInterface;
8+
9+
final class JobCode implements CodeInterface
10+
{
11+
private function __construct(
12+
private string $reference,
13+
) {}
14+
15+
public static function fromString(string $reference): self
16+
{
17+
return new self($reference);
18+
}
19+
20+
public function __toString(): string
21+
{
22+
return $this->reference;
23+
}
24+
}

0 commit comments

Comments
 (0)