| 1 |
<?php |
| 2 |
|
| 3 |
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Given it's a very specific case. |
| 4 |
namespace Yoast\WP\SEO\Task_List\Domain\Tasks; |
| 5 |
|
| 6 |
use Yoast\WP\SEO\Task_List\Domain\Components\Call_To_Action_Entry; |
| 7 |
use Yoast\WP\SEO\Task_List\Domain\Components\Copy_Set; |
| 8 |
|
| 9 |
/** |
| 10 |
* Represents a task. |
| 11 |
*/ |
| 12 |
interface Task_Interface { |
| 13 |
|
| 14 |
/** |
| 15 |
* Returns the task ID. |
| 16 |
* |
| 17 |
* @return string |
| 18 |
*/ |
| 19 |
public function get_id(): string; |
| 20 |
|
| 21 |
/** |
| 22 |
* Returns whether this task is completed. |
| 23 |
* |
| 24 |
* @return bool |
| 25 |
*/ |
| 26 |
public function get_is_completed(): bool; |
| 27 |
|
| 28 |
/** |
| 29 |
* Returns an array representation of the task data. |
| 30 |
* |
| 31 |
* @return array<string, string|bool> |
| 32 |
*/ |
| 33 |
public function to_array(): array; |
| 34 |
|
| 35 |
/** |
| 36 |
* Returns the task's priority. |
| 37 |
* |
| 38 |
* @return string |
| 39 |
*/ |
| 40 |
public function get_priority(): string; |
| 41 |
|
| 42 |
/** |
| 43 |
* Returns the task's duration. |
| 44 |
* |
| 45 |
* @return int |
| 46 |
*/ |
| 47 |
public function get_duration(): int; |
| 48 |
|
| 49 |
/** |
| 50 |
* Returns the task's link. |
| 51 |
* |
| 52 |
* @return string|null |
| 53 |
*/ |
| 54 |
public function get_link(): ?string; |
| 55 |
|
| 56 |
/** |
| 57 |
* Returns the task's badge. |
| 58 |
* |
| 59 |
* @return string|null |
| 60 |
*/ |
| 61 |
public function get_badge(): ?string; |
| 62 |
|
| 63 |
/** |
| 64 |
* Returns the task's call to action. |
| 65 |
* |
| 66 |
* @return Call_To_Action_Entry|null |
| 67 |
*/ |
| 68 |
public function get_call_to_action(): ?Call_To_Action_Entry; |
| 69 |
|
| 70 |
/** |
| 71 |
* Returns the task's copy set. |
| 72 |
* |
| 73 |
* @return Copy_Set |
| 74 |
*/ |
| 75 |
public function get_copy_set(): Copy_Set; |
| 76 |
|
| 77 |
/** |
| 78 |
* Sets the enhanced call to action. |
| 79 |
* |
| 80 |
* @param Call_To_Action_Entry $enhanced_call_to_action The enhanced call to action. |
| 81 |
* |
| 82 |
* @return void |
| 83 |
*/ |
| 84 |
public function set_enhanced_call_to_action( ?Call_To_Action_Entry $enhanced_call_to_action ): void; |
| 85 |
|
| 86 |
/** |
| 87 |
* Returns the enhanced call to action. |
| 88 |
* |
| 89 |
* @return Call_To_Action_Entry|null |
| 90 |
*/ |
| 91 |
public function get_enhanced_call_to_action(): ?Call_To_Action_Entry; |
| 92 |
|
| 93 |
/** |
| 94 |
* Returns whether the task is valid. |
| 95 |
* |
| 96 |
* @return bool |
| 97 |
*/ |
| 98 |
public function is_valid(): bool; |
| 99 |
} |
| 100 |
|