PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / trunk
Yoast SEO – Advanced SEO with real-time guidance and built-in AI vtrunk
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 / to-be-cleaned-indexable-bucket.php

to-be-cleaned-indexable-bucket.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI trunk, at src/analytics/domain/to-be-cleaned-indexable-bucket.php

49 lines 1.0 KB
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 To_Be_Cleaned_Indexable_Bucket {
9
10 /**
11 * All the to be cleaned indexable count objects.
12 *
13 * @var array<To_Be_Cleaned_Indexable_Count>
14 */
15 private $to_be_cleaned_indexable_counts;
16
17 /**
18 * The constructor.
19 */
20 public function __construct() {
21 $this->to_be_cleaned_indexable_counts = [];
22 }
23
24 /**
25 * Adds a 'to be cleaned' indexable count object to this bucket.
26 *
27 * @param To_Be_Cleaned_Indexable_Count $to_be_cleaned_indexable_counts The to be cleaned indexable count object.
28 *
29 * @return void
30 */
31 public function add_to_be_cleaned_indexable_count( To_Be_Cleaned_Indexable_Count $to_be_cleaned_indexable_counts ) {
32 $this->to_be_cleaned_indexable_counts[] = $to_be_cleaned_indexable_counts;
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->to_be_cleaned_indexable_counts,
46 );
47 }
48 }
49