diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index f9ac3628..93d2cefa 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -3145,11 +3145,6 @@ parameters: count: 1 path: src/PubNub/Models/Consumer/FileSharing/PNGetFileDownloadURLResult.php - - - message: "#^Method PubNub\\\\Models\\\\Consumer\\\\FileSharing\\\\PNGetFileDownloadURLResult\\:\\:__toString\\(\\) should return string but returns int\\.$#" - count: 1 - path: src/PubNub/Models/Consumer/FileSharing/PNGetFileDownloadURLResult.php - - message: "#^Method PubNub\\\\Models\\\\Consumer\\\\FileSharing\\\\PNGetFileDownloadURLResult\\:\\:getFileUrl\\(\\) has no return type specified\\.$#" count: 1 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/Models/Consumer/FileSharing/PNGetFileDownloadURLResult.php b/src/PubNub/Models/Consumer/FileSharing/PNGetFileDownloadURLResult.php index e13fa413..54b0fe63 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 "Get file URL success with URL: {$this->fileUrl}"; } public function getFileUrl()