| @@ -16,9 +16,8 @@ | ||
| 16 | 16 | * |
| 17 | 17 | * @package Packetery\Validator |
| 18 | 18 | */ |
| 19 | 19 | class Address { |
| 20 | - | |
| 21 | 20 | /** |
| 22 | 21 | * Validates data needed to instantiate. |
| 23 | 22 | * |
| 24 | 23 | * @param Entity\Address $address Address entity. |
| @@ -25,9 +24,7 @@ | ||
| 25 | 24 | * |
| 26 | 25 | * @return bool |
| 27 | 26 | */ |
| 28 | 27 | public function validate( Entity\Address $address ): bool { |
| 29 | - return ( $address->getStreet() && $address->getCity() && $address->getZip() ); | |
| 28 | + return ( $address->getStreet() !== null && $address->getCity() !== null && $address->getZip() !== null ); | |
| 30 | 29 | } |
| 31 | - | |
| 32 | - | |
| 33 | 30 | } |