From 39bfe4c9bf52b5c6e43fb1bde742f77205bdc77f Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Fri, 13 Jan 2017 02:05:24 +0300 Subject: [PATCH] New PHP 7.1 type hints for ApiController and EventsController. --- .../Bundle/PointToolsBundle/Controller/ApiController.php | 4 +--- .../Bundle/PointToolsBundle/Controller/EventsController.php | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Skobkin/Bundle/PointToolsBundle/Controller/ApiController.php b/src/Skobkin/Bundle/PointToolsBundle/Controller/ApiController.php index b2dc722..77d8502 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Controller/ApiController.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Controller/ApiController.php @@ -14,10 +14,8 @@ class ApiController extends Controller * Returns last user subscribers log * * @ParamConverter("user", class="SkobkinPointToolsBundle:User") - * - * @return Response */ - public function lastUserSubscribersByIdAction(User $user) + public function lastUserSubscribersByIdAction(User $user): Response { $qb = $this->getDoctrine()->getRepository('SkobkinPointToolsBundle:SubscriptionEvent')->createQueryBuilder('se'); $qb diff --git a/src/Skobkin/Bundle/PointToolsBundle/Controller/EventsController.php b/src/Skobkin/Bundle/PointToolsBundle/Controller/EventsController.php index ca740d2..c5f0777 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Controller/EventsController.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Controller/EventsController.php @@ -6,10 +6,11 @@ use Doctrine\ORM\EntityManager; use Doctrine\ORM\QueryBuilder; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; class EventsController extends Controller { - public function lastAction(Request $request) + public function lastAction(Request $request): Response { /** @var EntityManager $em */ $em = $this->getDoctrine()->getManager();