Code Duplication    Length = 14-14 lines in 2 locations

src/Collection/AbstractCollection.php 2 locations

@@ 125-138 (lines=14) @@
122
     * @return static
123
     *                <p>(Mutable) Return this Arrayy object, with the prepended value.</p>
124
     */
125
    public function prepend($value, $key = null): Arrayy
126
    {
127
        if ($value instanceof static) {
128
            foreach ($value as $valueTmp) {
129
                parent::prepend($valueTmp, $key);
130
            }
131
132
            return $this;
133
        }
134
135
        $this->checkTypeWrapper($value);
136
137
        return parent::prepend($value, $key);
138
    }
139
140
    /**
141
     * Append a (key) + value to the current array.
@@ 149-162 (lines=14) @@
146
     * @return static
147
     *                <p>(Mutable) Return this Arrayy object, with the appended values.</p>
148
     */
149
    public function append($value, $key = null): Arrayy
150
    {
151
        if ($value instanceof static) {
152
            foreach ($value as $valueTmp) {
153
                parent::append($valueTmp, $key);
154
            }
155
156
            return $this;
157
        }
158
159
        $this->checkTypeWrapper($value);
160
161
        return parent::append($value, $key);
162
    }
163
164
    /**
165
     * Returns the values from given property or method.