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

Yoast / wordpress-seo / 329e7257b699570577e9617a4ea672714686da15

26 Jan 2026 07:52AM UTC coverage: 52.923% (-0.4%) from 53.35%
329e7257b699570577e9617a4ea672714686da15

Pull #22888

github

web-flow
Merge 00d428c6c into ff2f33de1
Pull Request #22888: Add integration tests for analytics adapter

8393 of 15825 branches covered (53.04%)

Branch coverage included in aggregate %.

32383 of 61223 relevant lines covered (52.89%)

47097.05 hits per line

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

0.0
/src/dashboard/domain/data-provider/data-container.php
1
<?php
2

3
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
4
namespace Yoast\WP\SEO\Dashboard\Domain\Data_Provider;
5

6
/**
7
 * The data container.
8
 */
9
class Data_Container {
10

11
        /**
12
         * All the data points.
13
         *
14
         * @var array<Data_Interface>
15
         */
16
        private $data_container;
17

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

25
        /**
26
         * Method to add data.
27
         *
28
         * @param Data_Interface $data The data.
29
         *
30
         * @return void
31
         */
32
        public function add_data( Data_Interface $data ) {
×
33
                $this->data_container[] = $data;
×
34
        }
35

36
        /**
37
         * Method to get all the data points.
38
         *
39
         * @return Data_Interface[] All the data points.
40
         */
41
        public function get_data(): array {
×
42
                return $this->data_container;
×
43
        }
44

45
        /**
46
         * Converts the data points into an array.
47
         *
48
         * @return array<string, string> The array of the data points.
49
         */
50
        public function to_array(): array {
×
51
                $result = [];
×
52
                foreach ( $this->data_container as $data ) {
×
53
                        $result[] = $data->to_array();
×
54
                }
55

56
                return $result;
×
57
        }
58
}
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