Code Duplication    Length = 10-10 lines in 2 locations

src/Traits/CommonMutableContainerTrait.php 2 locations

@@ 121-130 (lines=10) @@
118
     * {@inheritDoc}
119
     * @return $this
120
     */
121
    public function concat($iterable)
122
    {
123
        if (!is_array($iterable) && !$iterable instanceof \Traversable) {
124
            throw new \InvalidArgumentException('The items must be an array or Traversable');
125
        }
126
127
        $this->setAll($this->concatRecurse($this, $iterable));
128
129
        return $this;
130
    }
131
132
    /**
133
     * {@inheritDoc}
@@ 136-145 (lines=10) @@
133
     * {@inheritDoc}
134
     * @return $this
135
     */
136
    public function replace($iterable)
137
    {
138
        if (!is_array($iterable) && !$iterable instanceof \Traversable) {
139
            throw new \InvalidArgumentException('The items must be an array or Traversable');
140
        }
141
142
        $this->setAll($this->concatRecurse($this, $iterable));
143
144
        return $this;
145
    }
146
147
    private function replaceRecurse($array, $array1)
148
    {