| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | 3 | public function generateElement() |
|
| 9 | { |
||
| 10 | 3 | $this->getElement()->addClass('form-check-input'); |
|
| 11 | |||
| 12 | 3 | $class = get_class($this->getRenderer()) == Nip_Form_Renderer_Bootstrap::class ? 'radio' : 'form-check'; |
|
| 13 | 3 | $return = '<div class="' . $class . '">'; |
|
| 14 | 3 | $return .= '<label class="form-check-label">'; |
|
| 15 | 3 | $return .= parent::generateElement(); |
|
| 16 | 3 | $return .= $this->getElement()->getLabel(); |
|
| 17 | 3 | $return .= '</label>'; |
|
| 18 | 3 | $return .= '</div>'; |
|
| 19 | |||
| 20 | 3 | return $return; |
|
| 21 | } |
||
| 39 |