for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Skobkin\Bundle\PointToolsBundle\Repository\Telegram;
use Doctrine\ORM\EntityRepository;
use Skobkin\Bundle\PointToolsBundle\Entity\Telegram\Account;
class AccountRepository extends EntityRepository
{
public function add(Account $entity): void
$this->getEntityManager()->persist($entity);
}
/**
* Returns total number of accounts
*
* @return int
*/
public function getAccountsCount(): int
return $this->createQueryBuilder('a')
->select('COUNT(a)')
->getQuery()->getSingleScalarResult()
;
* Returns number of accounts with linked Point.im profile
public function getLinkedAccountsCount(): int
->where('a.user IS NOT NULL')