Code Duplication    Length = 12-12 lines in 2 locations

src/Formatter/AnsiFormatter.php 1 location

@@ 39-50 (lines=12) @@
36
     *
37
     * @param StyleSet $styleSet The style set to use.
38
     */
39
    public function __construct(StyleSet $styleSet = null)
40
    {
41
        $this->innerFormatter = new OutputFormatter(true);
42
43
        if (!$styleSet) {
44
            $styleSet = new DefaultStyleSet();
45
        }
46
47
        foreach ($styleSet->toArray() as $tag => $style) {
48
            $this->innerFormatter->setStyle($tag, StyleConverter::convert($style));
49
        }
50
    }
51
52
    /**
53
     * {@inheritdoc}

src/Formatter/PlainFormatter.php 1 location

@@ 39-50 (lines=12) @@
36
     *
37
     * @param StyleSet $styleSet The style set to use.
38
     */
39
    public function __construct(StyleSet $styleSet = null)
40
    {
41
        $this->innerFormatter = new OutputFormatter(false);
42
43
        if (!$styleSet) {
44
            $styleSet = new DefaultStyleSet();
45
        }
46
47
        foreach ($styleSet->toArray() as $tag => $style) {
48
            $this->innerFormatter->setStyle($tag, StyleConverter::convert($style));
49
        }
50
    }
51
52
    /**
53
     * {@inheritdoc}