Code Duplication    Length = 11-11 lines in 2 locations

src/AbstractBuilder.php 1 location

@@ 159-169 (lines=11) @@
156
     *
157
     * @return $this
158
     */
159
    public function setParsers($parsers)
160
    {
161
        $this->parsers = [];
162
        foreach ($parsers as $parser) {
163
            if ($parser instanceof ValueParserInterface) {
164
                $this->parsers[$parser->getName()] = $parser;
165
            }
166
        }
167
168
        return $this;
169
    }
170
171
    /**
172
     * @return PropertyMatcherInterface

src/AbstractContext.php 1 location

@@ 40-50 (lines=11) @@
37
     *
38
     * @return $this
39
     */
40
    public function setParsers($parsers)
41
    {
42
        $this->parsers = [];
43
        foreach ($parsers as $parser) {
44
            if ($parser instanceof ValueParserInterface) {
45
                $this->parsers[$parser->getName()] = $parser;
46
            }
47
        }
48
49
        return $this;
50
    }
51
52
    /**
53
     * Append parser to the list of parsers, LOW priority