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