Code Duplication    Length = 8-9 lines in 2 locations

src/Html.php 2 locations

@@ 324-332 (lines=9) @@
321
     *
322
     * @return \Spatie\Html\Elements\Select
323
     */
324
    public function multiselect($name = null, $options = [], $value = null)
325
    {
326
        return Select::create()
327
            ->attributeIf($name, 'name', $this->fieldName($name))
328
            ->attributeIf($name, 'id', $this->fieldName($name))
329
            ->options($options)
330
            ->value($name ? $this->old($name, $value) : $value)
331
            ->multiple();
332
    }
333
334
    /**
335
     * @param string|null $name
@@ 396-403 (lines=8) @@
393
     *
394
     * @return \Spatie\Html\Elements\Select
395
     */
396
    public function select($name = null, $options = [], $value = null)
397
    {
398
        return Select::create()
399
            ->attributeIf($name, 'name', $this->fieldName($name))
400
            ->attributeIf($name, 'id', $this->fieldName($name))
401
            ->options($options)
402
            ->value($name ? $this->old($name, $value) : $value);
403
    }
404
405
    /**
406
     * @param \Spatie\Html\HtmlElement|string|null $contents