src/DivisionCode/DivisionCode.php
public function getCity($code): string
    {
        $provinceCode = substr($code, 0, 2) . '0000';
        $cityCode = substr($code, 0, 4) . '00';
        if ($provinceCode != $cityCode) {
            return $this->get($cityCode);
        }

        return '';
    }
public function getCity($code): string
    {
        $provinceCode = substr($code, 0, 2) . '0000';
        $cityCode = substr($code, 0, 4) . '00';
        if ($provinceCode != $cityCode) {
            return $this->get($cityCode);
        }

        return '';
    }
public function getCity ( $ code ) : string { $ provinceCode = substr ( $ code , 0 , 2 ) . '0000' ; $ cityCode = substr ( $ code , 0 , 4 ) . '00' ; if ( $ provinceCode != $ cityCode ) { return $ this -> get ( $ cityCode ) ; } return '' ; }
Get the city by code

@param  string|int $code
@return string
Get the city by code