1
0
mirror of https://github.com/flarum/core.git synced 2025-08-02 14:37:49 +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

@@ -12,7 +12,6 @@
namespace Flarum\Forum\Controller;
use Flarum\Foundation\DispatchEventsTrait;
use Flarum\Http\Controller\ControllerInterface;
use Flarum\Http\SessionAuthenticator;
use Flarum\Http\UrlGenerator;
use Flarum\User\PasswordToken;
@@ -20,10 +19,12 @@ use Flarum\User\UserValidator;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Contracts\Validation\Factory;
use Illuminate\Validation\ValidationException;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Server\RequestHandlerInterface;
use Zend\Diactoros\Response\RedirectResponse;
class SavePasswordController implements ControllerInterface
class SavePasswordController implements RequestHandlerInterface
{
use DispatchEventsTrait;
@@ -64,9 +65,9 @@ class SavePasswordController implements ControllerInterface
/**
* @param Request $request
* @return RedirectResponse
* @return ResponseInterface
*/
public function handle(Request $request)
public function handle(Request $request): ResponseInterface
{
$input = $request->getParsedBody();