]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/OpenWebAuthToken.php
Merge pull request #13161 from annando/bluesky-activities
[friendica.git] / src / Model / OpenWebAuthToken.php
index 5071b00d3a594a2e59b9b1276be4def3f0415af2..4186467c15ef299a3647d3dd7eda32e029ac9bf5 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -36,17 +36,16 @@ class OpenWebAuthToken
         * @param int    $uid  The user ID.
         * @param string $token
         * @param string $meta
-        *
         * @return boolean
         * @throws \Exception
         */
-       public static function create(string $type, uid $uid, string $token, string $meta)
+       public static function create(string $type, int $uid, string $token, string $meta)
        {
                $fields = [
-                       'type' => $type,
-                       'uid' => $uid,
-                       'token' => $token,
-                       'meta' => $meta,
+                       'type'    => $type,
+                       'uid'     => $uid,
+                       'token'   => $token,
+                       'meta'    => $meta,
                        'created' => DateTimeFormat::utcNow()
                ];
                return DBA::insert('openwebauth-token', $fields);
@@ -59,7 +58,7 @@ class OpenWebAuthToken
         * @param int    $uid  The user ID.
         * @param string $token
         *
-        * @return string|boolean The meta enry or false if not found.
+        * @return string|boolean The meta entry or false if not found.
         * @throws \Exception
         */
        public static function getMeta(string $type, int $uid, string $token)
@@ -80,6 +79,7 @@ class OpenWebAuthToken
         *
         * @param string $type     Verify type.
         * @param string $interval SQL compatible time interval
+        * @return void
         * @throws \Exception
         */
        public static function purge(string $type, string $interval)