original_string: protected function getAddressZoneId(array $address)
      {
          $result = array();
  
          foreach (array('state_id', 'city_id', 'country') as $field) {
  
              if (empty($address[$field])) {
                  continue;
              }
  
              if ($field === 'city_id') {
                  $data = $this->city->get($address[$field]);
              } else if ($field === 'state_id') {
                  $data = $this->state->get($address[$field]);
              } else if ($field === 'country') {
                  $data = $this->country->get($address[$field]);
              }
  
              if (!empty($data['zone_id'])) {
                  $result[] = $data['zone_id'];
              }
          }
  
          return $result;
      }
code: protected function getAddressZoneId(array $address)
      {
          $result = array();
  
          foreach (array('state_id', 'city_id', 'country') as $field) {
  
              if (empty($address[$field])) {
                  continue;
              }
  
              if ($field === 'city_id') {
                  $data = $this->city->get($address[$field]);
              } else if ($field === 'state_id') {
                  $data = $this->state->get($address[$field]);
              } else if ($field === 'country') {
                  $data = $this->country->get($address[$field]);
              }
  
              if (!empty($data['zone_id'])) {
                  $result[] = $data['zone_id'];
              }
          }
  
          return $result;
      }
code_tokens: protected function getAddressZoneId ( array $ address ) { $ result = array ( ) ; foreach ( array ( 'state_id' , 'city_id' , 'country' ) as $ field ) { if ( empty ( $ address [ $ field ] ) ) { continue ; } if ( $ field === 'city_id' ) { $ data = $ this -> city -> get ( $ address [ $ field ] ) ; } else if ( $ field === 'state_id' ) { $ data = $ this -> state -> get ( $ address [ $ field ] ) ; } else if ( $ field === 'country' ) { $ data = $ this -> country -> get ( $ address [ $ field ] ) ; } if ( ! empty ( $ data [ 'zone_id' ] ) ) { $ result [ ] = $ data [ 'zone_id' ] ; } } return $ result ; }
docstring: Returns an array of zone IDs from address components
  @param array $address
  @return array
docstring_tokens: Returns an array of zone IDs from address components