Completed
Pull Request — master (#15)
by Helpful
02:08
created
code/HybridSessionStore.php 1 patch
Doc Comments   +8 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
     private $saltedKey;
57 57
 
58 58
     /**
59
-     * @param $key a per-site secret string which is used as the base encryption key.
60
-     * @param $salt a per-session random string which is used as a salt to generate a per-session key
59
+     * @param string $key a per-site secret string which is used as the base encryption key.
60
+     * @param string $salt a per-session random string which is used as a salt to generate a per-session key
61 61
      *
62 62
      * The base encryption key needs to stay secret. If an attacker ever gets it, they can read their session,
63 63
      * and even modify & re-sign it.
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     /**
83 83
      * Encrypt and then sign some cleartext
84 84
      *
85
-     * @param $cleartext - The cleartext to encrypt and sign
85
+     * @param string $cleartext - The cleartext to encrypt and sign
86 86
      * @return string - The encrypted-and-signed message as base64 ASCII.
87 87
      */
88 88
     public function encrypt($cleartext)
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
     /**
106 106
      * Check the signature on an encrypted-and-signed message, and if valid decrypt the content
107 107
      *
108
-     * @param $data - The encrypted-and-signed message as base64 ASCII
109
-     * @return bool|string - The decrypted cleartext or false if signature failed
108
+     * @param string $data - The encrypted-and-signed message as base64 ASCII
109
+     * @return string|false - The decrypted cleartext or false if signature failed
110 110
      */
111 111
     public function decrypt($data)
112 112
     {
@@ -467,6 +467,9 @@  discard block
 block discarded – undo
467 467
         $this->setKey($this->getKey());
468 468
     }
469 469
 
470
+    /**
471
+     * @param string $key
472
+     */
470 473
     public function setKey($key)
471 474
     {
472 475
         parent::setKey($key);
Please login to merge, or discard this patch.