Code Duplication    Length = 16-18 lines in 2 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