Conditions | 3 |
Paths | 2 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
11 | public static function getPsrServerRequest() |
||
12 | { |
||
13 | if (class_exists(Psr17Factory::class) && class_exists(PsrHttpFactory::class)) { |
||
14 | $psr17Factory = new Psr17Factory(); |
||
15 | |||
16 | return (new PsrHttpFactory($psr17Factory, $psr17Factory, $psr17Factory, $psr17Factory)) |
||
17 | ->createRequest(Request::createFromGlobals()); |
||
18 | } |
||
19 | |||
20 | throw new Exception('Unable to resolve PSR request. Please install symfony/psr-http-message-bridge and nyholm/psr7.'); |
||
21 | } |
||
22 | } |
||
23 |