Completed
Branch feature/currentUserRefactoring (c13c1d)
by Schlaefer
09:08
created

UsersSeed::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 9
nc 1
nop 0
dl 0
loc 13
rs 9.9666
c 1
b 0
f 0
1
<?php
2
use Migrations\AbstractSeed;
3
4
/**
5
 * Users seed.
6
 */
7
class UsersSeed extends AbstractSeed
8
{
9
    /**
10
     * Run Method.
11
     *
12
     * Write your database seeder using this method.
13
     *
14
     * More information on writing seeds is available here:
15
     * http://docs.phinx.org/en/latest/seeding.html
16
     *
17
     * @return void
18
     */
19
    public function run()
20
    {
21
        $data = [
22
                'id' => 1,
23
                'user_type' => 'owner',
24
                'username' => '__set_by_installer__',
25
                'password' => '__set_by_installer__',
26
                'activate_code' => '0',
27
                'registered' => date('Y-m-d H:i:s'),
28
        ];
29
30
        $table = $this->table('users');
31
        $table->insert($data)->save();
32
    }
33
}
34