Skip to content

Commit

Permalink
Update action signature
Browse files Browse the repository at this point in the history
  • Loading branch information
odan committed Nov 17, 2019
1 parent 4abfb79 commit 7d4f7fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/Action/Home/HomeAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Action\Home;

use Psr\Http\Message\ResponseInterface;
use Slim\Http\Response;
use Slim\Http\ServerRequest;
use Slim\Views\Twig;
Expand Down Expand Up @@ -32,9 +33,9 @@ public function __construct(Twig $twig)
* @param ServerRequest $request The request
* @param Response $response The response
*
* @return Response The response
* @return ResponseInterface The response
*/
public function __invoke(ServerRequest $request, Response $response): Response
public function __invoke(ServerRequest $request, Response $response): ResponseInterface
{
$viewData = [
'now' => date('d.m.Y H:i:s'),
Expand Down
5 changes: 3 additions & 2 deletions src/Action/User/UserListAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Action\User;

use Psr\Http\Message\ResponseInterface;
use Slim\Http\Response;
use Slim\Http\ServerRequest;
use Slim\Views\Twig;
Expand Down Expand Up @@ -32,9 +33,9 @@ public function __construct(Twig $twig)
* @param ServerRequest $request The request
* @param Response $response The response
*
* @return Response The response
* @return ResponseInterface The response
*/
public function __invoke(ServerRequest $request, Response $response): Response
public function __invoke(ServerRequest $request, Response $response): ResponseInterface
{
return $this->twig->render($response, 'user/user-list.twig');
}
Expand Down

0 comments on commit 7d4f7fb

Please sign in to comment.