original_string: public static function toString(array $assoc, string $separator): string
      {
          $parts = [];
          foreach ($assoc as $name => $value) {
              if (true === $value) {
                  $parts[] = $name;
              } else {
                  $parts[] = $name.'='.self::quote($value);
              }
          }
  
          return implode($separator.' ', $parts);
      }
code: public static function toString(array $assoc, string $separator): string
      {
          $parts = [];
          foreach ($assoc as $name => $value) {
              if (true === $value) {
                  $parts[] = $name;
              } else {
                  $parts[] = $name.'='.self::quote($value);
              }
          }
  
          return implode($separator.' ', $parts);
      }
code_tokens: public static function toString ( array $ assoc , string $ separator ) : string { $ parts = [ ] ; foreach ( $ assoc as $ name => $ value ) { if ( true === $ value ) { $ parts [ ] = $ name ; } else { $ parts [ ] = $ name . '=' . self :: quote ( $ value ) ; } } return implode ( $ separator . ' ' , $ parts ) ; }
docstring: Joins an associative array into a string for use in an HTTP header.
  
  The key and value of each entry are joined with "=", and all entries
  are joined with the specified separator and an additional space (for
  readability). Values are quoted if necessary.
  
  Example:
  
  HeaderUtils::toString(["foo" => "abc", "bar" => true, "baz" => "a b c"], ",")
  // => 'foo=abc, bar, baz="a b c"'
docstring_tokens: Joins an associative array into a string for use in an HTTP header .