src/Models/Address.php
public function getArray()
    {
        $address = $two = [];

        $two[] = $this->post_code ?: '';
        $two[] = $this->city      ?: '';
        $two[] = $this->state     ? '('. $this->state .')' : '';

        $address[] = $this->street       ?: '';
        $address[] = $this->street_extra ?: '';
        $address[] = implode(' ', array_filter($two));
        $address[] = $this->country_name ?: '';

        if (count($address = array_filter($address)) > 0)
            return $address;

        return null;
    }
public function getArray()
    {
        $address = $two = [];

        $two[] = $this->post_code ?: '';
        $two[] = $this->city      ?: '';
        $two[] = $this->state     ? '('. $this->state .')' : '';

        $address[] = $this->street       ?: '';
        $address[] = $this->street_extra ?: '';
        $address[] = implode(' ', array_filter($two));
        $address[] = $this->country_name ?: '';

        if (count($address = array_filter($address)) > 0)
            return $address;

        return null;
    }
public function getArray ( ) { $ address = $ two = [ ] ; $ two [ ] = $ this -> post_code ? : '' ; $ two [ ] = $ this -> city ? : '' ; $ two [ ] = $ this -> state ? '(' . $ this -> state . ')' : '' ; $ address [ ] = $ this -> street ? : '' ; $ address [ ] = $ this -> street_extra ? : '' ; $ address [ ] = implode ( ' ' , array_filter ( $ two ) ) ; $ address [ ] = $ this -> country_name ? : '' ; if ( count ( $ address = array_filter ( $ address ) ) > 0 ) return $ address ; return null ; }
Get the address as array.

@return array
Get the address as array .