diff --git a/src/Skobkin/Bundle/PointToolsBundle/Controller/UserController.php b/src/Skobkin/Bundle/PointToolsBundle/Controller/UserController.php index 4a78cc9..e622303 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Controller/UserController.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Controller/UserController.php @@ -3,7 +3,7 @@ namespace Skobkin\Bundle\PointToolsBundle\Controller; use Doctrine\ORM\EntityManager; -use Skobkin\Bundle\PointToolsBundle\Entity\TopUserDTO; +use Skobkin\Bundle\PointToolsBundle\DTO\TopUserDTO; use Skobkin\Bundle\PointToolsBundle\Entity\User; use Skobkin\Bundle\PointToolsBundle\Service\UserApi; use Symfony\Bundle\FrameworkBundle\Controller\Controller; diff --git a/src/Skobkin/Bundle/PointToolsBundle/Entity/TopUserDTO.php b/src/Skobkin/Bundle/PointToolsBundle/DTO/TopUserDTO.php similarity index 87% rename from src/Skobkin/Bundle/PointToolsBundle/Entity/TopUserDTO.php rename to src/Skobkin/Bundle/PointToolsBundle/DTO/TopUserDTO.php index 5e2545c..ca1f126 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Entity/TopUserDTO.php +++ b/src/Skobkin/Bundle/PointToolsBundle/DTO/TopUserDTO.php @@ -1,6 +1,6 @@ getEntityManager()->getRepository('SkobkinPointToolsBundle:Subscription')->createQueryBuilder('s'); return $qb - ->select(['COUNT(s.subscriber) as cnt', 'NEW SkobkinPointToolsBundle:TopUserDTO(a.login, COUNT(s.subscriber))']) + ->select(['COUNT(s.subscriber) as cnt', 'NEW Skobkin\Bundle\PointToolsBundle\DTO\TopUserDTO(a.login, COUNT(s.subscriber))']) ->innerJoin('s.author', 'a') ->orderBy('cnt', 'desc') ->groupBy('a.id')