| Total Complexity | 4 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 88.89% |
| 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(function ($topic) { |
|
| 20 | 5 | return (string)$topic; |
|
| 21 | }, $topics); |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @template T of mixed |
||
| 26 | * @param iterable<T>|T $entries |
||
| 27 | * @return array<T> |
||
| 28 | */ |
||
| 29 | 5 | protected function toArray($entries): array |
|
| 40 | } |
||
| 41 | } |
||
| 43 |