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

Yoast / wordpress-seo / 2401e603b3f3d1e303a414eedbe3367a254132e6

02 Mar 2026 10:30AM UTC coverage: 53.867% (+0.2%) from 53.703%
2401e603b3f3d1e303a414eedbe3367a254132e6

push

github

web-flow
Merge pull request #22972 from Yoast/feature/task-list-phase-2

Task List Phase 2

8978 of 16557 branches covered (54.22%)

Branch coverage included in aggregate %.

428 of 617 new or added lines in 46 files covered. (69.37%)

44 existing lines in 5 files now uncovered.

34222 of 63640 relevant lines covered (53.77%)

47011.91 hits per line

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

0.0
/src/task-list/domain/components/score-task-analyzer.php
1
<?php
2

3
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
4
namespace Yoast\WP\SEO\Task_List\Domain\Components;
5

6
use InvalidArgumentException;
7

8
/**
9
 * Represents a score-based analyzer component for a task.
10
 */
11
class Score_Task_Analyzer extends Abstract_Task_Analyzer {
12

13
        /**
14
         * Allowed results.
15
         *
16
         * @var string[]
17
         */
18
        private const ALLOWED_RESULTS = [
19
                'good',
20
                'ok',
21
                'bad',
22
        ];
23

24
        /**
25
         * The constructor.
26
         *
27
         * @param string $title              The title of the analyzer.
28
         * @param string $result             The result.
29
         * @param string $result_label       The human-readable label for the result.
30
         * @param string $result_description The description text explaining the result.
31
         *
32
         * @throws InvalidArgumentException If the result is invalid.
33
         */
NEW
34
        public function __construct(
×
35
                string $title,
36
                string $result,
37
                string $result_label,
38
                string $result_description
39
        ) {
NEW
40
                if ( ! \in_array( $result, self::ALLOWED_RESULTS, true ) ) {
×
NEW
41
                        throw new InvalidArgumentException( 'Invalid result for score task analyzer' );
×
42
                }
43

NEW
44
                $this->title              = $title;
×
NEW
45
                $this->result             = $result;
×
NEW
46
                $this->result_label       = $result_label;
×
NEW
47
                $this->result_description = $result_description;
×
48
        }
49

50
        /**
51
         * Returns the type of the analyzer.
52
         *
53
         * @return string
54
         */
NEW
55
        public function get_type(): string {
×
NEW
56
                return 'score';
×
57
        }
58
}
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