Code Duplication    Length = 16-18 lines in 3 locations

migrations/20170916092508_player_theme_selection.php 1 location

@@ 5-22 (lines=18) @@
2
3
use Phinx\Migration\AbstractMigration;
4
5
class PlayerThemeSelection extends AbstractMigration
6
{
7
    /**
8
     * {@inheritdoc}
9
     */
10
    public function change()
11
    {
12
        $table = $this->table('players');
13
        $table
14
            ->addColumn('theme', 'string', [
15
                'after'   => 'timezone',
16
                'default' => 'dark',
17
                'comment' => 'The color theme the player has choosen'
18
            ])
19
            ->update()
20
        ;
21
    }
22
}
23

migrations/20180114092648_add_player_color_blind_mode.php 1 location

@@ 5-20 (lines=16) @@
2
3
use Phinx\Migration\AbstractMigration;
4
5
class AddPlayerColorBlindMode extends AbstractMigration
6
{
7
    public function change()
8
    {
9
        $playersTable = $this->table('players');
10
        $playersTable
11
            ->addColumn('color_blind_enabled', 'boolean', [
12
                'after' => 'theme',
13
                'null' => false,
14
                'default' => false,
15
                'comment' => 'Whether or not the player has opted for color blind assistance',
16
            ])
17
            ->update()
18
        ;
19
    }
20
}
21

migrations/20180202080131_allow_country_deletion.php 1 location

@@ 6-21 (lines=16) @@
3
4
use Phinx\Migration\AbstractMigration;
5
6
class AllowCountryDeletion extends AbstractMigration
7
{
8
    public function change()
9
    {
10
        $countriesTable = $this->table('countries');
11
        $countriesTable
12
            ->addColumn('is_deleted', 'boolean', [
13
                'after' => 'name',
14
                'null' => false,
15
                'default' => false,
16
                'comment' => 'Whether or not the country has been deleted',
17
            ])
18
            ->update()
19
        ;
20
    }
21
}
22