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

Yoast / wordpress-seo / 659e37133290e0f2694685341c70f7fb592085ed

22 Jan 2026 11:28AM UTC coverage: 41.982%. First build
659e37133290e0f2694685341c70f7fb592085ed

Pull #22891

github

web-flow
Merge bd73a3470 into d721a7aa0
Pull Request #22891: Create the endpoints needed for the Improve your content's SEO task

2676 of 9801 branches covered (27.3%)

Branch coverage included in aggregate %.

17 of 156 new or added lines in 15 files covered. (10.9%)

23216 of 51873 relevant lines covered (44.76%)

4.75 hits per line

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

0.0
/src/task-list/domain/data/content-item-data.php
1
<?php
2
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
3
namespace Yoast\WP\SEO\Task_List\Domain\Data;
4

5
/**
6
 * Value object representing content item data for SEO improvement tasks.
7
 */
8
class Content_Item_Data {
9

10
        /**
11
         * The content item ID.
12
         *
13
         * @var int
14
         */
15
        private $content_id;
16

17
        /**
18
         * The content item title.
19
         *
20
         * @var string
21
         */
22
        private $title;
23

24
        /**
25
         * The SEO score of the content item.
26
         *
27
         * @var int
28
         */
29
        private $seo_score;
30

31
        /**
32
         * The content type (post type).
33
         *
34
         * @var string
35
         */
36
        private $content_type;
37

38
        /**
39
         * Constructs the content item data.
40
         *
41
         * @param int    $content_id   The content item ID.
42
         * @param string $title        The content item title.
43
         * @param int    $seo_score    The SEO score.
44
         * @param string $content_type The content type.
45
         */
NEW
46
        public function __construct( int $content_id, string $title, int $seo_score, string $content_type = '' ) {
×
NEW
47
                $this->content_id   = $content_id;
×
NEW
48
                $this->title        = $title;
×
NEW
49
                $this->seo_score    = $seo_score;
×
NEW
50
                $this->content_type = $content_type;
×
51
        }
52

53
        /**
54
         * Returns the content item ID.
55
         *
56
         * @return int
57
         */
NEW
58
        public function get_content_id(): int {
×
NEW
59
                return $this->content_id;
×
60
        }
61

62
        /**
63
         * Returns the content item title.
64
         *
65
         * @return string
66
         */
NEW
67
        public function get_title(): string {
×
NEW
68
                return $this->title;
×
69
        }
70

71
        /**
72
         * Returns the SEO score.
73
         *
74
         * @return int
75
         */
NEW
76
        public function get_seo_score(): int {
×
NEW
77
                return $this->seo_score;
×
78
        }
79

80
        /**
81
         * Returns the content type.
82
         *
83
         * @return string
84
         */
NEW
85
        public function get_content_type(): string {
×
NEW
86
                return $this->content_type;
×
87
        }
88

89
        /**
90
         * Returns whether the content item has a good SEO score (above 70).
91
         *
92
         * @return bool
93
         */
NEW
94
        public function has_good_seo_score(): bool {
×
NEW
95
                return $this->seo_score > 70;
×
96
        }
97
}
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