original_string: private function executeTableShowHeader(array $columns): void
    {
      $separator = '+';
      $header    = '|';
  
      foreach ($columns as $column)
      {
        $separator .= str_repeat('-', $column['length'] + 2).'+';
        $spaces    = ($column['length'] + 2) - mb_strlen((string)$column['header']);
  
        $spacesLeft  = (int)floor($spaces / 2);
        $spacesRight = (int)ceil($spaces / 2);
  
        $fillerLeft  = ($spacesLeft>0) ? str_repeat(' ', $spacesLeft) : '';
        $fillerRight = ($spacesRight>0) ? str_repeat(' ', $spacesRight) : '';
  
        $header .= $fillerLeft.$column['header'].$fillerRight.'|';
      }
  
      echo "\n", $separator, "\n";
      echo $header, "\n";
      echo $separator, "\n";
    }
code: private function executeTableShowHeader(array $columns): void
    {
      $separator = '+';
      $header    = '|';
  
      foreach ($columns as $column)
      {
        $separator .= str_repeat('-', $column['length'] + 2).'+';
        $spaces    = ($column['length'] + 2) - mb_strlen((string)$column['header']);
  
        $spacesLeft  = (int)floor($spaces / 2);
        $spacesRight = (int)ceil($spaces / 2);
  
        $fillerLeft  = ($spacesLeft>0) ? str_repeat(' ', $spacesLeft) : '';
        $fillerRight = ($spacesRight>0) ? str_repeat(' ', $spacesRight) : '';
  
        $header .= $fillerLeft.$column['header'].$fillerRight.'|';
      }
  
      echo "\n", $separator, "\n";
      echo $header, "\n";
      echo $separator, "\n";
    }
code_tokens: private function executeTableShowHeader ( array $ columns ) : void { $ separator = '+' ; $ header = '|' ; foreach ( $ columns as $ column ) { $ separator .= str_repeat ( '-' , $ column [ 'length' ] + 2 ) . '+' ; $ spaces = ( $ column [ 'length' ] + 2 ) - mb_strlen ( ( string ) $ column [ 'header' ] ) ; $ spacesLeft = ( int ) floor ( $ spaces / 2 ) ; $ spacesRight = ( int ) ceil ( $ spaces / 2 ) ; $ fillerLeft = ( $ spacesLeft > 0 ) ? str_repeat ( ' ' , $ spacesLeft ) : '' ; $ fillerRight = ( $ spacesRight > 0 ) ? str_repeat ( ' ' , $ spacesRight ) : '' ; $ header .= $ fillerLeft . $ column [ 'header' ] . $ fillerRight . '|' ; } echo "\n" , $ separator , "\n" ; echo $ header , "\n" ; echo $ separator , "\n" ; }
docstring: Helper method for method executeTable. Shows table header.
  
  @param array $columns
docstring_tokens: Helper method for method executeTable . Shows table header .