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

Yoast / wordpress-seo / 7adc35280975ee18a31269fb7d485dd07fa7c76a

08 Jan 2026 01:45PM UTC coverage: 51.85%. First build
7adc35280975ee18a31269fb7d485dd07fa7c76a

push

github

thijsoo
Merge branch 'trunk' of github.com:Yoast/wordpress-seo into feature/schema_aggregator

# Conflicts:
#	inc/options/class-wpseo-option-wpseo.php
#	packages/js/src/settings/routes/site-features.js

8774 of 16273 branches covered (53.92%)

Branch coverage included in aggregate %.

121 of 477 new or added lines in 60 files covered. (25.37%)

32980 of 64256 relevant lines covered (51.33%)

44874.43 hits per line

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

75.0
/src/task-list/domain/tasks/abstract-task.php
1
<?php
2
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
3
namespace Yoast\WP\SEO\Task_List\Domain\Tasks;
4

5
use Yoast\WP\SEO\Task_List\Domain\Components\Call_To_Action_Entry;
6

7
/**
8
 * Abstract class for a task.
9
 */
10
abstract class Abstract_Task implements Task_Interface {
11

12
        /**
13
         * The ID of the task.
14
         *
15
         * @var string
16
         */
17
        protected $id;
18

19
        /**
20
         * The priority of the task.
21
         *
22
         * @var string
23
         */
24
        protected $priority;
25

26
        /**
27
         * The duration of the task.
28
         *
29
         * @var int
30
         */
31
        protected $duration;
32

33
        /**
34
         * The enhanced call to action.
35
         *
36
         * @var Call_To_Action_Entry
37
         */
38
        private $enhanced_call_to_action;
39

40
        /**
41
         * Returns the task ID.
42
         *
43
         * @return string
44
         */
45
        public function get_id(): string {
26✔
46
                return $this->id;
26✔
47
        }
48

49
        /**
50
         * Returns the task's priority.
51
         *
52
         * @return string
53
         */
54
        public function get_priority(): string {
26✔
55
                return $this->priority;
26✔
56
        }
57

58
        /**
59
         * Returns the task's duration.
60
         *
61
         * @return int
62
         */
63
        public function get_duration(): int {
26✔
64
                return $this->duration;
26✔
65
        }
66

67
        /**
68
         * Returns the task's badge.
69
         *
70
         * @return string|null
71
         */
72
        public function get_badge(): ?string {
26✔
73
                return null;
26✔
74
        }
75

76
        /**
77
         * Sets the enhanced call to action.
78
         *
79
         * @param Call_To_Action_Entry $enhanced_call_to_action The enhanced call to action.
80
         *
81
         * @return void
82
         */
NEW
83
        public function set_enhanced_call_to_action( ?Call_To_Action_Entry $enhanced_call_to_action ): void {
×
NEW
84
                $this->enhanced_call_to_action = $enhanced_call_to_action;
×
85
        }
86

87
        /**
88
         * Returns the enhanced call to action.
89
         *
90
         * @return Call_To_Action_Entry|null
91
         */
NEW
92
        public function get_enhanced_call_to_action(): ?Call_To_Action_Entry {
×
NEW
93
                return $this->enhanced_call_to_action;
×
94
        }
95

96
        /**
97
         * Returns an array representation of the task data.
98
         *
99
         * @return array<string, string|bool> Returns in an array format.
100
         */
101
        public function to_array(): array {
26✔
102
                $data = [
26✔
103
                        'id'           => $this->get_id(),
26✔
104
                        'duration'     => $this->get_duration(),
26✔
105
                        'priority'     => $this->get_priority(),
26✔
106
                        'badge'        => $this->get_badge(),
26✔
107
                        'isCompleted'  => $this->get_is_completed(),
26✔
108
                        'callToAction' => $this->get_enhanced_call_to_action()->to_array(),
26✔
109
                ];
26✔
110

111
                return \array_merge( $data, $this->get_copy_set()->to_array() );
26✔
112
        }
113

114
        /**
115
         * Returns whether the task is valid.
116
         *
117
         * @return bool
118
         */
NEW
119
        public function is_valid(): bool {
×
NEW
120
                return true;
×
121
        }
122
}
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