original_string: public function addQueued($alias)
      {
          $query = $this->createQueryBuilder('c')
              ->where('c.alias = :alias')
              ->setParameter('alias', $alias)
              ->getQuery();
  
          /** @var SmileCron $smileCron */
          $smileCron = $query->setMaxResults(1)->getOneOrNullResult();
  
          if (!$smileCron) {
              $smileCron = new SmileCron();
              $smileCron->setAlias($alias);
          }
  
          $now = new \DateTime('now');
          $smileCron->setQueued($now);
          $smileCron->setStarted(null);
          $smileCron->setEnded(null);
          $smileCron->setStatus(0);
  
          $this->getEntityManager()->persist($smileCron);
          $this->getEntityManager()->flush();
      }
code: public function addQueued($alias)
      {
          $query = $this->createQueryBuilder('c')
              ->where('c.alias = :alias')
              ->setParameter('alias', $alias)
              ->getQuery();
  
          /** @var SmileCron $smileCron */
          $smileCron = $query->setMaxResults(1)->getOneOrNullResult();
  
          if (!$smileCron) {
              $smileCron = new SmileCron();
              $smileCron->setAlias($alias);
          }
  
          $now = new \DateTime('now');
          $smileCron->setQueued($now);
          $smileCron->setStarted(null);
          $smileCron->setEnded(null);
          $smileCron->setStatus(0);
  
          $this->getEntityManager()->persist($smileCron);
          $this->getEntityManager()->flush();
      }
code_tokens: public function addQueued ( $ alias ) { $ query = $ this -> createQueryBuilder ( 'c' ) -> where ( 'c.alias = :alias' ) -> setParameter ( 'alias' , $ alias ) -> getQuery ( ) ; /** @var SmileCron $smileCron */ $ smileCron = $ query -> setMaxResults ( 1 ) -> getOneOrNullResult ( ) ; if ( ! $ smileCron ) { $ smileCron = new SmileCron ( ) ; $ smileCron -> setAlias ( $ alias ) ; } $ now = new \ DateTime ( 'now' ) ; $ smileCron -> setQueued ( $ now ) ; $ smileCron -> setStarted ( null ) ; $ smileCron -> setEnded ( null ) ; $ smileCron -> setStatus ( 0 ) ; $ this -> getEntityManager ( ) -> persist ( $ smileCron ) ; $ this -> getEntityManager ( ) -> flush ( ) ; }
docstring: Add cron to queued
  
  @param string $alias cron alias
docstring_tokens: Add cron to queued