| 1 | <?php |
||
| 21 | class PositiveAssertionRunner extends AssertionRunner { |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param Email[] $matched_mails |
||
| 25 | * @param EmailMatcher[] $matchers |
||
| 26 | * |
||
| 27 | * @return void |
||
| 28 | * @throws \Ingenerator\Mailhook\EmailAssertionFailedException |
||
| 29 | */ |
||
| 30 | protected function do_assert($matched_mails, $matchers) |
||
| 37 | } |
||
| 38 |
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.