1
0
mirror of https://github.com/flarum/core.git synced 2025-10-23 04:36:08 +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

@@ -14,15 +14,16 @@ namespace Flarum\Api\Controller;
use Flarum\Api\Event\WillGetData;
use Flarum\Api\Event\WillSerializeData;
use Flarum\Api\JsonApiResponse;
use Flarum\Http\Controller\ControllerInterface;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Events\Dispatcher;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Tobscure\JsonApi\Document;
use Tobscure\JsonApi\Parameters;
use Tobscure\JsonApi\SerializerInterface;
abstract class AbstractSerializeController implements ControllerInterface
abstract class AbstractSerializeController implements RequestHandlerInterface
{
/**
* The name of the serializer class to output results with.
@@ -86,7 +87,7 @@ abstract class AbstractSerializeController implements ControllerInterface
/**
* {@inheritdoc}
*/
public function handle(ServerRequestInterface $request)
public function handle(ServerRequestInterface $request): ResponseInterface
{
$document = new Document;