| @@ 185-197 (lines=13) @@ | ||
| 182 | * |
|
| 183 | * @return array |
|
| 184 | */ |
|
| 185 | protected function formatFormatters(array $formatters = []) |
|
| 186 | { |
|
| 187 | foreach ($formatters as $id => $option) { |
|
| 188 | $class = $option['formatter'] ?? LineFormatter::class; |
|
| 189 | unset($option['formatter']); |
|
| 190 | ||
| 191 | $formatters[$id] = function () use ($class, $option) { |
|
| 192 | return (new ClassResolver($class))->resolve($option); |
|
| 193 | }; |
|
| 194 | } |
|
| 195 | ||
| 196 | return $formatters; |
|
| 197 | } |
|
| 198 | ||
| 199 | /** |
|
| 200 | * @param array $handlers |
|
| @@ 243-259 (lines=17) @@ | ||
| 240 | * |
|
| 241 | * @return array |
|
| 242 | */ |
|
| 243 | protected function formatProcessors(array $processors = []) |
|
| 244 | { |
|
| 245 | foreach ($processors as $id => $option) { |
|
| 246 | if (empty($option['processor'])) { |
|
| 247 | continue; |
|
| 248 | } |
|
| 249 | ||
| 250 | $class = $option['processor']; |
|
| 251 | unset($option['processor']); |
|
| 252 | ||
| 253 | $processors[$id] = function () use ($class, $option) { |
|
| 254 | return (new ClassResolver($class))->resolve($option); |
|
| 255 | }; |
|
| 256 | } |
|
| 257 | ||
| 258 | return $processors; |
|
| 259 | } |
|
| 260 | ||
| 261 | /** |
|
| 262 | * @param array $channels |
|