public function findByUrlAndEnvironment($url, $environment)
    {
        $queryBuilder = $this->createQueryBuilder('u')
            ->where('u.url = :url')
            ->andWhere('u.environment = :environment');

        $query = $queryBuilder->getQuery();
        $query->setParameter('url', $url);
        $query->setParameter('environment', $environment);

        try {
            return $query->getSingleResult();
        } catch (NoResultException $ex) {
            return;
        }
    }