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

Yoast / wordpress-seo / 46633980f077012ef7e832792d9fdfb942c92947

15 Jul 2025 01:13PM UTC coverage: 52.595% (-1.0%) from 53.638%
46633980f077012ef7e832792d9fdfb942c92947

push

github

web-flow
Merge pull request #22436 from Yoast/feature/ai-generator-in-free-release

Feature/ai generator in free release

8341 of 15027 branches covered (55.51%)

Branch coverage included in aggregate %.

382 of 1769 new or added lines in 122 files covered. (21.59%)

2 existing lines in 2 files now uncovered.

30934 of 59648 relevant lines covered (51.86%)

40029.26 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

3
namespace Yoast\WP\SEO\AI_HTTP_Request\Domain;
4

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

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

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

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

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

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

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

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

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

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