Skip to content

Commit

Permalink
linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
seba-aln committed Oct 18, 2024
1 parent 1ed00d0 commit a2ff29e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/PubNub/CryptoModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 5 additions & 4 deletions src/PubNub/Endpoints/Access/GrantToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

namespace PubNub\Endpoints\Access;


use PubNub\Endpoints\Endpoint;
use PubNub\Exceptions\PubNubValidationException;
use PubNub\Models\Consumer\AccessManager\PNAccessManagerGrantResult;
use PubNub\PubNubUtil;
use PubNub\Enums\PNHttpMethod;
use PubNub\Enums\PNOperationType;
use PubNub\Exceptions\PubNubTokenParseException;
use PubNub\Models\Consumer\AccessManager\PNAccessManagerTokenResult;
use PubNub\PubNubCborDecode;


class GrantToken extends Endpoint
{
protected const PATH = '/v3/pam/%s/grant';
Expand Down Expand Up @@ -239,16 +240,16 @@ public function buildPath()
/**
* @return string
*/
public function sync(): string
public function sync() : string
{
return parent::sync();
}

/**
* @param string $token
* @return : string
* @return string
*/
public function createResponse($response): string
public function createResponse($response) : string
{
return $response['data']['token'];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace PubNub\Models\Consumer\FileSharing;


class PNGetFileDownloadURLResult
{
protected string $fileUrl;
Expand All @@ -13,7 +14,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()
Expand Down

0 comments on commit a2ff29e

Please sign in to comment.