original_string: private function getVisitFieldsToUpdate(array $row, $location)
      {
          if (isset($location[LocationProvider::COUNTRY_CODE_KEY])) {
              $location[LocationProvider::COUNTRY_CODE_KEY] = strtolower($location[LocationProvider::COUNTRY_CODE_KEY]);
          }
  
          $valuesToUpdate = array();
          foreach (self::$logVisitFieldsToUpdate as $column => $locationKey) {
              if (empty($location[$locationKey])) {
                  continue;
              }
  
              $locationPropertyValue = $location[$locationKey];
              $existingPropertyValue = $row[$column];
  
              if (!$this->areLocationPropertiesEqual($locationKey, $locationPropertyValue, $existingPropertyValue)) {
                  $valuesToUpdate[$column] = $locationPropertyValue;
              }
          }
          return $valuesToUpdate;
      }
code: private function getVisitFieldsToUpdate(array $row, $location)
      {
          if (isset($location[LocationProvider::COUNTRY_CODE_KEY])) {
              $location[LocationProvider::COUNTRY_CODE_KEY] = strtolower($location[LocationProvider::COUNTRY_CODE_KEY]);
          }
  
          $valuesToUpdate = array();
          foreach (self::$logVisitFieldsToUpdate as $column => $locationKey) {
              if (empty($location[$locationKey])) {
                  continue;
              }
  
              $locationPropertyValue = $location[$locationKey];
              $existingPropertyValue = $row[$column];
  
              if (!$this->areLocationPropertiesEqual($locationKey, $locationPropertyValue, $existingPropertyValue)) {
                  $valuesToUpdate[$column] = $locationPropertyValue;
              }
          }
          return $valuesToUpdate;
      }
code_tokens: private function getVisitFieldsToUpdate ( array $ row , $ location ) { if ( isset ( $ location [ LocationProvider :: COUNTRY_CODE_KEY ] ) ) { $ location [ LocationProvider :: COUNTRY_CODE_KEY ] = strtolower ( $ location [ LocationProvider :: COUNTRY_CODE_KEY ] ) ; } $ valuesToUpdate = array ( ) ; foreach ( self :: $ logVisitFieldsToUpdate as $ column => $ locationKey ) { if ( empty ( $ location [ $ locationKey ] ) ) { continue ; } $ locationPropertyValue = $ location [ $ locationKey ] ; $ existingPropertyValue = $ row [ $ column ] ; if ( ! $ this -> areLocationPropertiesEqual ( $ locationKey , $ locationPropertyValue , $ existingPropertyValue ) ) { $ valuesToUpdate [ $ column ] = $ locationPropertyValue ; } } return $ valuesToUpdate ; }
docstring: Returns location log values that are different than the values currently in a log row.
  
  @param array $row The visit row.
  @param array $location The location information.
  @return array The location properties to update.
docstring_tokens: Returns location log values that are different than the values currently in a log row .