Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 12 |
Ratio | 100 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | public function doExecute(LoggerInterface $logger, $dryRun = false) |
||
37 | { |
||
38 | $platform = $this->connection->getDatabasePlatform(); |
||
39 | if ($platform instanceof PostgreSQL92Platform) { |
||
40 | $createIndex = 'CREATE INDEX account_name_expr_idx ON orocrm_account (lower(name))'; |
||
41 | |||
42 | $this->logQuery($logger, $createIndex); |
||
43 | if (!$dryRun) { |
||
44 | $this->connection->executeUpdate($createIndex); |
||
45 | } |
||
46 | } |
||
47 | } |
||
48 | } |
||
49 |
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.