Example #1
0
 /**
  * Gets address from location if it exists or creates if it doesn't
  *
  * @param Place $location
  *
  * @return PostalAddress
  */
 private function getOrCreatePostalAddress(Place $location)
 {
     $address = $location->getAddress();
     if (!$address) {
         $address = new PostalAddress();
     }
     return $address;
 }