original_string: protected function formatName($column)
      {
          if (is_string($column)) {
              $name = explode('.', $column);
  
              if (1 === count($name)) {
                  return $name[0];
              }
  
              $html = array_shift($name);
              foreach ($name as $piece) {
                  $html .= "[$piece]";
              }
  
              return $html;
          }
  
          if (is_array($this->column)) {
              $names = [];
              foreach ($this->column as $key => $name) {
                  $names[$key] = $this->formatName($name);
              }
  
              return $names;
          }
  
          return '';
      }
code: protected function formatName($column)
      {
          if (is_string($column)) {
              $name = explode('.', $column);
  
              if (1 === count($name)) {
                  return $name[0];
              }
  
              $html = array_shift($name);
              foreach ($name as $piece) {
                  $html .= "[$piece]";
              }
  
              return $html;
          }
  
          if (is_array($this->column)) {
              $names = [];
              foreach ($this->column as $key => $name) {
                  $names[$key] = $this->formatName($name);
              }
  
              return $names;
          }
  
          return '';
      }
code_tokens: protected function formatName ( $ column ) { if ( is_string ( $ column ) ) { $ name = explode ( '.' , $ column ) ; if ( 1 === count ( $ name ) ) { return $ name [ 0 ] ; } $ html = array_shift ( $ name ) ; foreach ( $ name as $ piece ) { $ html .= "[$piece]" ; } return $ html ; } if ( is_array ( $ this -> column ) ) { $ names = [ ] ; foreach ( $ this -> column as $ key => $ name ) { $ names [ $ key ] = $ this -> formatName ( $ name ) ; } return $ names ; } return '' ; }
docstring: Format the name of the field.
  
  @param string $column
  
  @return array|mixed|string
docstring_tokens: Format the name of the field .