diff --git a/controller/forwarding.rst b/controller/forwarding.rst index 0f231e07b42..444439bb2df 100644 --- a/controller/forwarding.rst +++ b/controller/forwarding.rst @@ -14,7 +14,7 @@ and calls the defined controller. The ``forward()`` method returns the :class:`Symfony\\Component\\HttpFoundation\\Response` object that is returned from *that* controller:: - public function index($name) + public function index($name): Response { $response = $this->forward('App\Controller\OtherController::fancy', [ 'name' => $name, @@ -29,7 +29,7 @@ from *that* controller:: The array passed to the method becomes the arguments for the resulting controller. The target controller method might look something like this:: - public function fancy($name, $color) + public function fancy(string $name, string $color): Response { // ... create and return a Response object }