Total Complexity | 4 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Coverage | 87.5% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | abstract class AbstractBroadcast implements BroadcastInterface |
||
12 | { |
||
13 | /** |
||
14 | * Format the topic array into an array of strings. |
||
15 | * |
||
16 | * @param string[]|Stringable[] $topics |
||
17 | * @return string[] |
||
18 | */ |
||
19 | 5 | protected function formatTopics(array $topics): array |
|
20 | { |
||
21 | 5 | return array_map(fn ($topic) => (string)$topic, $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 |