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