| Total Complexity | 4 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 87.5% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | abstract class AbstractBroadcast implements BroadcastInterface |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Format the topic array into an array of strings. |
||
| 13 | * |
||
| 14 | * @param string[]|\Stringable[] $topics |
||
| 15 | * @return string[] |
||
| 16 | */ |
||
| 17 | 5 | protected function formatTopics(array $topics): array |
|
| 18 | { |
||
| 19 | 5 | return array_map(fn ($topic) => (string)$topic, $topics); |
|
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @template T of mixed |
||
| 24 | * @param iterable<T>|T $entries |
||
| 25 | * @return array<T> |
||
| 26 | */ |
||
| 27 | 5 | protected function toArray($entries): array |
|
| 38 | } |
||
| 39 | } |
||
| 41 |