Completed
Push — master ( e68441...354a44 )
by Vincenzo
02:20
created

S1477152730UsersSeeder   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 20
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 15 2
1
<?php
2
3
use App\Lib\Slime\Interfaces\DatabaseHelpers\DbHelperInterface;
4
5
class S1477152730UsersSeeder implements DbHelperInterface
6
{
7
8
    public function run()
9
    {
10
        $faker = Faker\Factory::create();
11
        $usersNumber = 10;
12
        for ($i = 1; $i <= $usersNumber; $i++) {
13
            \App\Models\User::create(
14
                [
15
                    'name' => $faker->name,
16
                    'surname' => $faker->lastName,
17
                    'email' => $faker->email,
18
                    'age' => rand(15, 99),
19
                ]
20
            );
21
        }
22
    }
23
24
}