original_string: public function createRating($id = null)
      {
          $class = $this->getClass();
          $rating = new $class;
  
          if (null !== $id) {
              $rating->setId($id);
          }
  
          $this->dispatcher->dispatch(DCSRatingEvents::RATING_CREATE, new Event\RatingEvent($rating));
  
          return $rating;
      }
code: public function createRating($id = null)
      {
          $class = $this->getClass();
          $rating = new $class;
  
          if (null !== $id) {
              $rating->setId($id);
          }
  
          $this->dispatcher->dispatch(DCSRatingEvents::RATING_CREATE, new Event\RatingEvent($rating));
  
          return $rating;
      }
code_tokens: public function createRating ( $ id = null ) { $ class = $ this -> getClass ( ) ; $ rating = new $ class ; if ( null !== $ id ) { $ rating -> setId ( $ id ) ; } $ this -> dispatcher -> dispatch ( DCSRatingEvents :: RATING_CREATE , new Event \ RatingEvent ( $ rating ) ) ; return $ rating ; }
docstring: Creates an empty rating instance
  
  @param string $id
  @return \DCS\RatingBundle\Model\RatingInterface
docstring_tokens: Creates an empty rating instance