Code Duplication    Length = 14-14 lines in 2 locations

src/Collection/AbstractCollection.php 2 locations

@@ 135-148 (lines=14) @@
132
     * @return static
133
     *                <p>(Mutable) Return this Arrayy object, with the prepended value.</p>
134
     */
135
    public function prepend($value, $key = null): Arrayy
136
    {
137
        if ($value instanceof static) {
138
            foreach ($value as $valueTmp) {
139
                parent::prepend($valueTmp, $key);
140
            }
141
142
            return $this;
143
        }
144
145
        $this->checkTypeWrapper($value);
146
147
        return parent::prepend($value, $key);
148
    }
149
150
    /**
151
     * Append a (key) + value to the current array.
@@ 159-172 (lines=14) @@
156
     * @return static
157
     *                <p>(Mutable) Return this Arrayy object, with the appended values.</p>
158
     */
159
    public function append($value, $key = null): Arrayy
160
    {
161
        if ($value instanceof static) {
162
            foreach ($value as $valueTmp) {
163
                parent::append($valueTmp, $key);
164
            }
165
166
            return $this;
167
        }
168
169
        $this->checkTypeWrapper($value);
170
171
        return parent::append($value, $key);
172
    }
173
174
    /**
175
     * Returns the values from given property or method.