original_string: public function stateId(array $condition, array $data, $key)
      {
          // Check form fields
          if (isset($data['data']['address']['state_id'])) {
              $state_id = $data['data']['address']['state_id'];
              return $this->compare($state_id, $condition['value'], $condition['operator']);
          }
  
          if (!isset($data['data']['order'][$key])) {
              return false;
          }
  
          $address = $this->address->get($data['data']['order'][$key]);
  
          if (empty($address['state_id'])) {
              return false;
          }
  
          return $this->compare($address['state_id'], $condition['value'], $condition['operator']);
      }
code: public function stateId(array $condition, array $data, $key)
      {
          // Check form fields
          if (isset($data['data']['address']['state_id'])) {
              $state_id = $data['data']['address']['state_id'];
              return $this->compare($state_id, $condition['value'], $condition['operator']);
          }
  
          if (!isset($data['data']['order'][$key])) {
              return false;
          }
  
          $address = $this->address->get($data['data']['order'][$key]);
  
          if (empty($address['state_id'])) {
              return false;
          }
  
          return $this->compare($address['state_id'], $condition['value'], $condition['operator']);
      }
code_tokens: public function stateId ( array $ condition , array $ data , $ key ) { // Check form fields if ( isset ( $ data [ 'data' ] [ 'address' ] [ 'state_id' ] ) ) { $ state_id = $ data [ 'data' ] [ 'address' ] [ 'state_id' ] ; return $ this -> compare ( $ state_id , $ condition [ 'value' ] , $ condition [ 'operator' ] ) ; } if ( ! isset ( $ data [ 'data' ] [ 'order' ] [ $ key ] ) ) { return false ; } $ address = $ this -> address -> get ( $ data [ 'data' ] [ 'order' ] [ $ key ] ) ; if ( empty ( $ address [ 'state_id' ] ) ) { return false ; } return $ this -> compare ( $ address [ 'state_id' ] , $ condition [ 'value' ] , $ condition [ 'operator' ] ) ; }
docstring: Whether the state ID condition is met
  @param array $condition
  @param array $data
  @param string $key
  @return boolean
docstring_tokens: Whether the state ID condition is met