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 declare(strict_types=1); |
||
| 8 | View Code Duplication | final class Version20210323112900 extends AbstractMigration |
|
| 9 | { |
||
| 10 | public function up(Schema $schema) : void |
||
| 16 | |||
| 17 | public function down(Schema $schema) : void |
||
| 23 | } |
||
| 24 |