Code Duplication    Length = 14-14 lines in 3 locations

src/ContainerInteropLoggerFactory.php 3 locations

@@ 118-131 (lines=14) @@
115
        }, $processors);
116
    }
117
118
    protected function resolveHandler(string $handlerName) : HandlerInterface
119
    {
120
        $handler = $this->resolveFromContainer($handlerName);
121
122
        if (null === $handler) {
123
            throw InvalidContainerServiceException::forUnresolved('handler', $handlerName);
124
        }
125
126
        if (! $handler instanceof HandlerInterface) {
127
            throw InvalidContainerServiceException::forInvalid('handler', $handlerName, HandlerInterface::class);
128
        }
129
130
        return $handler;
131
    }
132
133
    protected function resolveFormatter(string $formatterName) : FormatterInterface
134
    {
@@ 133-146 (lines=14) @@
130
        return $handler;
131
    }
132
133
    protected function resolveFormatter(string $formatterName) : FormatterInterface
134
    {
135
        $formatter = $this->resolveFromContainer($formatterName);
136
137
        if (null === $formatter) {
138
            throw InvalidContainerServiceException::forUnresolved('formatter', $formatterName);
139
        }
140
141
        if (! $formatter instanceof FormatterInterface) {
142
            throw InvalidContainerServiceException::forInvalid('formatter', $formatterName, FormatterInterface::class);
143
        }
144
145
        return $formatter;
146
    }
147
148
    protected function resolveProcessor(string $processorName) : callable
149
    {
@@ 148-161 (lines=14) @@
145
        return $formatter;
146
    }
147
148
    protected function resolveProcessor(string $processorName) : callable
149
    {
150
        $processor = $this->resolveFromContainer($processorName);
151
152
        if (null === $processor) {
153
            throw InvalidContainerServiceException::forUnresolved('processor', $processorName);
154
        }
155
156
        if (! is_callable($processor)) {
157
            throw InvalidContainerServiceException::forInvalid('processor', $processorName, 'callable');
158
        }
159
160
        return $processor;
161
    }
162
163
    final protected function resolveFromContainer(string $serviceOrFactory)
164
    {