Passed
Push — master ( 8bd4b7...6113e5 )
by Reza
03:27
created

Select   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 6
c 1
b 0
f 1
dl 0
loc 12
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 9 2
1
<?php
2
3
namespace EasyPanel\Parsers\HTMLInputs;
4
5
class Select
6
{
7
8
    public function handle($name, $values)
9
    {
10
        $string = '';
11
        foreach ($values as $key => $value) {
12
            $string .= "<option value='$key'>$value</option>\n                    ";
13
        }
14
15
        return "<select wire:model='$name' class=\"form-control @error('$name') is-invalid @enderror\" id='input$name'>
16
                    $string
17
                </select>";
18
    }
19
}
20