Conditions | 5 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
32 | 5 | public function matches(Request $request) |
|
33 | { |
||
34 | 5 | foreach ($this->userIdentifierHeaders as $header) { |
|
35 | 5 | if ($request->headers->has($header)) { |
|
36 | 4 | if (strtolower($header) === 'cookie' && 0 === $request->cookies->count()) { |
|
37 | // ignore empty cookie header |
||
38 | 2 | continue; |
|
39 | } |
||
40 | |||
41 | 5 | return false; |
|
42 | } |
||
43 | } |
||
44 | |||
45 | 3 | return true; |
|
46 | } |
||
47 | } |
||
48 |