DatabaseManagerSeeder   A
last analyzed

Complexity

Total Complexity 4

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 4

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 13 4
1
<?php
2
3
use Illuminate\Database\Seeder;
4
5
class DatabaseManagerSeeder extends Seeder
6
{
7
    protected $seedersPath = __DIR__.DIRECTORY_SEPARATOR;
8
9
    /**
10
     * Seed the application's database.
11
     *
12
     * @return void
13
     */
14
    public function run()
15
    {
16
        $seeds = [
17
            'DatabasePermissionSeeder',
18
            'DatabaseMenuSeeder',
19
        ];
20
21
        foreach ($seeds as $class) {
22
            $file = $this->seedersPath.$class.'.php';
23
            if (file_exists($file) && ! class_exists($class)) {
24
                require_once $file;
25
            }
26
            with(new $class())->run();
27
        }
28
    }
29
}
30