ProxyCallback   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 2
dl 0
loc 11
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 3 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