Skip to content

Commit

Permalink
🎨 update isSandboxMode method and fix strict types warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
acedraz committed May 6, 2022
1 parent 2165a36 commit f76dade
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions Gateway/Transaction/Base/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,10 @@ public function getHubEnvironment(): ?string
*/
public function isSandboxMode(): bool
{
if (
$this->getHubEnvironment() === static::HUB_SANDBOX_ENVIRONMENT ||
return ( $this->getHubEnvironment() === static::HUB_SANDBOX_ENVIRONMENT ||
strpos($this->getSecretKey(), 'sk_test') !== false ||
strpos($this->getPublicKey(), 'pk_test') !== false
) {
return true;
}
return false;
);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions Model/Notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
class Notifications extends Message
{

/** @var array|null */
protected ?array $warnings = [];
/** @var array */
protected array $warnings = [];

/**
* @param ConfigInterface $config
Expand Down

0 comments on commit f76dade

Please sign in to comment.