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

Yoast / wordpress-seo / c710c31289d8b4f262939f3a3ca36271a63cce16

13 Mar 2026 09:22AM UTC coverage: 53.449% (+2.5%) from 50.9%
c710c31289d8b4f262939f3a3ca36271a63cce16

push

github

leonidasmi
Merge branch 'trunk' into feature/task-list-phase-3

9052 of 16649 branches covered (54.37%)

Branch coverage included in aggregate %.

828 of 870 new or added lines in 44 files covered. (95.17%)

718 existing lines in 33 files now uncovered.

34354 of 64561 relevant lines covered (53.21%)

46593.28 hits per line

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

0.0
/src/ai/http-request/domain/response.php
1
<?php
2

3
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
4

5
namespace Yoast\WP\SEO\AI\HTTP_Request\Domain;
6

7
/**
8
 * Class Response
9
 * Represents a response from the AI Generator API.
10
 */
11
class Response {
12

13
        /**
14
         * The response body.
15
         *
16
         * @var string
17
         */
18
        private $body;
19

20
        /**
21
         * The response code.
22
         *
23
         * @var int
24
         */
25
        private $response_code;
26

27
        /**
28
         * The response message.
29
         *
30
         * @var string
31
         */
32
        private $message;
33

34
        /**
35
         * The error code.
36
         *
37
         * @var string
38
         */
39
        private $error_code;
40

41
        /**
42
         * The missing licenses.
43
         *
44
         * @var array<string>
45
         */
46
        private $missing_licenses;
47

48
        /**
49
         * Response constructor.
50
         *
51
         * @param string        $body             The response body.
52
         * @param int           $response_code    The response code.
53
         * @param string        $message          The response message.
54
         * @param string        $error_code       The error code.
55
         * @param array<string> $missing_licenses The missing licenses.
56
         */
NEW
57
        public function __construct( string $body, int $response_code, string $message, string $error_code = '', $missing_licenses = [] ) {
×
NEW
58
                $this->body             = $body;
×
NEW
59
                $this->response_code    = $response_code;
×
NEW
60
                $this->message          = $message;
×
NEW
61
                $this->error_code       = $error_code;
×
NEW
62
                $this->missing_licenses = $missing_licenses;
×
63
        }
64

65
        /**
66
         * Gets the response body.
67
         *
68
         * @return string The response body.
69
         */
NEW
70
        public function get_body() {
×
NEW
71
                return $this->body;
×
72
        }
73

74
        /**
75
         * Gets the response code.
76
         *
77
         * @return int The response code.
78
         */
NEW
79
        public function get_response_code(): int {
×
NEW
80
                return $this->response_code;
×
81
        }
82

83
        /**
84
         * Gets the response message.
85
         *
86
         * @return string The response message.
87
         */
NEW
88
        public function get_message(): string {
×
NEW
89
                return $this->message;
×
90
        }
91

92
        /**
93
         * Gets the error code.
94
         *
95
         * @return string The error code.
96
         */
NEW
97
        public function get_error_code(): string {
×
NEW
98
                return $this->error_code;
×
99
        }
100

101
        /**
102
         * Gets the missing licenses.
103
         *
104
         * @return array<string> The missing licenses.
105
         */
NEW
106
        public function get_missing_licenses(): array {
×
NEW
107
                return $this->missing_licenses;
×
108
        }
109
}
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