ProxyCallback   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 12
ccs 3
cts 4
cp 0.75
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 7 2
1
<?php
2
3
/**
4
 * For the full copyright and license information, please view
5
 * the LICENSE file that was distributed with this source code.
6
 *
7
 * @see https://github.com/ecphp
8
 */
9
10
declare(strict_types=1);
11
12
namespace EcPhp\CasBundle\Controller;
13
14
use EcPhp\CasLib\CasInterface;
15
use Psr\Http\Message\ResponseInterface;
16
use Symfony\Component\HttpFoundation\Request;
17
use Symfony\Component\HttpFoundation\Response;
18
19
final class ProxyCallback
20
{
21
    /**
22
     * @return ResponseInterface|Response
23
     */
24 1
    public function __invoke(
25
        Request $request,
26
        CasInterface $cas
27
    ) {
28 1
        return (null === $response = $cas->handleProxyCallback($request->query->all()))
29
            ? (new Response('', 500))
30 1
            : $response;
31
    }
32
}
33