Total Complexity | 2 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
21 | class ModelsScrappedValidatorTest extends TestCase |
||
22 | { |
||
23 | /** |
||
24 | * @test |
||
25 | */ |
||
26 | public function testValidatorDoesntThrowExceptionWhenArrayIsValid() |
||
27 | { |
||
28 | $modelDTOArray = new ModelDTOArray( |
||
29 | new ModelDTO('Alfa Romeo') |
||
30 | ); |
||
31 | |||
32 | $validator = new ModelsScrappedValidator(); |
||
33 | |||
34 | $this->assertEquals(null, $validator->validate($modelDTOArray)); |
||
|
|||
35 | } |
||
36 | |||
37 | public function testValidatorThrowsExceptionWhenArrayIsEmpty() |
||
45 | } |
||
46 | |||
48 |
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.