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

Yoast / wordpress-seo / e57e01309ec9fc3afc714e6ce0fd243e7b6d1f90

27 May 2025 12:40PM UTC coverage: 45.733%. First build
e57e01309ec9fc3afc714e6ce0fd243e7b6d1f90

Pull #22275

github

web-flow
Merge f0a8d33c9 into 5f64dc203
Pull Request #22275: Move and refactor ai generator rest endpoints

0 of 392 new or added lines in 26 files covered. (0.0%)

15548 of 33997 relevant lines covered (45.73%)

3.64 hits per line

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

0.0
/src/ai-generator/domain/suggestions-bucket.php
1
<?php
2

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

5
/**
6
 * Class Suggestion_Bucket
7
 * Represents a collection of Suggestion objects.
8
 */
9
class Suggestions_Bucket {
10

11
        /**
12
         * The suggestions.
13
         *
14
         * @var array<Suggestion>
15
         */
16
        private $suggestions;
17

18
        /**
19
         * Class constructor.
20
         */
NEW
21
        public function __construct() {
×
NEW
22
                $this->suggestions = [];
×
23
        }
24

25
        /**
26
         * Adds a suggestion to the bucket.
27
         *
28
         * @param Suggestion $suggestion The suggestion to add.
29
         *
30
         * @return void
31
         */
NEW
32
        public function add_suggestion( Suggestion $suggestion ) {
×
NEW
33
                $this->suggestions[] = $suggestion;
×
34
        }
35

36
        /**
37
         * Returns the suggestions as an array.
38
         *
39
         * @return array<string>
40
         */
NEW
41
        public function to_array() {
×
NEW
42
                return \array_map(
×
NEW
43
                        static function ( $item ) {
×
NEW
44
                                return $item->get_value();
×
NEW
45
                        },
×
NEW
46
                        $this->suggestions
×
NEW
47
                );
×
48
        }
49
}
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

© 2025 Coveralls, Inc