Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Lines | 9 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
20 | View Code Duplication | public function up(Schema $schema) : void |
|
|
|||
21 | { |
||
22 | // this up() migration is auto-generated, please modify it to your needs |
||
23 | $this->addSql('ALTER TABLE users CHANGE roles roles LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\''); |
||
24 | $this->addSql('DROP INDEX uniq_8d93d649f85e0677 ON users'); |
||
25 | $this->addSql('CREATE UNIQUE INDEX UNIQ_1483A5E9F85E0677 ON users (username)'); |
||
26 | $this->addSql('DROP INDEX uniq_8d93d649e7927c74 ON users'); |
||
27 | $this->addSql('CREATE UNIQUE INDEX UNIQ_1483A5E9E7927C74 ON users (email)'); |
||
28 | } |
||
29 | |||
40 |
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.