Lines 0.00% 0 / 4
Functions and Methods 0.00% 0 / 4
Classes and Traits 0.00% 0 / 1
Name Lines Functions and Methods CRAP Classes and Traits
CorrelationId 0.00% 0 / 4 0.00% 0 / 4 20 0.00% 0 / 1
 __construct 0.00% 0 / 1 0.00% 0 / 1 2
 fromString 0.00% 0 / 1 0.00% 0 / 1 2
 equals 0.00% 0 / 1 0.00% 0 / 1 2
 __toString 0.00% 0 / 1 0.00% 0 / 1 2
1<?php
2
3declare(strict_types=1);
4
5namespace Stewart\Runtime\Model;
6
7use Stringable;
8
9final readonly class CorrelationId implements Stringable
10{
11    public function __construct(public string $value) {}
12
13    public static function fromString(string $value): self
14    {
15        return new self($value);
16    }
17
18    public function equals(self $other): bool
19    {
20        return $this->value === $other->value;
21    }
22
23    public function __toString(): string
24    {
25        return $this->value;
26    }
27}