Conditions | 2 |
Paths | 1 |
Total Lines | 7 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
29 | 14 | public function createServerRequestFromArray(array $server) |
|
30 | { |
||
31 | 14 | $method = $server['REQUEST_METHOD'] ?: 'GET'; |
|
32 | 14 | $uri = ServerRequest::getUriFromGlobals($server); |
|
33 | 14 | $body = (new StreamFactory())->createStreamFromFile('php://temp', 'r+'); |
|
34 | |||
35 | 14 | return new ServerRequest($method, $uri, $server, $body, '1.1'); |
|
36 | } |
||
38 |