Code Duplication    Length = 11-11 lines in 2 locations

src/Array2ObjectBuilder.php 1 location

@@ 170-180 (lines=11) @@
167
     *
168
     * @return $this
169
     */
170
    public function setParsers($parsers)
171
    {
172
        $this->parsers = [];
173
        foreach ($parsers as $parser) {
174
            if ($parser instanceof ValueParserInterface) {
175
                $this->parsers[$parser->getName()] = $parser;
176
            }
177
        }
178
179
        return $this;
180
    }
181
182
    /**
183
     * @return PropertyMatcherInterface

src/Array2ObjectContext.php 1 location

@@ 49-59 (lines=11) @@
46
     *
47
     * @return $this
48
     */
49
    public function setParsers($parsers)
50
    {
51
        $this->parsers = [];
52
        foreach ($parsers as $parser) {
53
            if ($parser instanceof ValueParserInterface) {
54
                $this->parsers[$parser->getName()] = $parser;
55
            }
56
        }
57
58
        return $this;
59
    }
60
61
    /**
62
     * Append parser to the list of parsers, LOW priority