Passed
Push — main ( 0f5def...1304a4 )
by Fractal
02:54
created

HeaderHelper::getHeaders()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FRZB\Component\RequestMapper\Helper;
6
7
use Symfony\Component\HttpFoundation\Request;
8
9
/**
10
 * @internal
11
 */
12
final class HeaderHelper
13
{
14 7
    public static function getHeaders(Request $request): array
15
    {
16 7
        return array_map(static fn (array $value) => current($value) ?: null, $request->headers->all());
17
    }
18
}
19