Completed
Push — development ( bbfd57...9ee667 )
by Thomas
26s queued 10s
created

Version201912003190000   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 15
loc 15
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 8 8 1
A down() 3 3 1

How to fix   Duplicated Code   

Duplicated Code

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
2
3
namespace Application\Migrations;
4
5
use Doctrine\DBAL\Migrations\AbstractMigration;
6
use Doctrine\DBAL\Schema\Schema;
7
8 View Code Duplication
class Version201912003190000 extends AbstractMigration
0 ignored issues
show
Deprecated Code introduced by
The class Doctrine\DBAL\Migrations\AbstractMigration has been deprecated with message: Please use Doctrine\Migrations\AbstractMigration

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.

Loading history...
Duplication introduced by
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...
9
{
10
    public function up(Schema $schema): void
11
    {
12
        $this->addSql('ALTER TABLE user	ADD gdpr_deletion TINYINT(1) DEFAULT 0 NOT NULL;');
13
        $this->addSql('ALTER TABLE caches ADD gdpr_deletion TINYINT(1) DEFAULT 0 NOT NULL;');
14
        $this->addSql('ALTER TABLE cache_logs ADD gdpr_deletion TINYINT(1) DEFAULT 0 NOT NULL;');
15
16
        $this->addSql('UPDATE user SET gdpr_deletion = 1 WHERE username like \'delete_%\'');
17
    }
18
19
    public function down(Schema $schema): void
20
    {
21
    }
22
}
23