public function getCountryInfo()
    {
        $hierarchy = $this->getAddressHierarchy($this->address);

        foreach ($hierarchy as $location) {

            /**
             * @var LocationData $location
             */
            if ('country' == $location->getType()) {
                return $location;
            }
        }

        return null;
    }
public function getCountryInfo()
    {
        $hierarchy = $this->getAddressHierarchy($this->address);

        foreach ($hierarchy as $location) {

            /**
             * @var LocationData $location
             */
            if ('country' == $location->getType()) {
                return $location;
            }
        }

        return null;
    }
public function getCountryInfo ( ) { $ hierarchy = $ this -> getAddressHierarchy ( $ this -> address ) ; foreach ( $ hierarchy as $ location ) { /**
             * @var LocationData $location
             */ if ( 'country' == $ location -> getType ( ) ) { return $ location ; } } return null ; }
Gets the country info.

@return LocationData|null Country info
Gets the country info .