Completed
Push — master ( f7b1d9...1d2285 )
by Sergi Tur
26:58
created

src/Console/stubs/AdminUserSeeder.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
use Illuminate\Database\Seeder;
4
5
/**
6
 * Class AdminUserSeeder
7
 */
8
class AdminUserSeeder extends Seeder
9
{
10
    /**
11
     * Run the database seeds.
12
     *
13
     * @return void
14
     */
15
    public function run()
16
    {
17
        try {
18
            factory(App\User::class)->create([
19
                    "name" => env('ADMIN_USER', "$USER_NAME$"),
0 ignored issues
show
The variable $USER_NAME does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
20
                    "email" => env('ADMIN_EMAIL', "$USER_EMAIL"),
0 ignored issues
show
The variable $USER_EMAIL does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
21
                    "password" => bcrypt(env('ADMIN_PWD', '123456'))]
22
            );
23
        } catch (\Illuminate\Database\QueryException $exception) {
24
25
        }
26
    }
27
}