Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 13 |
Ratio | 100 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | public function testSuperfluousCommentRule() |
||
18 | { |
||
19 | $output = $this |
||
20 | ->runPhpmd('Service/SuperfluousComment.php', 'cleancode.xml') |
||
21 | ->getOutput(); |
||
22 | |||
23 | $this->assertNotContains('SuperfluousComment.php:42 It seems', $output); |
||
24 | |||
25 | $this->assertContains('SuperfluousComment.php:10 It seems that the class has a superfluous comment description. It fits 88 percent with the name of that.', $output); |
||
26 | $this->assertContains('SuperfluousComment.php:10 It seems that the property $name has a superfluous comment description. It fits 73 percent with the name of that.', $output); |
||
27 | $this->assertContains('SuperfluousComment.php:24 It seems that the method has a superfluous comment description. It fits 100 percent with the name of that.', $output); |
||
28 | $this->assertContains('SuperfluousComment.php:34 It seems that the method has a superfluous comment description. It fits 82 percent with the name of that.', $output); |
||
29 | } |
||
30 | } |
||
31 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.