GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 9dc691...a1e10d )
by Benjamin
02:44
created

ServerCollection   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 88.89%

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 10
c 0
b 0
f 0
ccs 8
cts 9
cp 0.8889
wmc 4

1 Method

Rating   Name   Duplication   Size   Complexity  
A getHeaders() 0 14 4
1
<?php
2
3
namespace App\Lib\Http;
4
5
use App\Lib\Http\ParamCollection;
6
7
class ServerCollection extends ParamCollection
8
{
9 4
    public function getHeaders()
10
    {
11 4
        $headers = [];
12 4
        $contentHeaders = ['CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true];
13
14 4
        foreach ($this->parameters as $key => $value) {
15 1
            if (0 === stripos($key, 'HTTP_')) {
16
                $headers[substr($key, 5)] = $value;
17 1
            } elseif (isset($contentHeaders[$key])) {
18 1
                $headers[$key] = $value;
19
            }
20
        }
21
22 4
        return $headers;
23
    }
24
}
25