| 1 |
<?php |
| 2 |
|
| 3 |
namespace Yoast\WP\SEO\Analytics\Domain; |
| 4 |
|
| 5 |
/** |
| 6 |
* The to be cleaned indexable domain object. |
| 7 |
*/ |
| 8 |
class To_Be_Cleaned_Indexable_Count { |
| 9 |
|
| 10 |
/** |
| 11 |
* The cleanup task that is represented by this. |
| 12 |
* |
| 13 |
* @var string |
| 14 |
*/ |
| 15 |
private $cleanup_name; |
| 16 |
|
| 17 |
/** |
| 18 |
* The amount of missing indexables. |
| 19 |
* |
| 20 |
* @var int |
| 21 |
*/ |
| 22 |
private $count; |
| 23 |
|
| 24 |
/** |
| 25 |
* The constructor. |
| 26 |
* |
| 27 |
* @param string $cleanup_name The indexable type that is represented by this. |
| 28 |
* @param int $count The amount of missing indexables. |
| 29 |
*/ |
| 30 |
public function __construct( $cleanup_name, $count ) { |
| 31 |
$this->cleanup_name = $cleanup_name; |
| 32 |
$this->count = $count; |
| 33 |
} |
| 34 |
|
| 35 |
/** |
| 36 |
* Returns an array representation of the data. |
| 37 |
* |
| 38 |
* @return array Returns both values in an array format. |
| 39 |
*/ |
| 40 |
public function to_array() { |
| 41 |
return [ |
| 42 |
'cleanup_name' => $this->get_cleanup_name(), |
| 43 |
'count' => $this->get_count(), |
| 44 |
]; |
| 45 |
} |
| 46 |
|
| 47 |
/** |
| 48 |
* Gets the name. |
| 49 |
* |
| 50 |
* @return string |
| 51 |
*/ |
| 52 |
public function get_cleanup_name() { |
| 53 |
return $this->cleanup_name; |
| 54 |
} |
| 55 |
|
| 56 |
/** |
| 57 |
* Gets the count. |
| 58 |
* |
| 59 |
* @return int Returns the amount of missing indexables. |
| 60 |
*/ |
| 61 |
public function get_count() { |
| 62 |
return $this->count; |
| 63 |
} |
| 64 |
} |
| 65 |
|