original_string: protected function shuffle_assoc(&$array) {
          if (count($array) > 1) {
              // $keys needs to be an array, no need to shuffle 1 item or empty arrays, anyway
              $keys = array_keys($array);
              shuffle($keys);
              foreach($keys as $key) {
                  $new[$key] = $array[$key];
              }
              $array = $new;
          }
          return true; // because this behaves like in-built shuffle(), which returns true
      }
code: protected function shuffle_assoc(&$array) {
          if (count($array) > 1) {
              // $keys needs to be an array, no need to shuffle 1 item or empty arrays, anyway
              $keys = array_keys($array);
              shuffle($keys);
              foreach($keys as $key) {
                  $new[$key] = $array[$key];
              }
              $array = $new;
          }
          return true; // because this behaves like in-built shuffle(), which returns true
      }
code_tokens: protected function shuffle_assoc ( & $ array ) { if ( count ( $ array ) > 1 ) { // $keys needs to be an array, no need to shuffle 1 item or empty arrays, anyway $ keys = array_keys ( $ array ) ; shuffle ( $ keys ) ; foreach ( $ keys as $ key ) { $ new [ $ key ] = $ array [ $ key ] ; } $ array = $ new ; } return true ; // because this behaves like in-built shuffle(), which returns true }
docstring: Shuffle the order of array elements preserving the key=>values
  
  @param array $array to be shuffled
  @return true
docstring_tokens: Shuffle the order of array elements preserving the key = > values