Code Duplication    Length = 4-4 lines in 2 locations

DependencyInjection/Compiler/CustomHandlersPass.php 1 location

@@ 77-80 (lines=4) @@
74
        $container->findDefinition('jms_serializer.handler_registry')
75
            ->addArgument($handlers);
76
77
        if (class_exists(ServiceLocatorTagPass::class)) {
78
            $serviceLocator = ServiceLocatorTagPass::register($container, $handlerServices);
79
            $container->getDefinition('jms_serializer.handler_registry')->replaceArgument(0, $serviceLocator);
80
        }
81
    }
82
}
83

DependencyInjection/Compiler/RegisterEventListenersAndSubscribersPass.php 1 location

@@ 82-85 (lines=4) @@
79
                ->addMethodCall('setListeners', array($listeners));
80
        }
81
82
        if (class_exists(ServiceLocatorTagPass::class)) {
83
            $serviceLocator = ServiceLocatorTagPass::register($container, $listenerServices);
84
            $container->getDefinition('jms_serializer.event_dispatcher')->replaceArgument(0, $serviceLocator);
85
        }
86
    }
87
}
88