SeedDatum::run()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 2
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
namespace App\Traits\Seeds;
4
5
trait SeedDatum
6
{
7
    public function run()
8
    {
9
        foreach ($this->getSeedData() as $datum) {
10
            $this->getSeedModel()::create($datum);
11
        }
12
    }
13
14
    abstract public function getSeedData(): array;
15
16
    abstract public function getSeedModel(): string;
17
}
18