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

Yoast / wordpress-seo / a8a215def53aa38d83991bd5baaddd3337e43c4b

07 Nov 2025 10:08AM UTC coverage: 49.286%. First build
a8a215def53aa38d83991bd5baaddd3337e43c4b

Pull #22691

github

web-flow
Merge aeebaf311 into b63825c5c
Pull Request #22691: Initialize the backend work needed for the tasklist.

7 of 184 new or added lines in 13 files covered. (3.8%)

17497 of 35501 relevant lines covered (49.29%)

3.89 hits per line

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

0.0
/src/task-list/application/configuration/task-list-configuration.php
1
<?php
2

3

4
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong
5
namespace Yoast\WP\SEO\Task_List\Application\Configuration;
6

7
use Yoast\WP\SEO\Helpers\Options_Helper;
8
use Yoast\WP\SEO\Task_List\Application\Tasks_Collector;
9

10
/**
11
 * Responsible for the task list configuration.
12
 */
13
class Task_List_Configuration {
14

15
        /**
16
         * The options helper.
17
         *
18
         * @var Options_Helper
19
         */
20
        private $options_helper;
21

22
        /**
23
         * The tasks collector.
24
         *
25
         * @var Tasks_Collector
26
         */
27
        private $tasks_collector;
28

29
        /**
30
         * The constructor.
31
         *
32
         * @param Options_Helper  $options_helper  The options helper.
33
         * @param Tasks_Collector $tasks_collector The tasks collector.
34
         */
NEW
35
        public function __construct(
×
36
                Options_Helper $options_helper,
37
                Tasks_Collector $tasks_collector
38
        ) {
NEW
39
                $this->options_helper  = $options_helper;
×
NEW
40
                $this->tasks_collector = $tasks_collector;
×
41
        }
42

43
        /**
44
         * Returns a configuration
45
         *
46
         * @return array<string, array<string>|array<string, string|array<string, array<string, int>>>>
47
         */
NEW
48
        public function get_configuration(): array {
×
NEW
49
                $configuration = [
×
NEW
50
                        'enabled'            => $this->options_helper->get( 'enable_task_list', true ),
×
NEW
51
                        'tasksConfiguration' => $this->get_tasks_configuration(),
×
NEW
52
                ];
×
53

NEW
54
                return $configuration;
×
55
        }
56

57
        /**
58
         * Returns the tasks's configuration.
59
         *
60
         * @return array<string, array<string>|array<string, string|array<string, array<string, int>>>>
61
         */
NEW
62
        protected function get_tasks_configuration(): ?array {
×
NEW
63
                $tasks_configuration = [];
×
64

NEW
65
                $tasks = $this->tasks_collector->get_tasks();
×
NEW
66
                foreach ( $tasks as $key => $task ) {
×
NEW
67
                        $tasks_configuration[ $key ] = $task->config_to_array();
×
68
                }
69

NEW
70
                return $tasks_configuration;
×
71
        }
72
}
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

© 2026 Coveralls, Inc