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

@@ -11,7 +11,6 @@
namespace Flarum\Api\Controller;
use Flarum\Http\Controller\ControllerInterface;
use Flarum\Http\UrlGenerator;
use Flarum\Settings\SettingsRepositoryInterface;
use Flarum\User\AssertPermissionTrait;
@@ -19,11 +18,13 @@ use Flarum\User\EmailToken;
use Flarum\User\Exception\PermissionDeniedException;
use Illuminate\Contracts\Mail\Mailer;
use Illuminate\Mail\Message;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Zend\Diactoros\Response\EmptyResponse;
class SendConfirmationEmailController implements ControllerInterface
class SendConfirmationEmailController implements RequestHandlerInterface
{
use AssertPermissionTrait;
@@ -64,7 +65,7 @@ class SendConfirmationEmailController implements ControllerInterface
/**
* {@inheritdoc}
*/
public function handle(ServerRequestInterface $request)
public function handle(ServerRequestInterface $request): ResponseInterface
{
$id = array_get($request->getQueryParams(), 'id');
$actor = $request->getAttribute('actor');