| Total Complexity | 8 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 12 | final class EnableByMatchingSegment implements ToggleStrategy |
||
| 13 | { |
||
| 14 | public const NAME = 'enable_by_matching_segment'; |
||
| 15 | private string $id; |
||
| 16 | private Segments $segments; |
||
| 17 | |||
| 18 | 8 | public function __construct(string $id, Segments $segments) |
|
| 19 | { |
||
| 20 | 8 | $this->id = $id; |
|
| 21 | 8 | $this->segments = $segments; |
|
| 22 | } |
||
| 23 | |||
| 24 | 3 | public function id(): string |
|
| 27 | } |
||
| 28 | |||
| 29 | 3 | public function type(): string |
|
| 32 | } |
||
| 33 | |||
| 34 | 6 | public function isSatisfiedBy(ConsumerIdentity $identity): bool |
|
| 43 | } |
||
| 44 | |||
| 45 | 1 | public function toArray(): array |
|
| 53 | ), |
||
| 54 | ]; |
||
| 55 | } |
||
| 56 | |||
| 57 | 1 | public function jsonSerialize(): array |
|
| 62 |