PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.5
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.5
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / src / analytics / domain / missing-indexable-bucket.php

missing-indexable-bucket.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 28.5, at src/analytics/domain/missing-indexable-bucket.php

49 lines 986 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Yoast\WP\SEO\Analytics\Domain;
4
5 /**
6 * A collection domain object.
7 */
8 class Missing_Indexable_Bucket {
9
10 /**
11 * All the missing indexable count objects.
12 *
13 * @var array<Missing_Indexable_Count>
14 */
15 private $missing_indexable_counts;
16
17 /**
18 * The constructor.
19 */
20 public function __construct() {
21 $this->missing_indexable_counts = [];
22 }
23
24 /**
25 * Adds a missing indexable count object to this bucket.
26 *
27 * @param Missing_Indexable_Count $missing_indexable_count The missing indexable count object.
28 *
29 * @return void
30 */
31 public function add_missing_indexable_count( Missing_Indexable_Count $missing_indexable_count ): void {
32 $this->missing_indexable_counts[] = $missing_indexable_count;
33 }
34
35 /**
36 * Returns the array representation of all indexable counts.
37 *
38 * @return array
39 */
40 public function to_array() {
41 return \array_map(
42 static function ( $item ) {
43 return $item->to_array();
44 },
45 $this->missing_indexable_counts,
46 );
47 }
48 }
49