1
0
mirror of https://github.com/flarum/core.git synced 2025-10-12 07:24:27 +02:00

Replace ControllerInterface with PSR-15 interface

The custom interface already had the same signature as the
one from the standard (except for the return type hint), so
why not use that one now? :)
This commit is contained in:
Franz Liedke
2018-05-30 00:12:06 +02:00
parent e6b8ff856e
commit b3d45fd6f8
22 changed files with 86 additions and 90 deletions

View File

@@ -13,12 +13,13 @@ namespace Flarum\Forum\Controller;
use Flarum\Api\Client;
use Flarum\Api\Controller\CreateUserController;
use Flarum\Http\Controller\ControllerInterface;
use Flarum\Http\Rememberer;
use Flarum\Http\SessionAuthenticator;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Server\RequestHandlerInterface;
class RegisterController implements ControllerInterface
class RegisterController implements RequestHandlerInterface
{
/**
* @var Client
@@ -50,7 +51,7 @@ class RegisterController implements ControllerInterface
/**
* {@inheritdoc}
*/
public function handle(Request $request)
public function handle(Request $request): ResponseInterface
{
$controller = CreateUserController::class;
$actor = $request->getAttribute('actor');