DatabaseSeeder::run()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 9
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 15
rs 9.9666
1
<?php
2
3
use Illuminate\Database\Seeder;
4
5
class DatabaseSeeder extends Seeder
6
{
7
    /**
8
     * Run the database seeds.
9
     *
10
     * @return void
11
     */
12
    public function run()
13
    {
14
        DB::statement('SET FOREIGN_KEY_CHECKS=0;');
15
        // call the seeders
16
        $this->call([
17
            UsersTableSeeder::class, 
18
            QuizzesTableSeeder::class,
19
            QuestionsTableSeeder::class,
20
            QuestionsChoicesTableSeeder::class,
21
            UserQuizzesTableSeeder::class,
22
            ProfilesTableSeeder::class
23
        ]);
24
        // no real need to re-enable checks, as it's only set for the "current" connection
25
        // but for clarity I've included it.
26
        DB::statement('SET FOREIGN_KEY_CHECKS=1;');
27
    }
28
}
29