original_string: protected function checkZoneIdByAddressId($condition, $data, $key)
      {
          $address = $this->address->get($data['data']['order'][$key]);
  
          if (empty($address)) {
              return false;
          }
  
          $fields = array('country_zone_id', 'state_zone_id', 'city_zone_id');
  
          $ids = array();
  
          foreach ($fields as $field) {
              $ids[] = $address[$field];
          }
  
          return $this->compare($ids, $condition['value'], $condition['operator']);
      }
code: protected function checkZoneIdByAddressId($condition, $data, $key)
      {
          $address = $this->address->get($data['data']['order'][$key]);
  
          if (empty($address)) {
              return false;
          }
  
          $fields = array('country_zone_id', 'state_zone_id', 'city_zone_id');
  
          $ids = array();
  
          foreach ($fields as $field) {
              $ids[] = $address[$field];
          }
  
          return $this->compare($ids, $condition['value'], $condition['operator']);
      }
code_tokens: protected function checkZoneIdByAddressId ( $ condition , $ data , $ key ) { $ address = $ this -> address -> get ( $ data [ 'data' ] [ 'order' ] [ $ key ] ) ; if ( empty ( $ address ) ) { return false ; } $ fields = array ( 'country_zone_id' , 'state_zone_id' , 'city_zone_id' ) ; $ ids = array ( ) ; foreach ( $ fields as $ field ) { $ ids [ ] = $ address [ $ field ] ; } return $ this -> compare ( $ ids , $ condition [ 'value' ] , $ condition [ 'operator' ] ) ; }
docstring: Whether the state ID condition is met using an existing address
  @param array $condition
  @param array $data
  @param string $key
  @return boolean
docstring_tokens: Whether the state ID condition is met using an existing address