| Total Complexity | 6 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class WishlistToken implements WishlistTokenInterface |
||
| 16 | { |
||
| 17 | protected string $value; |
||
| 18 | |||
| 19 | public function __construct(?string $value = null) |
||
| 20 | { |
||
| 21 | if (null === $value) { |
||
| 22 | $this->value = $this->generate(); |
||
| 23 | } else { |
||
| 24 | $this->setValue($value); |
||
| 25 | } |
||
| 26 | } |
||
| 27 | |||
| 28 | public function getValue(): string |
||
| 29 | { |
||
| 30 | return $this->value; |
||
| 31 | } |
||
| 32 | |||
| 33 | public function setValue(string $value): void |
||
| 36 | } |
||
| 37 | |||
| 38 | public function __toString(): string |
||
| 41 | } |
||
| 42 | |||
| 43 | private function generate(): string |
||
| 46 | } |
||
| 47 | } |
||
| 48 |