Total Complexity | 5 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
14 | final class HttpHelper |
||
15 | { |
||
16 | /** |
||
17 | * Separator between header and body |
||
18 | */ |
||
19 | private const BODY_SEPARATOR = "\r\n\r\n"; |
||
20 | |||
21 | /** |
||
22 | * Splits the message in HTTP status code, headers and body. |
||
23 | * |
||
24 | * @param string $message |
||
25 | * @return array Values are HTTP status code, PSR-7 headers and body |
||
26 | */ |
||
27 | 49 | public static function parseMessage(string $message): array |
|
57 |