1616
1717class SeedCommand extends Command
1818{
19- use ConfirmableTrait, Prohibitable;
19+ use ConfirmableTrait;
20+ use Prohibitable;
2021
2122 /**
2223 * The console command name.
@@ -31,7 +32,7 @@ class SeedCommand extends Command
3132 /**
3233 * Create a new database seed command instance.
3334 *
34- * @param ConnectionResolverInterface $resolver The connection resolver instance.
35+ * @param ConnectionResolverInterface $resolver the connection resolver instance
3536 */
3637 public function __construct (
3738 protected ConnectionResolverInterface $ resolver
@@ -44,8 +45,8 @@ public function __construct(
4445 */
4546 public function handle (): int
4647 {
47- if ($ this ->isProhibited () ||
48- ! $ this ->confirmToProceed ()
48+ if ($ this ->isProhibited ()
49+ || ! $ this ->confirmToProceed ()
4950 ) {
5051 return Command::FAILURE ;
5152 }
@@ -75,10 +76,10 @@ protected function getSeeder(): Seeder
7576 $ class = $ this ->input ->getArgument ('class ' ) ?? $ this ->input ->getOption ('class ' );
7677
7778 if (! str_contains ($ class , '\\' )) {
78- $ class = 'Database \\ Seeders \\' . $ class ;
79+ $ class = 'Database\Seeders \\' . $ class ;
7980 }
8081
81- if ($ class === 'Database \\ Seeders \ \DatabaseSeeder '
82+ if ($ class === 'Database\Seeders\DatabaseSeeder '
8283 && ! class_exists ($ class )) {
8384 $ class = 'DatabaseSeeder ' ;
8485 }
@@ -116,7 +117,7 @@ protected function getArguments(): array
116117 protected function getOptions (): array
117118 {
118119 return [
119- ['class ' , null , InputOption::VALUE_OPTIONAL , 'The class name of the root seeder ' , 'Database \\ Seeders \ \DatabaseSeeder ' ],
120+ ['class ' , null , InputOption::VALUE_OPTIONAL , 'The class name of the root seeder ' , 'Database\Seeders\DatabaseSeeder ' ],
120121 ['database ' , null , InputOption::VALUE_OPTIONAL , 'The database connection to seed ' ],
121122 ['force ' , null , InputOption::VALUE_NONE , 'Force the operation to run when in production ' ],
122123 ];
0 commit comments