Code Duplication    Length = 8-9 lines in 2 locations

src/Html.php 2 locations

@@ 235-243 (lines=9) @@
232
     *
233
     * @return \Spatie\Html\Elements\Select
234
     */
235
    public function multiselect($name = null, $options = [], $value = null)
236
    {
237
        return Select::create()
238
            ->attributeIf($name, 'name', $this->fieldName($name))
239
            ->attributeIf($name, 'id', $this->fieldName($name))
240
            ->options($options)
241
            ->value($name ? $this->old($name, $value) : $value)
242
            ->multiple();
243
    }
244
245
    /**
246
     * @param string|null $text
@@ 290-297 (lines=8) @@
287
     *
288
     * @return \Spatie\Html\Elements\Select
289
     */
290
    public function select($name = null, $options = [], $value = null)
291
    {
292
        return Select::create()
293
            ->attributeIf($name, 'name', $this->fieldName($name))
294
            ->attributeIf($name, 'id', $this->fieldName($name))
295
            ->options($options)
296
            ->value($name ? $this->old($name, $value) : $value);
297
    }
298
299
    /**
300
     * @param \Spatie\Html\HtmlElement|string|null $contents