Passed
Push — master ( 92224a...b0c10d )
by nguereza
03:55 queued 01:47
created

UsersSeed   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 20 2
1
<?php
2
declare(strict_types=1);
3
4
namespace Platine\Framework\Migration\Seed;
5
6
use Platine\Framework\Migration\Seed\AbstractSeed;
7
8
class UsersSeed extends AbstractSeed
9
{
10
11
    public function run(): void
12
    {
13
      //Action when run the seed
14
      
15
        $data = [
16
    0 => [
17
        'id' => 1,
18
        'username' => 'admin',
19
        'email' => '[email protected]',
20
        'password' => '$2y$10$Qi77pV.yPh22hDamxxzqW.gsAhQsmib2JABtLb5kZTSB9taEwm7au',
21
        'status' => 'A',
22
        'lastname' => 'Super',
23
        'firstname' => 'Admin',
24
        'role' => 'Super Administrator',
25
        'created_at' => '2023-12-05 15:02:58',
26
        'updated_at' => '2023-12-07 05:27:40',
27
    ],
28
];
29
        foreach ($data as $row) {
30
            $this->insert($row)->into('users');
31
        }
32
        
33
    }
34
}