Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
Remove useless braces. (#814)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Michot authored Jun 21, 2021
1 parent 11cd366 commit 3438c96
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/ShopifyApp/Http/Middleware/AuthToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function handle(Request $request, Closure $next)
throw new HttpException('Malformed token', 400);
}

if (($now > $body->exp) || ($now < $body->nbf) || ($now < $body->iat)) {
if ($now > $body->exp || $now < $body->nbf || $now < $body->iat) {
throw new HttpException('Expired token', 403);
}

Expand Down
3 changes: 1 addition & 2 deletions src/ShopifyApp/Services/CookieHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ public function checkSameSiteNoneCompatible(): bool
$compatible = true;
}

if ($this->agent->is('OS X') &&
($this->agent->is('Safari') && ! $this->agent->is('iOS')) &&
if ($this->agent->is('OS X') && $this->agent->is('Safari') && ! $this->agent->is('iOS') &&
$platform['float'] > 10.14
) {
$compatible = true;
Expand Down
4 changes: 2 additions & 2 deletions src/ShopifyApp/Traits/ShopModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ public function plan(): BelongsTo
*/
public function isGrandfathered(): bool
{
return ((bool) $this->shopify_grandfathered) === true;
return (bool) $this->shopify_grandfathered === true;
}

/**
* {@inheritdoc}
*/
public function isFreemium(): bool
{
return ((bool) $this->shopify_freemium) === true;
return (bool) $this->shopify_freemium === true;
}

/**
Expand Down
7 changes: 5 additions & 2 deletions src/ShopifyApp/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function createHmac(array $opts, string $secret): string
$queryCompiled[] = "{$key}=".(is_array($value) ? implode(',', $value) : $value);
}
$data = implode(
($buildQueryWithJoin ? '&' : ''),
$buildQueryWithJoin ? '&' : '',
$queryCompiled
);
}
Expand Down Expand Up @@ -62,7 +62,10 @@ function parseQueryString(string $qs, string $d = null): array
$DEFAULT_SEP = '/[&;]\s*/';

$params = [];
$split = preg_split($d ? ($COMMON_SEP[$d] || '/['.$d.']\s*/') : $DEFAULT_SEP, $qs ?? '');
$split = preg_split(
$d ? $COMMON_SEP[$d] || '/['.$d.']\s*/' : $DEFAULT_SEP,
$qs ?? ''
);

foreach ($split as $p) {
if (! $p) {
Expand Down

0 comments on commit 3438c96

Please sign in to comment.