Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 12 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
18 | public function testMethodNameUnderstandableRule() |
||
19 | { |
||
20 | $output = $this |
||
21 | ->runPhpmd('Tests/Test.php', 'test.xml') |
||
22 | ->getOutput(); |
||
23 | |||
24 | $this->assertNotContains('Test.php:13', $output); |
||
25 | $this->assertNotContains('Test.php:25', $output); |
||
26 | |||
27 | $this->assertContains('Test.php:37 Only 1 words are found in the method name. Try to describe your code as good as you can with 3 or more words.', $output); |
||
28 | $this->assertContains('Test.php:52 Only 1 words are found in the method name. Try to describe your code as good as you can with 3 or more words.', $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.