Add proper return types to SessionHandler::(get|check)SecurityToken()
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 4 Mar 2022 13:25:31 +0000 (14:25 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 4 Mar 2022 13:25:54 +0000 (14:25 +0100)
wcfsetup/install/files/lib/system/session/SessionHandler.class.php

index 0f4b5ca7340c704ef9f5b0ccd904fe60a0f81239..a75670e70dbd1c82f13d9715d25886144f8e5b88 100644 (file)
@@ -517,10 +517,8 @@ final class SessionHandler extends SingletonFactory
 
     /**
      * Returns security token.
-     *
-     * @return  string
      */
-    public function getSecurityToken()
+    public function getSecurityToken(): string
     {
         if ($this->xsrfToken === null) {
             $this->initSecurityToken();
@@ -534,9 +532,8 @@ final class SessionHandler extends SingletonFactory
      * given token is invalid.
      *
      * @param string $token
-     * @return  bool
      */
-    public function checkSecurityToken($token)
+    public function checkSecurityToken($token): bool
     {
         // The output of CryptoUtil::createSignedString() is not url-safe. For compatibility
         // reasons the SECURITY_TOKEN in URLs might not be encoded, turning the '+' into a space.