Total Complexity | 6 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
9 | class InputPurifier implements InputPurifierInterface |
||
10 | { |
||
11 | protected ValidatorInterface $validator; |
||
12 | |||
13 | protected InputFormatterInterface $formatter; |
||
14 | |||
15 | 9 | public function __construct(ValidatorInterface $validator, InputFormatterInterface $formatter) |
|
16 | { |
||
17 | 9 | $this->validator = $validator; |
|
18 | 9 | $this->formatter = $formatter; |
|
19 | } |
||
20 | |||
21 | 9 | public function handleInput($input) |
|
34 | } |
||
35 | |||
36 | 6 | protected function returnIfFailed() |
|
37 | { |
||
38 | 6 | return null; |
|
39 | } |
||
40 | |||
41 | protected function handleRuleViolation($rule): void |
||
43 | // |
||
44 | } |
||
45 | } |
||
46 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.