DatabaseSeeder   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 22
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 15 1
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