Code Duplication    Length = 7-7 lines in 3 locations

src/Config.php 3 locations

@@ 229-235 (lines=7) @@
226
                throw new InvalidArgumentException(sprintf('Formatter %s not configured.', $option['formatter']));
227
            }
228
229
            if (isset($option['processors'])) {
230
                foreach ($option['processors'] as $processorId) {
231
                    if (!isset($this->processors[$processorId])) {
232
                        throw new InvalidArgumentException(sprintf('Processor %s not configured.', $processorId));
233
                    }
234
                }
235
            }
236
237
            $class = $option['handler'] ?? StreamHandler::class;
238
            unset($option['handler']);
@@ 281-287 (lines=7) @@
278
    protected function formatChannels(array $channels = [])
279
    {
280
        foreach ($channels as $id => $option) {
281
            if (isset($option['processors'])) {
282
                foreach ($option['processors'] as $processorId) {
283
                    if (!isset($this->processors[$processorId])) {
284
                        throw new InvalidArgumentException(sprintf('Processor %s not configured.', $processorId));
285
                    }
286
                }
287
            }
288
289
            if (isset($option['handlers'])) {
290
                foreach ($option['handlers'] as $handlerId) {
@@ 289-295 (lines=7) @@
286
                }
287
            }
288
289
            if (isset($option['handlers'])) {
290
                foreach ($option['handlers'] as $handlerId) {
291
                    if (!isset($this->handlers[$handlerId])) {
292
                        throw new InvalidArgumentException(sprintf('Handler %s not configured.', $handlerId));
293
                    }
294
                }
295
            }
296
            $channels[$id] = array_merge(['handlers' => [], 'processors' => []], $option);
297
        }
298