Code Duplication    Length = 8-9 lines in 2 locations

src/Html.php 2 locations

@@ 343-351 (lines=9) @@
340
     *
341
     * @return \Spatie\Html\Elements\Select
342
     */
343
    public function multiselect($name = null, $options = [], $value = null)
344
    {
345
        return Select::create()
346
            ->attributeIf($name, 'name', $this->fieldName($name))
347
            ->attributeIf($name, 'id', $this->fieldName($name))
348
            ->options($options)
349
            ->value($name ? $this->old($name, $value) : $value)
350
            ->multiple();
351
    }
352
353
    /**
354
     * @param string|null $name
@@ 417-424 (lines=8) @@
414
     *
415
     * @return \Spatie\Html\Elements\Select
416
     */
417
    public function select($name = null, $options = [], $value = null)
418
    {
419
        return Select::create()
420
            ->attributeIf($name, 'name', $this->fieldName($name))
421
            ->attributeIf($name, 'id', $this->fieldName($name))
422
            ->options($options)
423
            ->value($name ? $this->old($name, $value) : $value);
424
    }
425
426
    /**
427
     * @param \Spatie\Html\HtmlElement|string|null $contents