Test Failed
Push — master ( e27e96...62a61a )
by Chubarov
05:17
created

StatusesSeeder::run()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 2
eloc 5
nc 2
nop 0
1
<?php
2
3
use agoalofalife\postman\Models\Status;
4
use Illuminate\Database\Seeder;
5
6
/**
7
 * Class StatusesSeeder
8
 */
9
class StatusesSeeder extends Seeder
10
{
11
    /**
12
     * Auto generated seed file.
13
     *
14
     * @return void
15
     */
16
    public function run() : void
17
    {
18
        foreach (trans('postman::statuses') as $status) {
19
            Status::firstOrCreate([
20
                'name' => $status['name'],
21
                'description' => $status['description'],
22
                'color_rgb' => $status['color_rgb'],
23
            ]);
24
        }
25
    }
26
}
27