public function setCity(City $city): void
    {
        $this->city = $city->getName();
        $this->postCode = $city->getPostCode();
    }
public function setCity(City $city): void
    {
        $this->city = $city->getName();
        $this->postCode = $city->getPostCode();
    }
public function setCity ( City $ city ) : void { $ this -> city = $ city -> getName ( ) ; $ this -> postCode = $ city -> getPostCode ( ) ; }
Set the value of post code and city through a City instance.

@param City $city
Set the value of post code and city through a City instance .