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 |
||
4 | class AlterIncidents extends AbstractMigration |
||
5 | { |
||
6 | /** |
||
7 | * Change Method. |
||
8 | * |
||
9 | * More information on this method is available here: |
||
10 | * http://docs.phinx.org/en/latest/migrations.html#the-change-method |
||
11 | * @return void |
||
12 | */ |
||
13 | View Code Duplication | public function change() |
|
23 | } |
||
24 |