Seeder   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 33
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 10 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Arcanedev\Support\Database;
6
7
use Illuminate\Database\Eloquent\Model as Eloquent;
8
use Illuminate\Database\Seeder as IlluminateSeeder;
9
10
/**
11
 * Class     Seeder
12
 *
13
 * @author   ARCANEDEV <[email protected]>
14
 */
15
abstract class Seeder extends IlluminateSeeder
16
{
17
    /* -----------------------------------------------------------------
18
     |  Properties
19
     | -----------------------------------------------------------------
20
     */
21
22
    /**
23
     * Seeder collection.
24
     *
25
     * @var array
26
     */
27
    protected $seeds = [];
28
29
    /* -----------------------------------------------------------------
30
     |  Main Methods
31
     | -----------------------------------------------------------------
32
     */
33
34
    /**
35
     * Run the database seeds.
36
     */
37
    public function run(): void
38
    {
39
        Eloquent::unguard();
40
41
        foreach ($this->seeds as $seed) {
42
            $this->call($seed);
43
        }
44
45
        Eloquent::reguard();
46
    }
47
}
48