Issues (3)

src/Controller/ProxyCallback.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace drupol\CasBundle\Controller;
6
7
use drupol\psrcas\CasInterface;
8
use Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface;
9
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
10
11
/**
12
 * Class ProxyCallback.
13
 */
14
final class ProxyCallback extends AbstractController
15
{
16
    /**
17
     * @param \drupol\psrcas\CasInterface $casProtocol
18
     * @param \Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface $httpFoundationFactory
19
     *
20
     * @return \Symfony\Component\HttpFoundation\Response
21
     */
22 1
    public function __invoke(CasInterface $casProtocol, HttpFoundationFactoryInterface $httpFoundationFactory)
23
    {
24 1
        return $httpFoundationFactory->createResponse($casProtocol->handleProxyCallback());
0 ignored issues
show
It seems like $casProtocol->handleProxyCallback() can also be of type null; however, parameter $psrResponse of Symfony\Bridge\PsrHttpMe...rface::createResponse() does only seem to accept Psr\Http\Message\ResponseInterface, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

24
        return $httpFoundationFactory->createResponse(/** @scrutinizer ignore-type */ $casProtocol->handleProxyCallback());
Loading history...
25
    }
26
}
27