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

49 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
4
5 namespace Yoast\WP\SEO\AI\Authorization\Infrastructure;
6
7 use RuntimeException;
8 use Yoast\WP\SEO\AI\Authorization\Domain\Code_Verifier;
9
10 // phpcs:disable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded
11 /**
12 * Interface for the Code Verifier User Meta Repository.
13 *
14 * This interface defines methods for managing code verifiers associated with users.
15 */
16 interface Code_Verifier_User_Meta_Repository_Interface {
17
18 /**
19 * Get the verification code for a user.
20 *
21 * @param int $user_id The user ID.
22 *
23 * @throws RuntimeException If the code verifier is not found or has expired.
24 * @return Code_Verifier The verification code or null if not found.
25 */
26 public function get_code_verifier( int $user_id ): ?Code_Verifier;
27
28 /**
29 * Store the verification code for a user.
30 *
31 * @param int $user_id The user ID.
32 * @param string $code The code verifier.
33 * @param int $created_at The time the code was created.
34 *
35 * @return void
36 */
37 public function store_code_verifier( int $user_id, string $code, int $created_at ): void;
38
39 /**
40 * Delete the verification code for a user.
41 *
42 * @param int $user_id The user ID.
43 *
44 * @return void
45 */
46 public function delete_code_verifier( int $user_id ): void;
47 }
48 //phpcs:enable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded
49