Code Duplication    Length = 6-6 lines in 2 locations

DependencyInjection/HttplugExtension.php 2 locations

@@ 237-242 (lines=6) @@
234
            throw new \LogicException('A http client can\'t be decorated with both FlexibleHttpClient and HttpMethodsClient. Only one of the following options can be true. ("flexible_client", "add_http_methods")');
235
        }
236
237
        if ($arguments['flexible_client']) {
238
            $container->register($serviceId.'.flexible', FlexibleHttpClient::class)
239
                ->addArgument(new Reference($serviceId.'.flexible.inner'))
240
                ->setPublic(false)
241
                ->setDecoratedService($serviceId);
242
        }
243
244
        if ($arguments['add_http_methods']) {
245
            $container->register($serviceId.'.http_methods', HttpMethodsClient::class)
@@ 244-249 (lines=6) @@
241
                ->setDecoratedService($serviceId);
242
        }
243
244
        if ($arguments['add_http_methods']) {
245
            $container->register($serviceId.'.http_methods', HttpMethodsClient::class)
246
                ->setArguments([new Reference($serviceId.'.http_methods.inner'), new Reference('httplug.message_factory')])
247
                ->setPublic(false)
248
                ->setDecoratedService($serviceId);
249
        }
250
    }
251
}
252