SeedDatum   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

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

1 Method

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