Passed
Push — develop ( 7a32b4...bc8c97 )
by Darío
05:40 queued 03:21
created

NeedsParseHeaders   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A parseHeaders() 0 9 2
1
<?php
2
3
namespace EasyHttp\SymfonyLayer\Concerns;
4
5
trait NeedsParseHeaders
6
{
7 5
    protected function parseHeaders(array $headers): array
8
    {
9 5
        $_headers = [];
10
11 5
        foreach ($headers as $key => $value) {
12 5
            $_headers[$key] = array_shift($value);
13
        }
14
15 5
        return $_headers;
16
    }
17
}
18