Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
| 1 | <?php |
||
| 6 | class RatingApiControllerTest extends FunctionalTest |
||
| 7 | { |
||
| 8 | protected static $fixture_file = 'RatingApiControllerTest.yml'; |
||
| 9 | |||
| 10 | public function testErrorWhenMissingParams() |
||
| 20 | |||
| 21 | public function testErrorWhenModuleNotFound() |
||
| 31 | |||
| 32 | View Code Duplication | public function testResponseIncludesRating() |
|
| 42 | |||
| 43 | View Code Duplication | public function testDetailedResponse() |
|
| 53 | } |
||
| 54 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.