New PHP 7.1 type hints for ApiController and EventsController.

This commit is contained in:
Alexey Skobkin 2017-01-13 02:05:24 +03:00
parent 68238f2d14
commit 39bfe4c9bf
2 changed files with 3 additions and 4 deletions

View file

@ -14,10 +14,8 @@ class ApiController extends Controller
* Returns last user subscribers log * Returns last user subscribers log
* *
* @ParamConverter("user", class="SkobkinPointToolsBundle:User") * @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 = $this->getDoctrine()->getRepository('SkobkinPointToolsBundle:SubscriptionEvent')->createQueryBuilder('se');
$qb $qb

View file

@ -6,10 +6,11 @@ use Doctrine\ORM\EntityManager;
use Doctrine\ORM\QueryBuilder; use Doctrine\ORM\QueryBuilder;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class EventsController extends Controller class EventsController extends Controller
{ {
public function lastAction(Request $request) public function lastAction(Request $request): Response
{ {
/** @var EntityManager $em */ /** @var EntityManager $em */
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();