Code Duplication    Length = 19-19 lines in 2 locations

src/Collection/AbstractCollection.php 2 locations

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