| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2.7938 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 47 | 2 | protected function multiple() |
|
| 48 | { |
||
| 49 | 2 | $html = ''; |
|
| 50 | 2 | $radio = clone($this); |
|
| 51 | 2 | foreach ($this->options as $value => $label) { |
|
| 52 | $this->attribs['value'] = $value; |
||
| 53 | $this->attribs['label'] = $label; |
||
| 54 | $html .= $radio(array( |
||
| 55 | 'name' => $this->name, |
||
| 56 | 'value' => $this->value, |
||
| 57 | 'attribs' => $this->attribs |
||
| 58 | )); |
||
| 59 | } |
||
| 60 | 2 | return $html; |
|
| 61 | } |
||
| 62 | } |
||
| 63 |
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.