diff --git a/src/PubNub/CryptoModule.php b/src/PubNub/CryptoModule.php index 47c71f96..b3b1c2e3 100644 --- a/src/PubNub/CryptoModule.php +++ b/src/PubNub/CryptoModule.php @@ -178,7 +178,7 @@ public function parseInput(string | object $input): string throw new PubNubResponseParsingException("Decryption error: message is not a string or object"); } - if (strlen($input) == '') { + if (trim($input) == '') { throw new PubNubResponseParsingException("Decryption error: message is empty"); } return $input; diff --git a/src/PubNub/Endpoints/Access/GrantToken.php b/src/PubNub/Endpoints/Access/GrantToken.php index fbe41a5e..80857651 100644 --- a/src/PubNub/Endpoints/Access/GrantToken.php +++ b/src/PubNub/Endpoints/Access/GrantToken.php @@ -246,7 +246,7 @@ public function sync(): string /** * @param string $token - * @return : string + * @return string */ public function createResponse($response): string { diff --git a/src/PubNub/Models/Consumer/FileSharing/PNGetFileDownloadURLResult.php b/src/PubNub/Models/Consumer/FileSharing/PNGetFileDownloadURLResult.php index e13fa413..8620d8b2 100644 --- a/src/PubNub/Models/Consumer/FileSharing/PNGetFileDownloadURLResult.php +++ b/src/PubNub/Models/Consumer/FileSharing/PNGetFileDownloadURLResult.php @@ -13,7 +13,7 @@ public function __construct($result) public function __toString() { - return "Get file URL success with URL: %s" % $this->fileUrl; + return sprintf("Get file URL success with URL: %s", $this->fileUrl); } public function getFileUrl()