| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | public function extract($context): Metadata |
||
| 40 | { |
||
| 41 | $reduce = function (Metadata $metadata, Reader $reader) use ($context): Metadata { |
||
| 42 | return $metadata->merge($reader->extract($context)); |
||
| 43 | }; |
||
| 44 | |||
| 45 | $filter = function (Reader $reader) use ($context): bool { |
||
| 46 | return $reader->supports($context); |
||
| 47 | }; |
||
| 48 | |||
| 49 | return array_reduce(array_filter($this->items, $filter), $reduce, Metadata::create()); |
||
| 50 | } |
||
| 52 |