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

src/Console/stubs/AdminUserSeeder.php (1 issue)

Check that an empty catch block is always commented

Coding Style Comprehensibility Informational

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$"),
20
                    "email" => env('ADMIN_EMAIL', "$USER_EMAIL"),
21
                    "password" => bcrypt(env('ADMIN_PWD', '123456'))]
22
            );
23
        } catch (\Illuminate\Database\QueryException $exception) {
0 ignored issues
show
Coding Style Comprehensibility introduced by
Consider adding a comment why this CATCH block is empty.
Loading history...
24
25
        }
26
    }
27
}