Radio::render()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 5
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 8
rs 10
1
<?php
2
3
namespace GeminiLabs\Castor\Forms\Fields;
4
5
class Radio extends Base
6
{
7
    protected $multi = true;
8
    protected $element = 'input';
9
10
    /**
11
     * @return string
12
     */
13
    public function render($default = null)
14
    {
15
        $inline = $this->args['inline'] ? ' class="inline"' : '';
16
17
        return sprintf('<ul%s>%s</ul>%s',
18
            $inline,
19
            $this->implodeOptions('multi_input', $default),
20
            $this->generateDescription()
21
        );
22
    }
23
}
24