Test::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 7
ccs 0
cts 4
cp 0
rs 10
cc 1
nc 1
nop 1
crap 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\PhpDirectiveBundle\Tests\Fixtures\App\Controller;
13
14
use Symfony\Component\HttpFoundation\Response;
15
use Symfony\Component\Routing\Annotation\Route;
16
17
/**
18
 * @internal
19
 * @coversNothing
20
 */
21
final class Test
22
{
23
    /**
24
     * @Route("/{directive}")
25
     */
26
    public function __invoke(string $directive): Response
27
    {
28
        return new Response(
29
            sprintf(
30
                '%s: %s',
31
                $directive,
32
                ini_get($directive)
33
            )
34
        );
35
    }
36
}
37