original_string: public function renderDay(DayInterface $day)
      {
          $classes = array();
  
          $dayOfWeek = $day->dayOfWeek();
  
          if (DayInterface::SATURDAY === $dayOfWeek || DayInterface::SUNDAY === $dayOfWeek) {
              $classes[] = 'bm-calendar-weekend';
          }
  
          foreach ($day->getStates() as $state) {
              $classes[] = 'bm-calendar-state-' . $state->type();
          }
  
          $output  = '<td>';
          if (sizeof($classes)) {
              $output  = '<td class="' . implode(' ', $classes) . '">';
          }
  
          if ($day->getAction()) {
              $output .= '<a href="' . htmlentities($day->getAction()) . '">' . $day . '</a>';
          } else {
              $output .= $day;
          }
  
  
          $output .= '</td>';
  
          return $output;
      }
code: public function renderDay(DayInterface $day)
      {
          $classes = array();
  
          $dayOfWeek = $day->dayOfWeek();
  
          if (DayInterface::SATURDAY === $dayOfWeek || DayInterface::SUNDAY === $dayOfWeek) {
              $classes[] = 'bm-calendar-weekend';
          }
  
          foreach ($day->getStates() as $state) {
              $classes[] = 'bm-calendar-state-' . $state->type();
          }
  
          $output  = '<td>';
          if (sizeof($classes)) {
              $output  = '<td class="' . implode(' ', $classes) . '">';
          }
  
          if ($day->getAction()) {
              $output .= '<a href="' . htmlentities($day->getAction()) . '">' . $day . '</a>';
          } else {
              $output .= $day;
          }
  
  
          $output .= '</td>';
  
          return $output;
      }
code_tokens: public function renderDay ( DayInterface $ day ) { $ classes = array ( ) ; $ dayOfWeek = $ day -> dayOfWeek ( ) ; if ( DayInterface :: SATURDAY === $ dayOfWeek || DayInterface :: SUNDAY === $ dayOfWeek ) { $ classes [ ] = 'bm-calendar-weekend' ; } foreach ( $ day -> getStates ( ) as $ state ) { $ classes [ ] = 'bm-calendar-state-' . $ state -> type ( ) ; } $ output = '<td>' ; if ( sizeof ( $ classes ) ) { $ output = '<td class="' . implode ( ' ' , $ classes ) . '">' ; } if ( $ day -> getAction ( ) ) { $ output .= '<a href="' . htmlentities ( $ day -> getAction ( ) ) . '">' . $ day . '</a>' ; } else { $ output .= $ day ; } $ output .= '</td>' ; return $ output ; }
docstring: Returns the markup for a single table cell.
  
  @param  DayInterface $day
  @return string
docstring_tokens: Returns the markup for a single table cell .