| 1 | <?php |
||
| 8 | abstract class Request implements RequestInterface |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var array |
||
| 12 | */ |
||
| 13 | protected $data; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var array |
||
| 17 | */ |
||
| 18 | protected $options; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @return array |
||
| 22 | * @throws EncodeJsonException |
||
| 23 | */ |
||
| 24 | 1 | public function getBody() : array |
|
| 37 | |||
| 38 | 1 | public function getResponseClass(): string |
|
| 42 | } |
||
| 43 |
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.