| 1 | <?php |
||
| 7 | abstract class Request implements RequestInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var array |
||
| 11 | */ |
||
| 12 | protected $data; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var array |
||
| 16 | */ |
||
| 17 | protected $options; |
||
| 18 | |||
| 19 | public function getHeaders() : array |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @return array |
||
| 26 | * @throws EncodeJsonException |
||
| 27 | */ |
||
| 28 | public function getBody() : array |
||
| 41 | } |
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.