This class seems to be duplicated in your project.
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.
Loading history...
14
{
15
/**
16
* @var ContainerInterface
17
*/
18
private $container;
19
20
public function setContainer(ContainerInterface $container = null)
21
{
22
$this->container = $container;
23
}
24
25
/**
26
* @param Schema $schema
27
*/
28
public function up(Schema $schema)
29
{
30
$gatewaySchema = $this->getGatewaySchema();
31
32
// this up() migration is auto-generated, please modify it to your needs
33
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
34
35
$this->addSql(sprintf('CREATE UNIQUE INDEX unq_saml_entity_entity_id_type ON %s.saml_entity (entity_id, type)', $gatewaySchema));
36
}
37
38
/**
39
* @param Schema $schema
40
*/
41
public function down(Schema $schema)
42
{
43
$gatewaySchema = $this->getGatewaySchema();
44
45
// this down() migration is auto-generated, please modify it to your needs
46
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
47
48
$this->addSql(sprintf('DROP INDEX unq_saml_entity_entity_id_type ON %s.saml_entity', $gatewaySchema));
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.