for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Alpixel\Bundle\CronBundle\Entity\Repository;
use Alpixel\Bundle\CronBundle\Entity\CronJob;
use Alpixel\Bundle\CronBundle\Entity\CronJobResult;
use Doctrine\ORM\EntityRepository;
class CronJobResultRepository extends EntityRepository
{
public function deleteOldLogs(CronJob $job = null)
$job
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$this
->getEntityManager()
->createQuery('DELETE CronBundle:CronJobResult result')
->getResult();
}
public function findLastRunForCronJob(CronJob $job)
return $this->createQueryBuilder('cjr')
->select('MAX(cjr.runAt)')
->andWhere('cjr.job = :job')
->andWhere('cjr.result = :success')
->setParameter('job', $job)
->setParameter('success', CronJobResult::SUCCEEDED)
->getQuery()
->getSingleScalarResult();
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.