| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | private function collectMappers(array $mappersDefinitions): array |
||
| 32 | { |
||
| 33 | $queue = new \SplPriorityQueue(); |
||
| 34 | |||
| 35 | foreach ($mappersDefinitions as $mapperId => $mapperTags) { |
||
| 36 | $tagAttributes = $mapperTags[0]; |
||
| 37 | $priority = $tagAttributes['priority'] ?? 0; |
||
| 38 | $queue->insert($mapperId, $priority); |
||
| 39 | } |
||
| 40 | |||
| 41 | return array_map( |
||
| 42 | function ($mapperId) { |
||
| 43 | return new Reference($mapperId); |
||
| 44 | }, |
||
| 45 | iterator_to_array($queue, false) |
||
| 46 | ); |
||
| 47 | } |
||
| 48 | } |
||
| 49 |