Passed
Push — main ( ad9f42...f4c07f )
by Fractal
02:34
created

HeadersUtil   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getHeaders() 0 3 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FRZB\Component\RequestMapper\Utils;
6
7
use Symfony\Component\HttpFoundation\Request;
8
9
/**
10
 * @internal
11
 */
12
final class HeadersUtil
13
{
14 1
    public static function getHeaders(Request $request): array
15
    {
16 1
        return array_map(static fn (array $value) => current($value) ?: null, $request->headers->all());
17
    }
18
}
19