示例#1
0
 /**
  * Transforms an object to a string (id).
  *
  * @param  City|null $city
  * @return string
  */
 public function transform($city)
 {
     if (null === $city) {
         return '';
     }
     return $city->getId();
 }