Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | 91 | public function conforms(MessageInterface $message) |
|
30 | { |
||
31 | 91 | $allMatches = []; |
|
32 | |||
33 | 91 | foreach ($this->rules as $header => $rule) { |
|
34 | 91 | if (0 === preg_match($rule, $message->getHeaderLine($header), $matches)) { |
|
35 | 91 | return false; |
|
36 | } |
||
37 | |||
38 | 77 | $allMatches[$header] = $matches; |
|
39 | 77 | } |
|
40 | |||
41 | 70 | return $allMatches; |
|
42 | } |
||
43 | } |
||
44 |