Code Duplication    Length = 12-12 lines in 2 locations

src/Service/XmlExtractor.php 1 location

@@ 30-41 (lines=12) @@
27
    /**
28
     * @param array $options
29
     */
30
    public function __construct(array $options)
31
    {
32
        if (!isset($options['file']) || empty($options['file'])) {
33
            throw new \InvalidArgumentException('XML file path is missing');
34
        }
35
36
        if (! file_exists($options['file'])) {
37
            throw new \InvalidArgumentException('XML file is missing');
38
        }
39
40
        $this->file = $options['file'];
41
    }
42
43
    /**
44
     * {@inheritdoc}

src/Service/YamlExtractor.php 1 location

@@ 31-42 (lines=12) @@
28
    /**
29
     * @param array $options
30
     */
31
    public function __construct(array $options)
32
    {
33
        if (empty($options['file'])) {
34
            throw new \InvalidArgumentException('YAML file path missing');
35
        }
36
37
        if (!file_exists($options['file'])) {
38
            throw new \InvalidArgumentException('YAML file missing');
39
        }
40
41
        $this->file = $options['file'];
42
    }
43
44
    /**
45
     * {@inheritdoc}