• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / wordpress-seo / 8218b111533b92ec47f94130a94bcd0102263a45

01 Dec 2025 09:48AM UTC coverage: 53.092%. First build
8218b111533b92ec47f94130a94bcd0102263a45

push

github

web-flow
Merge pull request #22759 from Yoast/feature/task-list

Feature/task list

8697 of 16050 branches covered (54.19%)

Branch coverage included in aggregate %.

98 of 605 new or added lines in 51 files covered. (16.2%)

32413 of 61381 relevant lines covered (52.81%)

46976.02 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/task-list/application/tasks/complete-ftc.php
1
<?php
2
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
3
namespace Yoast\WP\SEO\Task_List\Application\Tasks;
4

5
use Yoast\WP\SEO\Helpers\First_Time_Configuration_Notice_Helper;
6
use Yoast\WP\SEO\Task_List\Domain\Components\Call_To_Action_Entry;
7
use Yoast\WP\SEO\Task_List\Domain\Components\Copy_Set;
8
use Yoast\WP\SEO\Task_List\Domain\Tasks\Abstract_Task;
9

10
/**
11
 * Represents the task for the completing the FTC.
12
 */
13
class Complete_FTC extends Abstract_Task {
14

15
        /**
16
         * Holds the id.
17
         *
18
         * @var string
19
         */
20
        protected $id = 'complete-ftc';
21

22
        /**
23
         * Holds the priority.
24
         *
25
         * @var string
26
         */
27
        protected $priority = 'high';
28

29
        /**
30
         * Holds the duration.
31
         *
32
         * @var int
33
         */
34
        protected $duration = 15;
35

36
        /**
37
         * Holds the first time configuration notice helper.
38
         *
39
         * @var First_Time_Configuration_Notice_Helper
40
         */
41
        private $ftc_notice_helper;
42

43
        /**
44
         * Constructs the task.
45
         *
46
         * @param First_Time_Configuration_Notice_Helper $ftc_notice_helper The first time configuration notice helper.
47
         */
NEW
48
        public function __construct( First_Time_Configuration_Notice_Helper $ftc_notice_helper ) {
×
NEW
49
                $this->ftc_notice_helper = $ftc_notice_helper;
×
50
        }
51

52
        /**
53
         * Returns whether this task is completed.
54
         *
55
         * @return bool Whether this task is completed.
56
         */
NEW
57
        public function get_is_completed(): bool {
×
NEW
58
                return $this->ftc_notice_helper->is_first_time_configuration_finished( true );
×
59
        }
60

61
        /**
62
         * Returns the task's link.
63
         *
64
         * @return string|null
65
         */
NEW
66
        public function get_link(): ?string {
×
NEW
67
                return \self_admin_url( 'admin.php?page=wpseo_dashboard#/first-time-configuration' );
×
68
        }
69

70
        /**
71
         * Returns the task's call to action entry.
72
         *
73
         * @return string|null
74
         */
NEW
75
        public function get_call_to_action(): Call_To_Action_Entry {
×
NEW
76
                return new Call_To_Action_Entry(
×
NEW
77
                        \__( 'Start configuration', 'wordpress-seo' ),
×
NEW
78
                        'link',
×
NEW
79
                        $this->get_link()
×
NEW
80
                );
×
81
        }
82

83
        /**
84
         * Returns the task's copy set.
85
         *
86
         * @return string|null
87
         */
NEW
88
        public function get_copy_set(): Copy_Set {
×
NEW
89
                return new Copy_Set(
×
NEW
90
                        \__( 'Complete the First-time configuration', 'wordpress-seo' ),
×
91
                        /* translators: %1$s expands to Yoast SEO */
NEW
92
                        \sprintf( \__( 'Skipping setup limits how much %1$s can help you. Completing it makes sure the core settings are working in your favor.', 'wordpress-seo' ), 'Yoast SEO' ),
×
NEW
93
                );
×
94
        }
95
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc