Skip to content

Commit e181d7b

Browse files
committed
# Conflicts: # includes/Factories/Resume/DummyResumeGenerate.php
2 parents 92c75ad + fdc4175 commit e181d7b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

includes/Factories/Resume/DummyResumeGenerate.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Cbx\Careertoolkit\Factories\Factory;
66
use Faker\Factory as FakerFactory;
7-
use Ramsey\Uuid\Uuid;
87

98
/**
109
* Dummy resume data generate command
@@ -32,16 +31,16 @@ public function wp_cli_register_commands() {
3231
public function run( $args, $assoc_args ) {
3332
$start = microtime( true );
3433

35-
$total = isset( $assoc_args['total'] ) && intval( $assoc_args['total'] ) ? intval( $assoc_args['total'] ) : 20;
34+
$total = isset( $assoc_args['total'] ) && intval( $assoc_args['total'] ) ? intval( $assoc_args['total'] ) : 100;
3635
$user_id = isset( $assoc_args['user-id'] ) && intval( $assoc_args['user-id'] ) ? intval( $assoc_args['user-id'] ) : 1;
3736
$status = isset( $assoc_args['status'] ) && intval( $assoc_args['status'] ) ? intval( $assoc_args['status'] ) : 'published';
38-
$privacy = isset( $assoc_args['privacy'] ) && strval( $assoc_args['privacy'] ) ? strval( $assoc_args['privacy'] ) : 'public';
37+
$privacy = isset( $assoc_args['privacy'] ) && strval( $assoc_args['privacy'] ) ? strval( $assoc_args['privacy'] ) : "public";
3938
$isPrimary = isset( $assoc_args['is-primary'] ) && intval( $assoc_args['is-primary'] ) ? intval( $assoc_args['is-primary'] ) : 1;
4039

4140
for ( $i = 0; $i < $total; $i ++ ) {
4241
$formData = [
4342
'add_by' => 1,
44-
'owner' => $user_id,
43+
'owner' => $user_id,
4544
'privacy' => $privacy,
4645
'status' => $status,
4746
'resume' => json_encode( [
@@ -65,8 +64,6 @@ public function run( $args, $assoc_args ) {
6564
'add_date' => date( 'Y-m-d H:i:s' )
6665
];
6766

68-
$formData['uuid'] = Uuid::uuid4();
69-
7067
\Cbx\Resume\Models\Resume::query()->create( $formData );
7168
}
7269

@@ -75,7 +72,7 @@ public function run( $args, $assoc_args ) {
7572
$elapsed = $end - $start;
7673

7774

78-
\WP_CLI::success( "Successfully $total dummy resume added. Execution time $elapsed seconds" );//todo: translation missing
75+
\WP_CLI::success( "Successfully $total dummy resume added. Execution time $elapsed seconds" );
7976

8077
} //end method run
8178

0 commit comments

Comments
 (0)