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

Yoast / wordpress-seo / b253898254616ae5c5961f03c81bc54cef43ce30

07 Oct 2025 12:46PM UTC coverage: 53.188%. First build
b253898254616ae5c5961f03c81bc54cef43ce30

Pull #22615

github

pls78
Fix conditional exclusion
Pull Request #22615: Feature/re organize ai code

8447 of 15597 branches covered (54.16%)

Branch coverage included in aggregate %.

671 of 732 new or added lines in 41 files covered. (91.67%)

31848 of 60162 relevant lines covered (52.94%)

39693.91 hits per line

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

0.0
/src/ai/http-request/domain/request.php
1
<?php
2
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
3
// phpcs:disable Yoast.NamingConventions.NamespaceName.MaxExceeded
4
namespace Yoast\WP\SEO\AI\HTTP_Request\Domain;
5

6
/**
7
 * Class Request
8
 * Represents a request to the AI Generator API.
9
 */
10
class Request {
11

12
        /**
13
         * The action path for the request.
14
         *
15
         * @var string
16
         */
17
        private $action_path;
18

19
        /**
20
         * The body of the request.
21
         *
22
         * @var array<string>
23
         */
24
        private $body;
25

26
        /**
27
         * The headers for the request.
28
         *
29
         * @var array<string>
30
         */
31
        private $headers;
32

33
        /**
34
         * Whether the request is a POST request.
35
         *
36
         * @var bool
37
         */
38
        private $is_post;
39

40
        /**
41
         * Constructor for the Request class.
42
         *
43
         * @param string        $action_path The action path for the request.
44
         * @param array<string> $body        The body of the request.
45
         * @param array<string> $headers     The headers for the request.
46
         * @param bool          $is_post     Whether the request is a POST request. Default is true.
47
         */
NEW
48
        public function __construct( string $action_path, array $body = [], array $headers = [], bool $is_post = true ) {
×
NEW
49
                $this->action_path = $action_path;
×
NEW
50
                $this->body        = $body;
×
NEW
51
                $this->headers     = $headers;
×
NEW
52
                $this->is_post     = $is_post;
×
53
        }
54

55
        /**
56
         * Get the action path for the request.
57
         *
58
         * @return string The action path for the request.
59
         */
NEW
60
        public function get_action_path(): string {
×
NEW
61
                return $this->action_path;
×
62
        }
63

64
        /**
65
         * Get the body of the request.
66
         *
67
         * @return array<string> The body of the request.
68
         */
NEW
69
        public function get_body(): array {
×
NEW
70
                return $this->body;
×
71
        }
72

73
        /**
74
         * Get the headers for the request.
75
         *
76
         * @return array<string> The headers for the request.
77
         */
NEW
78
        public function get_headers(): array {
×
NEW
79
                return $this->headers;
×
80
        }
81

82
        /**
83
         * Whether the request is a POST request.
84
         *
85
         * @return bool True if the request is a POST request, false otherwise.
86
         */
NEW
87
        public function is_post(): bool {
×
NEW
88
                return $this->is_post;
×
89
        }
90
}
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