| Conditions | 6 |
| Paths | 5 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 42 |
| Changes | 0 | ||
| 1 | <?php |
||
| 53 | protected function isOptionSelected($value, $selectedValue): bool |
||
| 54 | { |
||
| 55 | if (is_null($selectedValue)) { |
||
| 56 | return false; |
||
| 57 | } |
||
| 58 | if ($selectedValue === 0 or $value === 0) { |
||
| 59 | if ($value === $selectedValue) { |
||
| 60 | return true; |
||
| 61 | } |
||
| 62 | } elseif ($selectedValue == $value) { |
||
| 63 | return true; |
||
| 64 | } |
||
| 65 | return false; |
||
| 66 | } |
||
| 68 |
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.