| 1 | <?php |
||
| 10 | class UserDAO extends DAO { |
||
| 11 | |||
| 12 | const TABLE = 'user'; |
||
| 13 | const ALIAS = 'Usuário'; |
||
| 14 | |||
| 15 | /** @var User */ |
||
| 16 | protected $obj; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param array $row |
||
| 20 | * @return \User\User |
||
| 21 | */ |
||
| 22 | public function mapObject(array $row) { |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param User $obj |
||
| 34 | * @return mixed[] |
||
| 35 | */ |
||
| 36 | public function mapRow($obj) { |
||
| 42 | |||
| 43 | } |
||
| 44 |
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.