| Total Complexity | 4 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | final class LoggableContextCollection implements \IteratorAggregate, \Countable |
||
| 6 | { |
||
| 7 | public function __construct(private readonly array $loggableContextCollection = []) |
||
| 8 | { |
||
| 9 | } |
||
| 10 | |||
| 11 | public function getByClass(string $loggableClass): ?array |
||
| 12 | { |
||
| 13 | return $this->getIterator()[$loggableClass] ?? null; |
||
| 14 | } |
||
| 15 | |||
| 16 | /** |
||
| 17 | * {@inheritdoc} |
||
| 18 | * |
||
| 19 | * @return \Traversable<string> |
||
| 20 | */ |
||
| 21 | public function getIterator(): \Traversable |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * {@inheritdoc} |
||
| 28 | */ |
||
| 29 | public function count(): int |
||
| 34 |