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 |
||
8 | View Code Duplication | class Version201912003190000 extends AbstractMigration |
|
9 | { |
||
10 | public function up(Schema $schema): void |
||
18 | |||
19 | public function down(Schema $schema): void |
||
22 | } |
||
23 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.