Code Duplication    Length = 10-14 lines in 2 locations

src/BaseElement.php 2 locations

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