original_string: public function tableHeaders(array $names, array $trOptions = null, array $thOptions = null)
      {
          $out = [];
          foreach ($names as $arg) {
              if (!is_array($arg)) {
                  $out[] = $this->formatTemplate('tableheader', [
                      'attrs' => $this->templater()->formatAttributes($thOptions),
                      'content' => $arg
                  ]);
              } else {
                  $out[] = $this->formatTemplate('tableheader', [
                      'attrs' => $this->templater()->formatAttributes(current($arg)),
                      'content' => key($arg)
                  ]);
              }
          }
  
          return $this->tableRow(implode(' ', $out), (array)$trOptions);
      }
code: public function tableHeaders(array $names, array $trOptions = null, array $thOptions = null)
      {
          $out = [];
          foreach ($names as $arg) {
              if (!is_array($arg)) {
                  $out[] = $this->formatTemplate('tableheader', [
                      'attrs' => $this->templater()->formatAttributes($thOptions),
                      'content' => $arg
                  ]);
              } else {
                  $out[] = $this->formatTemplate('tableheader', [
                      'attrs' => $this->templater()->formatAttributes(current($arg)),
                      'content' => key($arg)
                  ]);
              }
          }
  
          return $this->tableRow(implode(' ', $out), (array)$trOptions);
      }
code_tokens: public function tableHeaders ( array $ names , array $ trOptions = null , array $ thOptions = null ) { $ out = [ ] ; foreach ( $ names as $ arg ) { if ( ! is_array ( $ arg ) ) { $ out [ ] = $ this -> formatTemplate ( 'tableheader' , [ 'attrs' => $ this -> templater ( ) -> formatAttributes ( $ thOptions ) , 'content' => $ arg ] ) ; } else { $ out [ ] = $ this -> formatTemplate ( 'tableheader' , [ 'attrs' => $ this -> templater ( ) -> formatAttributes ( current ( $ arg ) ) , 'content' => key ( $ arg ) ] ) ; } } return $ this -> tableRow ( implode ( ' ' , $ out ) , ( array ) $ trOptions ) ; }
docstring: Returns a row of formatted and named TABLE headers.
  
  @param array $names Array of tablenames. Each tablename also can be a key that points to an array with a set
  of attributes to its specific tag
  @param array|null $trOptions HTML options for TR elements.
  @param array|null $thOptions HTML options for TH elements.
  @return string Completed table headers
  @link https://book.cakephp.org/3.0/en/views/helpers/html.html#creating-table-headings
docstring_tokens: Returns a row of formatted and named TABLE headers .