Conditions | 5 |
Paths | 5 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 9 |
Ratio | 50 % |
Changes | 0 |
1 | <?php |
||
26 | public function match(Request $request, Element $config) |
||
27 | { |
||
28 | if (!$config->getRequest()->hasHeaders()) { |
||
29 | return true; |
||
30 | } |
||
31 | |||
32 | View Code Duplication | foreach ($config->getRequest()->getHeaders() as $headerName => $headerValuePattern) { |
|
33 | if (!$request->headers->has($headerName)) { |
||
34 | return false; |
||
35 | } |
||
36 | |||
37 | if (!$this->phpMatcher->match($request->headers->get($headerName), $headerValuePattern)) { |
||
38 | return false; |
||
39 | } |
||
40 | } |
||
41 | |||
42 | return true; |
||
43 | } |
||
44 | } |
||
45 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..