generateElement()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 16
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 16
ccs 0
cts 10
cp 0
rs 9.9
cc 2
nc 2
nop 0
crap 6
1
<?php
2
3
class Nip_Form_Renderer_Elements_Timeselect extends Nip_Form_Renderer_Elements_MultiElement
4
{
5
    public function generateElement()
6
    {
7
        $return = '<div class="row">';
8
9
        $elements = $this->getElement()->getElements();
10
        foreach ($elements as $key=>$element) {
11
            $element->addClass('form-control');
12
            $returnElements[] =
13
                    '<div class="col-xs-4" style="max-width: 100px;">' .
14
                        $element->render() .
15
                    '</div>';
16
        }
17
18
        $return .= implode('', $returnElements);
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $returnElements seems to be defined by a foreach iteration on line 10. Are you sure the iterator is never empty, otherwise this variable is not defined?
Loading history...
19
        $return .= '</div>';
20
        return $return;
21
    }
22
}
23