original_string: public function attributes(array $attributes)
      {
          foreach ($attributes as $attribute => &$data) {
              $data = implode(' ', (array) $data);
              $data = $attribute . '="' . htmlspecialchars($data, ENT_QUOTES, 'UTF-8') . '"';
          }
  
          return empty($attributes) ? '' : ' ' . implode(' ', $attributes);
      }
code: public function attributes(array $attributes)
      {
          foreach ($attributes as $attribute => &$data) {
              $data = implode(' ', (array) $data);
              $data = $attribute . '="' . htmlspecialchars($data, ENT_QUOTES, 'UTF-8') . '"';
          }
  
          return empty($attributes) ? '' : ' ' . implode(' ', $attributes);
      }
code_tokens: public function attributes ( array $ attributes ) { foreach ( $ attributes as $ attribute => & $ data ) { $ data = implode ( ' ' , ( array ) $ data ) ; $ data = $ attribute . '="' . htmlspecialchars ( $ data , ENT_QUOTES , 'UTF-8' ) . '"' ; } return empty ( $ attributes ) ? '' : ' ' . implode ( ' ' , $ attributes ) ; }
docstring: Formats tag attributes
  @param array $attributes
  @return string
docstring_tokens: Formats tag attributes