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

Yoast / wordpress-seo / 5730cb79f488a5fed855d114b14f03b5a8cbf443

14 Jan 2025 01:34PM UTC coverage: 51.158%. First build
5730cb79f488a5fed855d114b14f03b5a8cbf443

Pull #21965

github

web-flow
Merge 8afb9bb5d into 9c6695675
Pull Request #21965: First run at a setup

0 of 103 new or added lines in 8 files covered. (0.0%)

16657 of 32560 relevant lines covered (51.16%)

3.96 hits per line

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

0.0
/src/dashboard/domain/search-rankings/search-data-container.php
1
<?php
2
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
3
namespace Yoast\WP\SEO\Dashboard\Domain\Search_Rankings;
4

5
/**
6
 * The search data container.
7
 */
8
class Search_Data_Container {
9

10
        /**
11
         * All the search data points.
12
         *
13
         * @var array<Search_Data> $search_data_container
14
         */
15
        private $search_data_container;
16

17
        /**
18
         * The constructor
19
         */
NEW
20
        public function __construct() {
×
NEW
21
                $this->search_data_container = [];
×
22
        }
23

24
        /**
25
         * Method to add search data.
26
         *
27
         * @param Search_Data $search_data The data.
28
         *
29
         * @return void
30
         */
NEW
31
        public function add_search_data( Search_Data $search_data ) {
×
NEW
32
                $this->search_data_container[] = $search_data;
×
33
        }
34

35
        /**
36
         * Converts the list to an array.
37
         *
38
         * @return array<string,string> The array of endpoints.
39
         */
NEW
40
        public function to_array(): array {
×
NEW
41
                $result = [];
×
NEW
42
                foreach ( $this->search_data_container as $search_data ) {
×
NEW
43
                        $result[] = $search_data->to_array();
×
44
                }
45

NEW
46
                return $result;
×
47
        }
48
}
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