user_id); } /** * @return string */ public function getDisplayAddress(): string { $parts = []; $fields = ["address_1", "address_2", "city", "county", "postal_code", "state", "country"]; foreach($fields as $field) { $parts[] = $this->$field; } return implode(", ", array_filter($parts)); } /** * @return array */ public function getGeolocation(): array { return [$this->latitude, $this->longitude]; } }