| Conditions | 3 |
| Paths | 3 |
| Total Lines | 7 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | 3 | public function selectBucket( ?string $bucketId, callable $fallbackSelectionStrategy ): Bucket { |
|
| 42 | 3 | foreach ( $this->buckets as $bucket ) { |
|
| 43 | 3 | if ( $bucket->getIdentifier() === $bucketId ) { |
|
| 44 | 3 | return $bucket; |
|
| 45 | } |
||
| 46 | } |
||
| 47 | 2 | return $fallbackSelectionStrategy( $this->buckets ); |
|
| 48 | } |
||
| 49 | } |