@@ -55,7 +55,7 @@ public static function defaultName(): string
5555 * @param \Cake\Console\ConsoleOptionParser $parser The option parser to configure
5656 * @return \Cake\Console\ConsoleOptionParser
5757 */
58- public function buildOptionParser (ConsoleOptionParser $ parser ): ConsoleOptionParser
58+ protected function buildOptionParser (ConsoleOptionParser $ parser ): ConsoleOptionParser
5959 {
6060 $ parser ->setDescription ([
6161 'Drop all tables and re-run all migrations. ' ,
@@ -116,7 +116,7 @@ public function execute(Arguments $args, ConsoleIo $io): ?int
116116 // Get tables to drop
117117 $ tablesToDrop = $ this ->getTablesToDrop ($ connection );
118118
119- if (empty ( $ tablesToDrop) ) {
119+ if ($ tablesToDrop === [] ) {
120120 $ io ->out ('<info>No tables to drop.</info> ' );
121121 $ io ->out ('' );
122122 $ io ->out ('Running migrations... ' );
@@ -204,7 +204,7 @@ protected function dropTables(AdapterInterface $adapter, array $tables, ConsoleI
204204
205205 try {
206206 foreach ($ tables as $ table ) {
207- $ io ->verbose (" Dropping table: { $ table}" );
207+ $ io ->verbose (' Dropping table: ' . $ table );
208208 $ adapter ->dropTable ($ table );
209209 }
210210 } finally {
@@ -248,12 +248,12 @@ protected function runMigrations(Arguments $args, ConsoleIo $io): ?int
248248 $ manager = $ factory ->createManager ($ io );
249249 $ config = $ manager ->getConfig ();
250250
251- $ io ->verbose ('<info>using connection</info> ' . ( string ) $ args ->getOption ('connection ' ));
251+ $ io ->verbose ('<info>using connection</info> ' . $ args ->getOption ('connection ' ));
252252 $ io ->verbose ('<info>using paths</info> ' . $ config ->getMigrationPath ());
253253
254254 try {
255255 $ start = microtime (true );
256- $ manager ->migrate (null , false , null );
256+ $ manager ->migrate (null , false );
257257 $ end = microtime (true );
258258 } catch (Throwable $ e ) {
259259 $ io ->err ('<error> ' . $ e ->getMessage () . '</error> ' );
0 commit comments