@@ 197-201 (lines=5) @@ | ||
194 | throw new InvalidArgumentException(sprintf('Formatter %s not configured.', $option['formatter'])); |
|
195 | } |
|
196 | ||
197 | foreach ($option['processors'] ?? [] as $processorId) { |
|
198 | if (!isset($this->processors[$processorId])) { |
|
199 | throw new InvalidArgumentException(sprintf('Processor %s not configured.', $processorId)); |
|
200 | } |
|
201 | } |
|
202 | ||
203 | $class = $option['handler'] ?? StreamHandler::class; |
|
204 | unset($option['handler']); |
|
@@ 255-259 (lines=5) @@ | ||
252 | protected function formatChannels(array $channels = []) |
|
253 | { |
|
254 | foreach ($channels as $id => $option) { |
|
255 | foreach ($option['processors'] ?? [] as $processorId) { |
|
256 | if (!isset($this->processors[$processorId])) { |
|
257 | throw new InvalidArgumentException(sprintf('Processor %s not configured.', $processorId)); |
|
258 | } |
|
259 | } |
|
260 | ||
261 | foreach ($option['handlers'] ?? [] as $handlerId) { |
|
262 | if (!isset($this->handlers[$handlerId])) { |
|
@@ 261-265 (lines=5) @@ | ||
258 | } |
|
259 | } |
|
260 | ||
261 | foreach ($option['handlers'] ?? [] as $handlerId) { |
|
262 | if (!isset($this->handlers[$handlerId])) { |
|
263 | throw new InvalidArgumentException(sprintf('Handler %s not configured.', $handlerId)); |
|
264 | } |
|
265 | } |
|
266 | $channels[$id] = array_merge(['handlers' => [], 'processors' => []], $option); |
|
267 | } |
|
268 |