Skip to content

Commit 3d36d83

Browse files
committed
Automated whitespace fixes
1 parent a504042 commit 3d36d83

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/Post_Command.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -753,8 +753,8 @@ public function generate( $args, $assoc_args ) {
753753
}
754754

755755
if ( $post_author ) {
756-
$user_fetcher = new UserFetcher;
757-
$post_author = $user_fetcher->get_check( $post_author )->ID;
756+
$user_fetcher = new UserFetcher();
757+
$post_author = $user_fetcher->get_check( $post_author )->ID;
758758
}
759759

760760
if ( Utils\get_flag_value( $assoc_args, 'post_content' ) ) {
@@ -782,36 +782,36 @@ public function generate( $args, $assoc_args ) {
782782
}
783783

784784
$previous_post_id = 0;
785-
$current_depth = 1;
786-
$current_parent = 0;
785+
$current_depth = 1;
786+
$current_parent = 0;
787787

788788
for ( $i = $total; $i < $limit; $i++ ) {
789789

790790
if ( $hierarchical ) {
791791

792-
if( $this->maybe_make_child() && $current_depth < $max_depth ) {
792+
if ( $this->maybe_make_child() && $current_depth < $max_depth ) {
793793

794794
$current_parent = $previous_post_id;
795795
$current_depth++;
796796

797-
} else if( $this->maybe_reset_depth() ) {
797+
} elseif ( $this->maybe_reset_depth() ) {
798798

799-
$current_depth = 1;
799+
$current_depth = 1;
800800
$current_parent = 0;
801801

802802
}
803803
}
804804

805805
$args = [
806-
'post_type' => $post_type,
807-
'post_title' => ! empty( $post_title ) && $i === $total ? "$label" : "$label $i",
808-
'post_status' => $post_status,
809-
'post_author' => $post_author,
810-
'post_parent' => $current_parent,
811-
'post_name' => ! empty( $post_title ) ? sanitize_title( $post_title . ( $i === $total ) ? '' : '-$i' ) : "post-$i",
812-
'post_date' => $post_date,
806+
'post_type' => $post_type,
807+
'post_title' => ! empty( $post_title ) && $i === $total ? "$label" : "$label $i",
808+
'post_status' => $post_status,
809+
'post_author' => $post_author,
810+
'post_parent' => $current_parent,
811+
'post_name' => ! empty( $post_title ) ? sanitize_title( $post_title . ( $i === $total ) ? '' : '-$i' ) : "post-$i",
812+
'post_date' => $post_date,
813813
'post_date_gmt' => $post_date_gmt,
814-
'post_content' => $post_content,
814+
'post_content' => $post_content,
815815
];
816816

817817
$post_id = wp_insert_post( $args, true );

0 commit comments

Comments
 (0)