<?php

class Location {

    public $number = "";
    public $streetname = "";

    /**
     *
     * @var string Number and street name.
     */
    public $street = "";
    public $unit = "";
    public $city = "";
    public $state = "";
    public $zip = "";
    public $country = "";
    public $latitude = false;
    public $longitude = false;

    public function hasAddress(): bool {
        return ($number . $streetname . $street . $city . $state . $zip . $country != "");
    }

    public function hasCoordinates(): bool {
        return ($latitude !== false && $longitude !== false);
    }

}
