Lines
0.00%
0 / 3
Functions and Methods
0.00%
0 / 3
Classes and Traits
0.00%
0 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ExposedEntityAddress | 0.00% | 0 / 3 | 0.00% | 0 / 3 | 12 | 0.00% | 0 / 1 | |||
| __construct | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | |||||
| toMessageFields | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | |||||
| describe | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace Stewart\Client\Component; | |
| 6 | ||
| 7 | use Stewart\Contracts\App\AppId; | |
| 8 | use Stewart\Contracts\Exposure\ExposedEntityKey; | |
| 9 | ||
| 10 | final readonly class ExposedEntityAddress | |
| 11 | { | |
| 12 | public function __construct( | |
| 13 | public ComponentInstance $instance, | |
| 14 | public AppId $appId, | |
| 15 | public ExposedEntityKey $key, | |
| 16 | ) {} | |
| 17 | ||
| 18 | /** @return array{instance: string, app: string, key: string} */ | |
| 19 | public function toMessageFields(): array | |
| 20 | { | |
| 21 | return ['instance' => $this->instance->value, 'app' => $this->appId->value, 'key' => $this->key->value]; | |
| 22 | } | |
| 23 | ||
| 24 | public function describe(): string | |
| 25 | { | |
| 26 | return \sprintf('%s/%s/%s', $this->instance, $this->appId, $this->key); | |
| 27 | } | |
| 28 | } |