original_string: private function formatShow($original)
    {
      $show = new \stdClass();
  
      $show->id          = (int) $original->showid;
      $show->tvdbId      = (int) $original->tvdbid;
      $show->name        = (string) $original->showname;
      $show->link        = (string) $original->showlink;
      $show->firstAired  = strlen($original->firstaired)
        ? Carbon::createFromFormat('Y-m-d', (string) $original->firstaired)
        : null;
      $show->lastAired   = strlen($original->lastaired)
        ? Carbon::createFromFormat('Y-m-d', (string) $original->lastaired)
        : null;
      $show->nextEpisode = strlen($original->nextepisode)
        ? Carbon::createFromFormat('Y-m-d', (string) $original->nextepisode)
        : null;
      $show->seasons     = (int) $original->seasons;
      $show->episodes    = (int) $original->episodes;
      $show->genres      = $original->genres->result;
      $show->score       = (float) str_replace(',', '.', $original->score);
      $show->runtime     = (float) str_replace(',', '.', $original->runtime);
      $show->favorites   = (int) $original->favorites;
      $show->showstatus  = (string) $original->showstatus;
      $show->airtime     = (string) $original->airtime;
      $show->summary     = (string) $original->summary;
      $show->updated     = Carbon::createFromTimestamp((int) $original->updated);
      $genres = [];
      foreach ( $show->genres as $key => $genre ) {
        $genre    = (string) $genre;
        $genre    = ucfirst($genre);
        $genres[] = $genre;
      }
      $show->genres = $genres;
  
      return $show;
    }
code: private function formatShow($original)
    {
      $show = new \stdClass();
  
      $show->id          = (int) $original->showid;
      $show->tvdbId      = (int) $original->tvdbid;
      $show->name        = (string) $original->showname;
      $show->link        = (string) $original->showlink;
      $show->firstAired  = strlen($original->firstaired)
        ? Carbon::createFromFormat('Y-m-d', (string) $original->firstaired)
        : null;
      $show->lastAired   = strlen($original->lastaired)
        ? Carbon::createFromFormat('Y-m-d', (string) $original->lastaired)
        : null;
      $show->nextEpisode = strlen($original->nextepisode)
        ? Carbon::createFromFormat('Y-m-d', (string) $original->nextepisode)
        : null;
      $show->seasons     = (int) $original->seasons;
      $show->episodes    = (int) $original->episodes;
      $show->genres      = $original->genres->result;
      $show->score       = (float) str_replace(',', '.', $original->score);
      $show->runtime     = (float) str_replace(',', '.', $original->runtime);
      $show->favorites   = (int) $original->favorites;
      $show->showstatus  = (string) $original->showstatus;
      $show->airtime     = (string) $original->airtime;
      $show->summary     = (string) $original->summary;
      $show->updated     = Carbon::createFromTimestamp((int) $original->updated);
      $genres = [];
      foreach ( $show->genres as $key => $genre ) {
        $genre    = (string) $genre;
        $genre    = ucfirst($genre);
        $genres[] = $genre;
      }
      $show->genres = $genres;
  
      return $show;
    }
code_tokens: private function formatShow ( $ original ) { $ show = new \ stdClass ( ) ; $ show -> id = ( int ) $ original -> showid ; $ show -> tvdbId = ( int ) $ original -> tvdbid ; $ show -> name = ( string ) $ original -> showname ; $ show -> link = ( string ) $ original -> showlink ; $ show -> firstAired = strlen ( $ original -> firstaired ) ? Carbon :: createFromFormat ( 'Y-m-d' , ( string ) $ original -> firstaired ) : null ; $ show -> lastAired = strlen ( $ original -> lastaired ) ? Carbon :: createFromFormat ( 'Y-m-d' , ( string ) $ original -> lastaired ) : null ; $ show -> nextEpisode = strlen ( $ original -> nextepisode ) ? Carbon :: createFromFormat ( 'Y-m-d' , ( string ) $ original -> nextepisode ) : null ; $ show -> seasons = ( int ) $ original -> seasons ; $ show -> episodes = ( int ) $ original -> episodes ; $ show -> genres = $ original -> genres -> result ; $ show -> score = ( float ) str_replace ( ',' , '.' , $ original -> score ) ; $ show -> runtime = ( float ) str_replace ( ',' , '.' , $ original -> runtime ) ; $ show -> favorites = ( int ) $ original -> favorites ; $ show -> showstatus = ( string ) $ original -> showstatus ; $ show -> airtime = ( string ) $ original -> airtime ; $ show -> summary = ( string ) $ original -> summary ; $ show -> updated = Carbon :: createFromTimestamp ( ( int ) $ original -> updated ) ; $ genres = [ ] ; foreach ( $ show -> genres as $ key => $ genre ) { $ genre = ( string ) $ genre ; $ genre = ucfirst ( $ genre ) ; $ genres [ ] = $ genre ; } $ show -> genres = $ genres ; return $ show ; }
docstring: Format a Show response
  
  @param $original
  
  @return \stdClass
docstring_tokens: Format a Show response