Conditions | 2 |
Paths | 2 |
Total Lines | 32 |
Code Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function run() |
||
16 | { |
||
17 | $faker = Faker\Factory::create(); |
||
18 | $data = []; |
||
19 | for ($i = 0; $i < 100; $i++) { |
||
20 | $data[] = [ |
||
21 | 'name' => $faker->userName, |
||
22 | 'email' => $faker->email, |
||
23 | 'status' => array_rand(['active' => 1, 'disable' => 2, 'delete' => 3]), |
||
24 | 'created' => date('Y-m-d H:i:s'), |
||
25 | ]; |
||
26 | } |
||
27 | |||
28 | $this->insert('test', $data); |
||
29 | |||
30 | |||
31 | $auth = [ |
||
32 | [ |
||
33 | 'userId' => 2, |
||
34 | 'provider' => 'token', |
||
35 | 'foreignKey' => 'admin', |
||
36 | 'token' => '$2y$10$wkZxb1sp8TsRXNL2s5KjGuFD58hGJQy4oyihm8xo7OBtV2uH7hQUu', |
||
37 | 'tokenSecret' => 'c8ab812795bb6a2784e30527d5b167fc', |
||
38 | 'tokenType' => 'access', |
||
39 | 'created' => '2015-01-01 00:00:00', |
||
40 | 'updated' => '2015-01-01 00:00:00', |
||
41 | 'expired' => '2025-01-01 00:00:00', |
||
42 | ] |
||
43 | ]; |
||
44 | $this->insert('auth', $auth); |
||
45 | |||
46 | } |
||
47 | } |
||
48 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.