PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.2
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.2
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 / ai-authorization / infrastructure / code-verifier-user-meta-repository-interface.php

code-verifier-user-meta-repository-interface.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 28.2, at src/ai-authorization/infrastructure/code-verifier-user-meta-repository-interface.php

47 lines 1.3 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\AI_Authorization\Infrastructure;
4
5 use RuntimeException;
6 use Yoast\WP\SEO\AI_Authorization\Domain\Code_Verifier;
7
8 // phpcs:disable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded
9 /**
10 * Interface for the Code Verifier User Meta Repository.
11 *
12 * This interface defines methods for managing code verifiers associated with users.
13 */
14 interface Code_Verifier_User_Meta_Repository_Interface {
15
16 /**
17 * Get the verification code for a user.
18 *
19 * @param int $user_id The user ID.
20 *
21 * @throws RuntimeException If the code verifier is not found or has expired.
22 * @return Code_Verifier The verification code or null if not found.
23 */
24 public function get_code_verifier( int $user_id ): ?Code_Verifier;
25
26 /**
27 * Store the verification code for a user.
28 *
29 * @param int $user_id The user ID.
30 * @param string $code The code verifier.
31 * @param int $created_at The time the code was created.
32 *
33 * @return void
34 */
35 public function store_code_verifier( int $user_id, string $code, int $created_at ): void;
36
37 /**
38 * Delete the verification code for a user.
39 *
40 * @param int $user_id The user ID.
41 *
42 * @return void
43 */
44 public function delete_code_verifier( int $user_id ): void;
45 }
46 //phpcs:enable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded
47