|
@@ 211-215 (lines=5) @@
|
| 208 |
|
throw new InvalidArgumentException(sprintf('Formatter %s not configured.', $option['formatter'])); |
| 209 |
|
} |
| 210 |
|
|
| 211 |
|
foreach ($option['processors'] ?? [] as $processorId) { |
| 212 |
|
if (!isset($this->processors[$processorId])) { |
| 213 |
|
throw new InvalidArgumentException(sprintf('Processor %s not configured.', $processorId)); |
| 214 |
|
} |
| 215 |
|
} |
| 216 |
|
|
| 217 |
|
$class = $option['handler'] ?? StreamHandler::class; |
| 218 |
|
unset($option['handler']); |
|
@@ 269-273 (lines=5) @@
|
| 266 |
|
protected function formatChannels(array $channels = []) |
| 267 |
|
{ |
| 268 |
|
foreach ($channels as $id => $option) { |
| 269 |
|
foreach ($option['processors'] ?? [] as $processorId) { |
| 270 |
|
if (!isset($this->processors[$processorId])) { |
| 271 |
|
throw new InvalidArgumentException(sprintf('Processor %s not configured.', $processorId)); |
| 272 |
|
} |
| 273 |
|
} |
| 274 |
|
|
| 275 |
|
foreach ($option['handlers'] ?? [] as $handlerId) { |
| 276 |
|
if (!isset($this->handlers[$handlerId])) { |
|
@@ 275-279 (lines=5) @@
|
| 272 |
|
} |
| 273 |
|
} |
| 274 |
|
|
| 275 |
|
foreach ($option['handlers'] ?? [] as $handlerId) { |
| 276 |
|
if (!isset($this->handlers[$handlerId])) { |
| 277 |
|
throw new InvalidArgumentException(sprintf('Handler %s not configured.', $handlerId)); |
| 278 |
|
} |
| 279 |
|
} |
| 280 |
|
$channels[$id] = array_merge(['handlers' => [], 'processors' => []], $option); |
| 281 |
|
} |
| 282 |
|
|