From ff5b9cc34058e1b01bba8bc4ef74dcc8bed9b9a9 Mon Sep 17 00:00:00 2001 From: Lupacescu Eduard Date: Sun, 3 May 2020 15:44:33 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Commands/StubCommand.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Commands/StubCommand.php b/src/Commands/StubCommand.php index af1caeda2..3d886b144 100644 --- a/src/Commands/StubCommand.php +++ b/src/Commands/StubCommand.php @@ -35,19 +35,18 @@ public function __construct(Resolver $resolver, Faker $faker) public function handle() { - if (!$this->confirmToProceed()) { + if (! $this->confirmToProceed()) { return true; } - if (!$this->resolver->connection()->getSchemaBuilder()->hasTable($table = $this->argument('table'))) { + if (! $this->resolver->connection()->getSchemaBuilder()->hasTable($table = $this->argument('table'))) { return false; } - DB::connection()->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string'); $start = microtime(true); - Collection::times($count = $this->option('count') ?? 1)->each(fn() => $this->make($table)); + Collection::times($count = $this->option('count') ?? 1)->each(fn () => $this->make($table)); $time = round(microtime(true) - $start, 2); @@ -98,8 +97,6 @@ protected function make($table) $id = DB::table($table)->insertGetId($data); - $this->info('Created ' . Str::singular(Str::studly($table)) . ' with id:' . $id); - - return; + $this->info('Created '.Str::singular(Str::studly($table)).' with id:'.$id); } }