| Conditions | 4 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 56 | private static function extractReplyReview(array $reviewData): ?ReplyReview |
||
| 57 | { |
||
| 58 | if (isset($reviewData[7][1])) { |
||
| 59 | $replyText = $reviewData[7][1]; |
||
| 60 | $replyDate = DateStringFormatter::unixTimeToDateTime($reviewData[7][2][0]); |
||
| 61 | if ($replyText && $reviewData) { |
||
|
|
|||
| 62 | return new ReplyReview( |
||
| 63 | $replyDate, |
||
| 64 | $replyText |
||
| 65 | ); |
||
| 66 | } |
||
| 67 | } |
||
| 68 | return null; |
||
| 69 | } |
||
| 71 |
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.