S1478638829UserTokens   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 4
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
use App\Models\Users\User;
5
use App\Models\Users\UserToken;
6
7
class S1478638829UserTokens implements DbHelperInterface
8
{
9
10
    public function run()
11
    {
12
        $faker = Faker\Factory::create();
13
        $users = User::all();
14
        foreach ($users as $user) {
15
            UserToken::create(
0 ignored issues
show
Bug introduced by
The method create() does not exist on App\Models\Users\UserToken. Did you maybe mean created()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
16
                [
17
                    'user_id' => $user->id,
18
                    'user_ip' => $faker->ipv4,
19
                    'login_token' => str_repeat($user->id, 6),
20
                    'last_usage' => \Carbon\Carbon::now(),
21
                ]
22
            );
23
        }
24
    }
25
26
}