From 8d0036eaac16beffdcfd8bc8f9a386aae50a7a7b Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Mon, 23 Dec 2024 11:26:50 +0900 Subject: [PATCH] Fix phpdoc return types --- www/lib/CoreLibs/Create/Session.php | 8 ++++---- .../CoreLibs/Security/AsymmetricAnonymousEncryption.php | 4 ++-- www/lib/CoreLibs/Security/SymmetricEncryption.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/www/lib/CoreLibs/Create/Session.php b/www/lib/CoreLibs/Create/Session.php index 5932e75b..4440b47e 100644 --- a/www/lib/CoreLibs/Create/Session.php +++ b/www/lib/CoreLibs/Create/Session.php @@ -363,7 +363,7 @@ class Session * set the auto write close flag * * @param bool $flag - * @return void + * @return Session */ public function setAutoWriteClose(bool $flag): Session { @@ -514,7 +514,7 @@ class Session * * @param string $name array name in _SESSION * @param mixed $value value to set (can be anything) - * @return void + * @return Session */ public function set(string $name, mixed $value): Session { @@ -579,12 +579,12 @@ class Session * unset one _SESSION entry 'name' if exists * * @param string $name _SESSION key name to remove - * @return void + * @return Session */ public function unset(string $name): Session { if (!isset($_SESSION[$name])) { - return; + return $this; } $this->restartSession(); unset($_SESSION[$name]); diff --git a/www/lib/CoreLibs/Security/AsymmetricAnonymousEncryption.php b/www/lib/CoreLibs/Security/AsymmetricAnonymousEncryption.php index 82d16213..46b01e7a 100644 --- a/www/lib/CoreLibs/Security/AsymmetricAnonymousEncryption.php +++ b/www/lib/CoreLibs/Security/AsymmetricAnonymousEncryption.php @@ -256,7 +256,7 @@ class AsymmetricAnonymousEncryption * sets the private key for encryption * * @param string $key_pair Key pair in hex - * @return void + * @return AsymmetricAnonymousEncryption * @throws \UnexpectedValueException key pair empty */ public function setKeyPair( @@ -309,7 +309,7 @@ class AsymmetricAnonymousEncryption * extract the public key from the key pair * * @param string $public_key Public Key in hex - * @return void + * @return AsymmetricAnonymousEncryption * @throws \UnexpectedValueException public key empty */ public function setPublicKey(string $public_key): AsymmetricAnonymousEncryption diff --git a/www/lib/CoreLibs/Security/SymmetricEncryption.php b/www/lib/CoreLibs/Security/SymmetricEncryption.php index ed0ca398..08826212 100644 --- a/www/lib/CoreLibs/Security/SymmetricEncryption.php +++ b/www/lib/CoreLibs/Security/SymmetricEncryption.php @@ -209,7 +209,7 @@ class SymmetricEncryption * set a new key for encryption * * @param string $key - * @return void + * @return SymmetricEncryption * @throws \UnexpectedValueException key cannot be empty */ public function setKey(