ProxyCallback::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 1
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
Bug introduced by
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