App\Libraries\Utils::cityStateZip PHP Метод

cityStateZip() публичный статический Метод

public static cityStateZip ( $city, $state, $postalCode, $swap )
    public static function cityStateZip($city, $state, $postalCode, $swap)
    {
        $str = $city;
        if ($state) {
            if ($str) {
                $str .= ', ';
            }
            $str .= $state;
        }
        if ($swap) {
            return $postalCode . ' ' . $str;
        } else {
            return $str . ' ' . $postalCode;
        }
    }