| 1 |
<?php |
| 2 |
|
| 3 |
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure. |
| 4 |
|
| 5 |
namespace Yoast\WP\SEO\AI\Free_Sparks\Application; |
| 6 |
|
| 7 |
/** |
| 8 |
* Interface Consent_Handler_Interface |
| 9 |
* |
| 10 |
* This interface defines the methods for handling user consent. |
| 11 |
*/ |
| 12 |
interface Free_Sparks_Handler_Interface { |
| 13 |
|
| 14 |
/** |
| 15 |
* Retrieves the timestamp. |
| 16 |
* |
| 17 |
* @param string $format The format in which to return the timestamp. Defaults to 'Y-m-d H:i:s'. |
| 18 |
* |
| 19 |
* @return ?string The timestamp when the user started using free sparks, or null if not set. |
| 20 |
*/ |
| 21 |
public function get( string $format = 'Y-m-d H:i:s' ): ?string; |
| 22 |
|
| 23 |
/** |
| 24 |
* Registers the starting of the free sparks. |
| 25 |
* |
| 26 |
* @param ?int $timestamp The timestamp when the user started using free sparks. If null, the current time will be |
| 27 |
* used. |
| 28 |
* |
| 29 |
* @return bool True if the operation was successful, false otherwise. |
| 30 |
*/ |
| 31 |
public function start( ?int $timestamp = null ): bool; |
| 32 |
} |
| 33 |
|