Conditions | 1 |
Paths | 1 |
Total Lines | 7 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public function canonicalize(HeaderInterface $header): string |
||
15 | { |
||
16 | $name = strtolower(trim((string)$header->getName())); |
||
17 | $value = str_replace("\r\n", '', (string)$header->getValue()); |
||
18 | $value = preg_replace("/[ \t][ \t]+/", ' ', $value); |
||
19 | return $name . ':' . trim($value); |
||
20 | } |
||
21 | |||
29 | } |