File tree Expand file tree Collapse file tree 3 files changed +248
-213
lines changed Expand file tree Collapse file tree 3 files changed +248
-213
lines changed Original file line number Diff line number Diff line change 3
3
/**
4
4
* Migrate your DB using WP Sync DB.
5
5
*/
6
- class WPSDBCLI extends WP_CLI_Command {
6
+ class WPSDBCLI extends WP_CLI_Command
7
+ {
7
8
8
- /**
9
- * Run a migration.
10
- *
11
- * ## OPTIONS
12
- *
13
- * <profile>
14
- * : ID of the profile to use for the migration.
15
- *
16
- * ## EXAMPLES
17
- *
18
- * wp wpsdb migrate 1
19
- *
20
- * @synopsis <profile>
21
- *
22
- * @since 1.0
23
- */
24
- public function migrate ( $ args , $ assoc_args ) {
25
- $ profile = $ args [0 ];
9
+ /**
10
+ * Run a migration.
11
+ *
12
+ * ## OPTIONS
13
+ *
14
+ * <profile>
15
+ * : ID of the profile to use for the migration.
16
+ *
17
+ * ## EXAMPLES
18
+ *
19
+ * wp wpsdb migrate 1
20
+ *
21
+ * @synopsis <profile>
22
+ *
23
+ * @since 1.0
24
+ */
25
+ public function migrate ($ args , $ assoc_args )
26
+ {
27
+ $ profile = $ args [0 ];
26
28
27
- $ result = wpsdb_migrate ( $ profile );
29
+ $ result = wpsdb_migrate ($ profile );
28
30
29
- if ( true === $ result ) {
30
- WP_CLI ::success ( __ ( 'Migration successful. ' , 'wp-sync-db-cli ' ) );
31
- return ;
32
- }
31
+ if (true === $ result ) {
32
+ WP_CLI ::success (__ ('Migration successful. ' , 'wp-sync-db-cli ' ) );
33
+ return ;
34
+ }
33
35
34
- WP_CLI ::warning ( $ result ->get_error_message () );
35
- return ;
36
- }
36
+ WP_CLI ::warning ($ result ->get_error_message ());
37
+ return ;
38
+ }
37
39
38
40
}
39
41
40
- WP_CLI ::add_command ( 'wpsdb ' , 'WPSDBCLI ' );
42
+ WP_CLI ::add_command ('wpsdb ' , 'WPSDBCLI ' );
You can’t perform that action at this time.
0 commit comments