| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function testBodyStructure() : void |
||
| 24 | { |
||
| 25 | $suffix = $this->createMock(PropertyGenerator::class); |
||
|
|
|||
| 26 | |||
| 27 | $suffix->expects(self::once())->method('getName')->willReturn('foo'); |
||
| 28 | |||
| 29 | $setter = new SetMethodSuffixInterceptor($suffix); |
||
| 30 | |||
| 31 | self::assertEquals(TypeGenerator::fromTypeString('void'), $setter->getReturnType()); |
||
| 32 | self::assertSame('setMethodSuffixInterceptor', $setter->getName()); |
||
| 33 | self::assertCount(2, $setter->getParameters()); |
||
| 34 | self::assertSame('$this->foo[$methodName] = $suffixInterceptor;', $setter->getBody()); |
||
| 35 | } |
||
| 36 | } |
||
| 37 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.