Conditions | 9 |
Paths | 5 |
Total Lines | 20 |
Code Lines | 10 |
Lines | 7 |
Ratio | 35 % |
Tests | 10 |
CRAP Score | 9 |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
68 | 8 | public function matches(RequestInterface $request) |
|
69 | { |
||
70 | 8 | if ($this->schemes && !in_array($request->getUri()->getScheme(), $this->schemes)) { |
|
71 | 1 | return false; |
|
72 | } |
||
73 | |||
74 | 7 | if ($this->methods && !in_array($request->getMethod(), $this->methods)) { |
|
75 | 1 | return false; |
|
76 | } |
||
77 | |||
78 | 6 | View Code Duplication | if (null !== $this->path && !preg_match('{'.$this->path.'}', rawurldecode($request->getUri()->getPath()))) { |
79 | 1 | return false; |
|
80 | } |
||
81 | |||
82 | 5 | View Code Duplication | if (null !== $this->host && !preg_match('{'.$this->host.'}i', $request->getUri()->getHost())) { |
83 | 1 | return false; |
|
84 | } |
||
85 | |||
86 | 4 | return true; |
|
87 | } |
||
88 | } |
||
89 |
This check marks private properties in classes that are never used. Those properties can be removed.