| 1 | <?php |
||
| 17 | class EmailAssertionFailedException extends \Exception { |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param string $message |
||
| 21 | * @param EmailMatcher[] $matchers |
||
| 22 | */ |
||
| 23 | public function __construct($message, $matchers) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param EmailMatcher[] $matchers |
||
| 31 | * |
||
| 32 | * @return string |
||
| 33 | */ |
||
| 34 | protected function describeMatchers($matchers) |
||
| 44 | |||
| 45 | } |
||
| 46 |
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.