Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
46 | public function setId(UuidInterface $id) |
||
47 | { |
||
48 | if (null !== $this->id) { |
||
49 | throw new \RuntimeException( |
||
50 | 'You can not overwrite a UUID that has alreasy been set.' . |
||
51 | ' This method should only be used for setting the ID on newly created Entities' |
||
52 | ); |
||
53 | } |
||
54 | $this->id = $id; |
||
55 | |||
56 | return $this; |
||
|
|||
57 | } |
||
59 |