Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Slim/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ public function run(?ServerRequestInterface $request = null): void
* @param ServerRequestInterface $request
* @return ResponseInterface
*/
#[\Override]
public function handle(ServerRequestInterface $request): ResponseInterface
{
$response = $this->middlewareDispatcher->handle($request);
Expand Down
3 changes: 3 additions & 0 deletions Slim/CallableResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public function __construct(?ContainerInterface $container = null)
/**
* {@inheritdoc}
*/
#[\Override]
public function resolve($toResolve): callable
{
$toResolve = $this->prepareToResolve($toResolve);
Expand All @@ -65,6 +66,7 @@ public function resolve($toResolve): callable
/**
* {@inheritdoc}
*/
#[\Override]
public function resolveRoute($toResolve): callable
{
return $this->resolveByPredicate($toResolve, [$this, 'isRoute'], 'handle');
Expand All @@ -73,6 +75,7 @@ public function resolveRoute($toResolve): callable
/**
* {@inheritdoc}
*/
#[\Override]
public function resolveMiddleware($toResolve): callable
{
return $this->resolveByPredicate($toResolve, [$this, 'isMiddleware'], 'process');
Expand Down
1 change: 1 addition & 0 deletions Slim/Error/Renderers/HtmlErrorRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*/
class HtmlErrorRenderer extends AbstractErrorRenderer
{
#[\Override]
public function __invoke(Throwable $exception, bool $displayErrorDetails): string
{
if ($displayErrorDetails) {
Expand Down
1 change: 1 addition & 0 deletions Slim/Error/Renderers/JsonErrorRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*/
class JsonErrorRenderer extends AbstractErrorRenderer
{
#[\Override]
public function __invoke(Throwable $exception, bool $displayErrorDetails): string
{
$error = ['message' => $this->getErrorTitle($exception)];
Expand Down
1 change: 1 addition & 0 deletions Slim/Error/Renderers/PlainTextErrorRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*/
class PlainTextErrorRenderer extends AbstractErrorRenderer
{
#[\Override]
public function __invoke(Throwable $exception, bool $displayErrorDetails): string
{
$text = "{$this->getErrorTitle($exception)}\n";
Expand Down
1 change: 1 addition & 0 deletions Slim/Error/Renderers/XmlErrorRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*/
class XmlErrorRenderer extends AbstractErrorRenderer
{
#[\Override]
public function __invoke(Throwable $exception, bool $displayErrorDetails): string
{
$xml = '<' . '?xml version="1.0" encoding="UTF-8" standalone="yes"?' . ">\n";
Expand Down
1 change: 1 addition & 0 deletions Slim/Factory/Psr17/NyholmPsr17Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class NyholmPsr17Factory extends Psr17Factory
/**
* {@inheritdoc}
*/
#[\Override]
public static function getServerRequestCreator(): ServerRequestCreatorInterface
{
/*
Expand Down
6 changes: 6 additions & 0 deletions Slim/Factory/Psr17/Psr17Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ abstract class Psr17Factory implements Psr17FactoryInterface
/**
* {@inheritdoc}
*/
#[\Override]
public static function getResponseFactory(): ResponseFactoryInterface
{
if (
Expand All @@ -47,6 +48,7 @@ public static function getResponseFactory(): ResponseFactoryInterface
/**
* {@inheritdoc}
*/
#[\Override]
public static function getStreamFactory(): StreamFactoryInterface
{
if (
Expand All @@ -62,6 +64,7 @@ public static function getStreamFactory(): StreamFactoryInterface
/**
* {@inheritdoc}
*/
#[\Override]
public static function getServerRequestCreator(): ServerRequestCreatorInterface
{
if (!static::isServerRequestCreatorAvailable()) {
Expand All @@ -74,6 +77,7 @@ public static function getServerRequestCreator(): ServerRequestCreatorInterface
/**
* {@inheritdoc}
*/
#[\Override]
public static function isResponseFactoryAvailable(): bool
{
return static::$responseFactoryClass && class_exists(static::$responseFactoryClass);
Expand All @@ -82,6 +86,7 @@ public static function isResponseFactoryAvailable(): bool
/**
* {@inheritdoc}
*/
#[\Override]
public static function isStreamFactoryAvailable(): bool
{
return static::$streamFactoryClass && class_exists(static::$streamFactoryClass);
Expand All @@ -90,6 +95,7 @@ public static function isStreamFactoryAvailable(): bool
/**
* {@inheritdoc}
*/
#[\Override]
public static function isServerRequestCreatorAvailable(): bool
{
return (
Expand Down
3 changes: 3 additions & 0 deletions Slim/Factory/Psr17/Psr17FactoryProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class Psr17FactoryProvider implements Psr17FactoryProviderInterface
/**
* {@inheritdoc}
*/
#[\Override]
public static function getFactories(): array
{
return static::$factories;
Expand All @@ -38,6 +39,7 @@ public static function getFactories(): array
/**
* {@inheritdoc}
*/
#[\Override]
public static function setFactories(array $factories): void
{
static::$factories = $factories;
Expand All @@ -46,6 +48,7 @@ public static function setFactories(array $factories): void
/**
* {@inheritdoc}
*/
#[\Override]
public static function addFactory(string $factory): void
{
array_unshift(static::$factories, $factory);
Expand Down
1 change: 1 addition & 0 deletions Slim/Factory/Psr17/ServerRequestCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public function __construct($serverRequestCreator, string $serverRequestCreatorM
/**
* {@inheritdoc}
*/
#[\Override]
public function createServerRequestFromGlobals(): ServerRequestInterface
{
/** @var callable $callable */
Expand Down
1 change: 1 addition & 0 deletions Slim/Factory/Psr17/SlimHttpServerRequestCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public function __construct(ServerRequestCreatorInterface $serverRequestCreator)
/**
* {@inheritdoc}
*/
#[\Override]
public function createServerRequestFromGlobals(): ServerRequestInterface
{
if (!static::isServerRequestDecoratorAvailable()) {
Expand Down
1 change: 1 addition & 0 deletions Slim/Handlers/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public function __construct(
* @param bool $logErrors Whether or not to log errors
* @param bool $logErrorDetails Whether or not to log error details
*/
#[\Override]
public function __invoke(
ServerRequestInterface $request,
Throwable $exception,
Expand Down
1 change: 1 addition & 0 deletions Slim/Handlers/Strategies/RequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public function __construct(bool $appendRouteArgumentsToRequestAttributes = fals
*
* @param array<string, string> $routeArguments
*/
#[\Override]
public function __invoke(
callable $callable,
ServerRequestInterface $request,
Expand Down
1 change: 1 addition & 0 deletions Slim/Handlers/Strategies/RequestResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class RequestResponse implements InvocationStrategyInterface
*
* @param array<string, string> $routeArguments
*/
#[\Override]
public function __invoke(
callable $callable,
ServerRequestInterface $request,
Expand Down
1 change: 1 addition & 0 deletions Slim/Handlers/Strategies/RequestResponseArgs.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class RequestResponseArgs implements InvocationStrategyInterface
*
* @param array<string, string> $routeArguments
*/
#[\Override]
public function __invoke(
callable $callable,
ServerRequestInterface $request,
Expand Down
1 change: 1 addition & 0 deletions Slim/Handlers/Strategies/RequestResponseNamedArgs.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class RequestResponseNamedArgs implements InvocationStrategyInterface
*
* @param array<string, string> $routeArguments
*/
#[\Override]
public function __invoke(
callable $callable,
ServerRequestInterface $request,
Expand Down
1 change: 1 addition & 0 deletions Slim/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class Logger extends AbstractLogger
*
* @throws InvalidArgumentException
*/
#[\Override]
public function log($level, $message, array $context = []): void
{
error_log((string) $message);
Expand Down
1 change: 1 addition & 0 deletions Slim/Middleware/BodyParsingMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public function __construct(array $bodyParsers = [])
}
}

#[\Override]
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$parsedBody = $request->getParsedBody();
Expand Down
1 change: 1 addition & 0 deletions Slim/Middleware/ContentLengthMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
/** @api */
class ContentLengthMiddleware implements MiddlewareInterface
{
#[\Override]
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$response = $handler->handle($request);
Expand Down
1 change: 1 addition & 0 deletions Slim/Middleware/ErrorMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public function __construct(
$this->logger = $logger;
}

#[\Override]
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
try {
Expand Down
1 change: 1 addition & 0 deletions Slim/Middleware/MethodOverrideMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
/** @api */
class MethodOverrideMiddleware implements MiddlewareInterface
{
#[\Override]
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$methodHeader = $request->getHeaderLine('X-Http-Method-Override');
Expand Down
1 change: 1 addition & 0 deletions Slim/Middleware/OutputBufferingMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public function __construct(StreamFactoryInterface $streamFactory, string $style
/**
* @throws Throwable
*/
#[\Override]
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
try {
Expand Down
1 change: 1 addition & 0 deletions Slim/Middleware/RoutingMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public function __construct(RouteResolverInterface $routeResolver, RouteParserIn
* @throws HttpMethodNotAllowedException
* @throws RuntimeException
*/
#[\Override]
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$request = $this->performRouting($request);
Expand Down
7 changes: 7 additions & 0 deletions Slim/MiddlewareDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public function __construct(
/**
* {@inheritdoc}
*/
#[\Override]
public function seedMiddlewareStack(RequestHandlerInterface $kernel): void
{
$this->tip = $kernel;
Expand All @@ -68,6 +69,7 @@ public function seedMiddlewareStack(RequestHandlerInterface $kernel): void
/**
* Invoke the middleware stack
*/
#[\Override]
public function handle(ServerRequestInterface $request): ResponseInterface
{
return $this->tip->handle($request);
Expand All @@ -82,6 +84,7 @@ public function handle(ServerRequestInterface $request): ResponseInterface
*
* @param MiddlewareInterface|string|callable $middleware
*/
#[\Override]
public function add($middleware): MiddlewareDispatcherInterface
{
if ($middleware instanceof MiddlewareInterface) {
Expand Down Expand Up @@ -110,6 +113,7 @@ public function add($middleware): MiddlewareDispatcherInterface
* that have been added before will be executed after the newly
* added one (last in, first out).
*/
#[\Override]
public function addMiddleware(MiddlewareInterface $middleware): MiddlewareDispatcherInterface
{
$next = $this->tip;
Expand All @@ -124,6 +128,7 @@ public function __construct(MiddlewareInterface $middleware, RequestHandlerInter
$this->next = $next;
}

#[\Override]
public function handle(ServerRequestInterface $request): ResponseInterface
{
return $this->middleware->process($request, $this->next);
Expand Down Expand Up @@ -170,6 +175,7 @@ public function __construct(
$this->callableResolver = $callableResolver;
}

#[\Override]
public function handle(ServerRequestInterface $request): ResponseInterface
{
if ($this->callableResolver instanceof AdvancedCallableResolverInterface) {
Expand Down Expand Up @@ -277,6 +283,7 @@ public function __construct(callable $middleware, RequestHandlerInterface $next)
$this->next = $next;
}

#[\Override]
public function handle(ServerRequestInterface $request): ResponseInterface
{
/** @var ResponseInterface */
Expand Down
2 changes: 2 additions & 0 deletions Slim/Routing/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ protected function createDispatcher(): FastRouteDispatcher
/**
* {@inheritdoc}
*/
#[\Override]
public function dispatch(string $method, string $uri): RoutingResults
{
$dispatcher = $this->createDispatcher();
Expand All @@ -70,6 +71,7 @@ public function dispatch(string $method, string $uri): RoutingResults
/**
* {@inheritdoc}
*/
#[\Override]
public function getAllowedMethods(string $uri): array
{
$dispatcher = $this->createDispatcher();
Expand Down
1 change: 1 addition & 0 deletions Slim/Routing/FastRouteDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class FastRouteDispatcher extends GroupCountBased
*
* @return array{int, string|null, array<string, string>}
*/
#[\Override]
public function dispatch($httpMethod, $uri): array
{
$routingResults = $this->routingResults($httpMethod, $uri);
Expand Down
Loading