Code Duplication    Length = 9-9 lines in 2 locations

src/Persister/InPlacePagerPersister.php 1 location

@@ 34-42 (lines=9) @@
31
     * @param PersisterRegistry $registry
32
     * @param EventDispatcherInterface $dispatcher
33
     */
34
    public function __construct(PersisterRegistry $registry, EventDispatcherInterface $dispatcher)
35
    {
36
        $this->registry = $registry;
37
        $this->dispatcher = $dispatcher;
38
39
        if (class_exists(LegacyEventDispatcherProxy::class)) {
40
            $this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher);
41
        }
42
    }
43
44
    /**
45
     * {@inheritdoc}

src/Transformer/ModelToElasticaAutoTransformer.php 1 location

@@ 55-63 (lines=9) @@
52
     * @param array                    $options
53
     * @param EventDispatcherInterface $dispatcher
54
     */
55
    public function __construct(array $options = [], EventDispatcherInterface $dispatcher = null)
56
    {
57
        $this->options = array_merge($this->options, $options);
58
        $this->dispatcher = $dispatcher;
59
60
        if (class_exists(LegacyEventDispatcherProxy::class)) {
61
            $this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher);
62
        }
63
    }
64
65
    /**
66
     * Set the PropertyAccessor.