src/Viserio/Component/Exception/Filter/ContentTypeFilter.php
public function filter(
        array $displayers,
        ServerRequestInterface $request,
        Throwable $original,
        Throwable $transformed,
        int $code
    ): array {
        foreach ($displayers as $index => $displayer) {
            if (! InteractsWithContentTypes::accepts([$displayer->getContentType()], $request)) {
                unset($displayers[$index]);
            }
        }

        return \array_values($displayers);
    }
public function filter(
        array $displayers,
        ServerRequestInterface $request,
        Throwable $original,
        Throwable $transformed,
        int $code
    ): array {
        foreach ($displayers as $index => $displayer) {
            if (! InteractsWithContentTypes::accepts([$displayer->getContentType()], $request)) {
                unset($displayers[$index]);
            }
        }

        return \array_values($displayers);
    }
{@inheritdoc}