| Total Complexity | 5 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class Nip_Form_Renderer_Elements_RadioGroup extends Nip_Form_Renderer_Elements_Input_Group |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @return string |
||
| 12 | */ |
||
| 13 | 5 | public function generateElement() |
|
| 14 | { |
||
| 15 | 5 | $this->checkDefaultValue(); |
|
| 16 | |||
| 17 | 5 | return parent::generateElement(); |
|
| 18 | } |
||
| 19 | |||
| 20 | 5 | protected function checkDefaultValue() |
|
| 27 | } |
||
| 28 | } |
||
| 31 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)or! empty(...)instead.