Code Duplication    Length = 8-9 lines in 2 locations

src/Html.php 2 locations

@@ 278-286 (lines=9) @@
275
     *
276
     * @return \Spatie\Html\Elements\Select
277
     */
278
    public function multiselect($name = null, $options = [], $value = null)
279
    {
280
        return Select::create()
281
            ->attributeIf($name, 'name', $this->fieldName($name))
282
            ->attributeIf($name, 'id', $this->fieldName($name))
283
            ->options($options)
284
            ->value($name ? $this->old($name, $value) : $value)
285
            ->multiple();
286
    }
287
288
    /**
289
     * @param string|null $text
@@ 333-340 (lines=8) @@
330
     *
331
     * @return \Spatie\Html\Elements\Select
332
     */
333
    public function select($name = null, $options = [], $value = null)
334
    {
335
        return Select::create()
336
            ->attributeIf($name, 'name', $this->fieldName($name))
337
            ->attributeIf($name, 'id', $this->fieldName($name))
338
            ->options($options)
339
            ->value($name ? $this->old($name, $value) : $value);
340
    }
341
342
    /**
343
     * @param \Spatie\Html\HtmlElement|string|null $contents