for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Repository\Community;
use Doctrine\ORM\EntityRepository;
class CommunityRepository extends EntityRepository
{
public function countAll()
return (int) $this
->createQueryBuilder('c')
->select('COUNT(c) as nb_communities')
->getQuery()
->getSingleScalarResult()
;
}