original_string: protected function _changeIds($array, $oldId, $newId, $keys) {
          if (!is_array($array)) {
              return $array;
          }
  
          $matches = array_intersect_key($array, $keys);
          foreach($matches as $key => &$curId) {
              if ($curId == $oldId) {
                  $array[$key] = $newId;
              }
          }
  
          return $array;
      }
code: protected function _changeIds($array, $oldId, $newId, $keys) {
          if (!is_array($array)) {
              return $array;
          }
  
          $matches = array_intersect_key($array, $keys);
          foreach($matches as $key => &$curId) {
              if ($curId == $oldId) {
                  $array[$key] = $newId;
              }
          }
  
          return $array;
      }
code_tokens: protected function _changeIds ( $ array , $ oldId , $ newId , $ keys ) { if ( ! is_array ( $ array ) ) { return $ array ; } $ matches = array_intersect_key ( $ array , $ keys ) ; foreach ( $ matches as $ key => & $ curId ) { if ( $ curId == $ oldId ) { $ array [ $ key ] = $ newId ; } } return $ array ; }
docstring: Helper function for setcurrentOrganization
  
  Change value to $newId in an array if the key is in the $keys array (as key) and value is $oldId
  
  @param array $array
  @param int $oldId
  @param int $newId
  @param array $keys
  @return array
docstring_tokens: Helper function for setcurrentOrganization