Code Duplication    Length = 10-11 lines in 2 locations

src/Factory/Factory.php 1 location

@@ 19-28 (lines=10) @@
16
     */
17
    protected $metadataStore;
18
19
    public function __construct(
20
        array $configs,
21
        EventDispatcherInterface $dispatcher = null,
22
        CallbackFactoryInterface $callbackFactory = null,
23
        MetadataStoreInterface   $metadataStore = null
24
    ) {
25
        parent::__construct($configs, $dispatcher, $callbackFactory);
26
27
        $this->metadataStore = $metadataStore;
28
    }
29
30
    /**
31
     * {@inheritcoc}.

src/StateMachine/StateMachine.php 1 location

@@ 25-35 (lines=11) @@
22
     *
23
     * @param \Sebdesign\SM\Metadata\MetadataStoreInterface|null $metadataStore
24
     */
25
    public function __construct(
26
        $object,
27
        array $config,
28
        EventDispatcherInterface $dispatcher = null,
29
        CallbackFactoryInterface $callbackFactory = null,
30
        MetadataStoreInterface   $metadataStore = null
31
    ) {
32
        parent::__construct($object, $config, $dispatcher, $callbackFactory);
33
34
        $this->metadataStore = $metadataStore ?: new MetadataStore($config);
35
    }
36
37
    /**
38
     * Set a new state to the underlying object.