Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Naoray authored and github-actions[bot] committed Jun 19, 2023
1 parent d13f764 commit 292ad30
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/MollieApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ public function setApiKey($apiKey)
{
$apiKey = trim($apiKey);

if (!preg_match('/^(live|test)_\w{30,}$/', $apiKey)) {
if (! preg_match('/^(live|test)_\w{30,}$/', $apiKey)) {
throw new ApiException("Invalid API key: '{$apiKey}'. An API key must start with 'test_' or 'live_' and must be at least 30 characters long.");
}

Expand All @@ -465,7 +465,7 @@ public function setAccessToken($accessToken)
{
$accessToken = trim($accessToken);

if (!preg_match('/^access_\w+$/', $accessToken)) {
if (! preg_match('/^access_\w+$/', $accessToken)) {
throw new ApiException("Invalid OAuth access token: '{$accessToken}'. An access token must start with 'access_'.");
}

Expand Down Expand Up @@ -506,8 +506,8 @@ public function addVersionString($versionString)
public function enableDebugging()
{
if (
!method_exists($this->httpClient, 'supportsDebugging')
|| !$this->httpClient->supportsDebugging()
! method_exists($this->httpClient, 'supportsDebugging')
|| ! $this->httpClient->supportsDebugging()
) {
throw new HttpAdapterDoesNotSupportDebuggingException(
"Debugging is not supported by " . get_class($this->httpClient) . "."
Expand All @@ -526,8 +526,8 @@ public function enableDebugging()
public function disableDebugging()
{
if (
!method_exists($this->httpClient, 'supportsDebugging')
|| !$this->httpClient->supportsDebugging()
! method_exists($this->httpClient, 'supportsDebugging')
|| ! $this->httpClient->supportsDebugging()
) {
throw new HttpAdapterDoesNotSupportDebuggingException(
"Debugging is not supported by " . get_class($this->httpClient) . "."
Expand Down Expand Up @@ -659,7 +659,7 @@ public function performHttpCallToFullUrl($httpMethod, $url, $httpBody = null)
}

if (in_array($httpMethod, [self::HTTP_POST, self::HTTP_PATCH, self::HTTP_DELETE])) {
if (!$this->idempotencyKey && $this->idempotencyKeyGenerator) {
if (! $this->idempotencyKey && $this->idempotencyKeyGenerator) {
$headers['Idempotency-Key'] = $this->idempotencyKeyGenerator->generate();
}

Expand Down

0 comments on commit 292ad30

Please sign in to comment.