Code Duplication    Length = 10-14 lines in 2 locations

src/BaseElement.php 2 locations

@@ 178-191 (lines=14) @@
175
     *
176
     * @return static
177
     */
178
    public function addChildren($children, $mapper = null)
179
    {
180
        if (is_null($children)) {
181
            return $this;
182
        }
183
184
        $children = $this->parseChildren($children, $mapper);
185
186
        $element = clone $this;
187
188
        $element->children = $element->children->merge($children);
189
190
        return $element;
191
    }
192
193
    /**
194
     * Alias for `addChildren`.
@@ 255-264 (lines=10) @@
252
     *
253
     * @return static
254
     */
255
    public function prependChildren($children, $mapper = null)
256
    {
257
        $children = $this->parseChildren($children, $mapper);
258
259
        $element = clone $this;
260
261
        $element->children = $children->merge($element->children);
262
263
        return $element;
264
    }
265
266
    /**
267
     * Alias for `prependChildren`.