Code Duplication    Length = 19-19 lines in 2 locations

src/Collection/AbstractCollection.php 2 locations

@@ 111-129 (lines=19) @@
108
    /**
109
     * {@inheritdoc}
110
     */
111
    public function append($value, $key = null): Arrayy
112
    {
113
        if (
114
            $value instanceof self
115
            &&
116
            !$value instanceof TypeInterface
117
        ) {
118
            foreach ($value as $valueTmp) {
119
                parent::append($valueTmp, $key);
120
            }
121
122
            return $this;
123
        }
124
125
        $return = parent::append($value, $key);
126
        $this->array = $return->array;
127
128
        return $this;
129
    }
130
131
    /**
132
     * {@inheritdoc}
@@ 154-172 (lines=19) @@
151
    /**
152
     * {@inheritdoc}
153
     */
154
    public function prepend($value, $key = null): Arrayy
155
    {
156
        if (
157
            $value instanceof self
158
            &&
159
            !$value instanceof TypeInterface
160
        ) {
161
            foreach ($value as $valueTmp) {
162
                parent::prepend($valueTmp, $key);
163
            }
164
165
            return $this;
166
        }
167
168
        $return = parent::prepend($value, $key);
169
        $this->array = $return->array;
170
171
        return $this;
172
    }
173
174
    /**
175
     * {@inheritdoc}