Conditions | 8 |
Paths | 26 |
Total Lines | 34 |
Code Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 8 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | 1 | public function renderRow($element) |
|
13 | { |
||
14 | 1 | $return = ''; |
|
15 | 1 | if (!$element->isRendered()) { |
|
16 | 1 | if ($element->hasCustomRenderer()) { |
|
17 | return $element->render(); |
||
18 | 1 | } |
|
19 | |||
20 | $return .= '<div class="form-group row row-'.$element->getUniqueId().($element->isError() ? ' has-error' : '').'">'; |
||
21 | |||
22 | $renderLabel = $element->getOption('render_label'); |
||
|
|||
23 | if ($renderLabel !== false) { |
||
24 | $return .= $this->renderLabel($element); |
||
25 | } |
||
26 | |||
27 | $class = ''; |
||
28 | if ($this->getForm()->hasClass('form-horizontal')) { |
||
29 | $class = $element->getType() == 'checkbox' ? 'col-sm-offset-3 col-sm-9' : 'col-sm-9'; |
||
30 | } |
||
31 | |||
32 | $return .= '<div class="'.$class.'">'; |
||
33 | $return .= $this->renderElement($element); |
||
34 | |||
35 | $helpBlock = $element->getOption('form-help'); |
||
36 | if ($helpBlock) { |
||
37 | $return .= '<span class="help-block">'.$helpBlock.'</span>'; |
||
38 | } |
||
39 | |||
40 | $return .= $element->renderErrors(); |
||
41 | $return .= '</div>'; |
||
42 | $return .= '</div>'; |
||
43 | } |
||
44 | |||
45 | return $return; |
||
46 | } |
||
75 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.