original_string: private function tokensToString(array $tokens): string
      {
          $lineCount = 0;
          $headerLines = [];
          $headerLines[] = $this->name.': ';
          $currentLine = &$headerLines[$lineCount++];
  
          // Build all tokens back into compliant header
          foreach ($tokens as $i => $token) {
              // Line longer than specified maximum or token was just a new line
              if (("\r\n" === $token) ||
                  ($i > 0 && \strlen($currentLine.$token) > $this->lineLength)
                  && 0 < \strlen($currentLine)) {
                  $headerLines[] = '';
                  $currentLine = &$headerLines[$lineCount++];
              }
  
              // Append token to the line
              if ("\r\n" !== $token) {
                  $currentLine .= $token;
              }
          }
  
          // Implode with FWS (RFC 2822, 2.2.3)
          return implode("\r\n", $headerLines);
      }
code: private function tokensToString(array $tokens): string
      {
          $lineCount = 0;
          $headerLines = [];
          $headerLines[] = $this->name.': ';
          $currentLine = &$headerLines[$lineCount++];
  
          // Build all tokens back into compliant header
          foreach ($tokens as $i => $token) {
              // Line longer than specified maximum or token was just a new line
              if (("\r\n" === $token) ||
                  ($i > 0 && \strlen($currentLine.$token) > $this->lineLength)
                  && 0 < \strlen($currentLine)) {
                  $headerLines[] = '';
                  $currentLine = &$headerLines[$lineCount++];
              }
  
              // Append token to the line
              if ("\r\n" !== $token) {
                  $currentLine .= $token;
              }
          }
  
          // Implode with FWS (RFC 2822, 2.2.3)
          return implode("\r\n", $headerLines);
      }
code_tokens: private function tokensToString ( array $ tokens ) : string { $ lineCount = 0 ; $ headerLines = [ ] ; $ headerLines [ ] = $ this -> name . ': ' ; $ currentLine = & $ headerLines [ $ lineCount ++ ] ; // Build all tokens back into compliant header foreach ( $ tokens as $ i => $ token ) { // Line longer than specified maximum or token was just a new line if ( ( "\r\n" === $ token ) || ( $ i > 0 && \ strlen ( $ currentLine . $ token ) > $ this -> lineLength ) && 0 < \ strlen ( $ currentLine ) ) { $ headerLines [ ] = '' ; $ currentLine = & $ headerLines [ $ lineCount ++ ] ; } // Append token to the line if ( "\r\n" !== $ token ) { $ currentLine .= $ token ; } } // Implode with FWS (RFC 2822, 2.2.3) return implode ( "\r\n" , $ headerLines ) ; }
docstring: Takes an array of tokens which appear in the header and turns them into
  an RFC 2822 compliant string, adding FWSP where needed.
  
  @param string[] $tokens
docstring_tokens: Takes an array of tokens which appear in the header and turns them into an RFC 2822 compliant string adding FWSP where needed .