New PHP 7.1 type hints for WebHookController.

This commit is contained in:
Alexey Skobkin 2017-01-13 02:04:04 +03:00
parent df244c90bd
commit 68238f2d14
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ namespace Skobkin\Bundle\PointToolsBundle\Controller\Telegram;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use unreal4u\TelegramAPI\Telegram\Types\Update;
/**
@ -12,7 +13,7 @@ use unreal4u\TelegramAPI\Telegram\Types\Update;
*/
class WebHookController extends Controller
{
public function receiveUpdateAction(Request $request, $token)
public function receiveUpdateAction(Request $request, string $token): Response
{
if ($token !== $savedToken = $this->getParameter('telegram_token')) {
throw $this->createNotFoundException();