Lines
0.00%
0 / 2
Functions and Methods
0.00%
0 / 2
Classes and Traits
0.00%
0 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| AppPauseOverrideCollection | 0.00% | 0 / 2 | 0.00% | 0 / 2 | 6 | 0.00% | 0 / 1 | |||
| keyedByAppId | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | |||||
| find | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace Stewart\Runtime\App\Collection; | |
| 6 | ||
| 7 | use Stewart\Contracts\App\AppId; | |
| 8 | use Stewart\Contracts\Collection\KeyedCollection; | |
| 9 | use Stewart\Runtime\App\AppPauseOverride; | |
| 10 | ||
| 11 | /** @extends KeyedCollection<string, AppPauseOverride> */ | |
| 12 | final readonly class AppPauseOverrideCollection extends KeyedCollection | |
| 13 | { | |
| 14 | /** @param iterable<AppPauseOverride> $overrides */ | |
| 15 | public static function keyedByAppId(iterable $overrides): self | |
| 16 | { | |
| 17 | return self::keyedBy($overrides, static fn(AppPauseOverride $override): string => $override->appId->value); | |
| 18 | } | |
| 19 | ||
| 20 | public function find(AppId $id): ?AppPauseOverride | |
| 21 | { | |
| 22 | return $this->elementAt($id->value); | |
| 23 | } | |
| 24 | } |