/**
  * @param \Wonderland\Application\Model\Motion $motion
  */
 public function createMotion(Motion &$motion)
 {
     $affectedRows = $this->connection->prepareStatement('INSERT INTO motions(theme_id, title, description, means, author_id, ' . 'created_at, ended_at, is_active, is_approved) VALUES(:theme_id, :title, ' . ':description, :means, :author_id, :created_at, :ended_at, :is_active, :is_approved)', ['theme_id' => $motion->getTheme()->getId(), 'title' => $motion->getTitle(), 'description' => $motion->getDescription(), 'means' => $motion->getMeans(), 'author_id' => $motion->getAuthor()->getId(), 'created_at' => $motion->getCreatedAt()->format('c'), 'ended_at' => $motion->getEndedAt()->format('c'), 'is_active' => $motion->getIsActive(), 'is_approved' => $motion->getIsApproved()])->rowCount();
     if ($affectedRows === 0) {
         $this->throwPdoException();
     }
     $motion->setId($this->connection->lastInsertId());
 }
 public function createMotionMock(Motion &$motion)
 {
     $motion->setId(2);
 }