Skip to content

Commit

Permalink
Merge pull request #61 from joanhey/cookie-samesite
Browse files Browse the repository at this point in the history
Clean checkCookieSamesite()
  • Loading branch information
joanhey authored Jan 5, 2024
2 parents 9903634 + 7f447d7 commit bc97368
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,7 @@ public static function setCookie(

protected static function checkCookieSamesite(string $samesite): bool
{
$valid = ['None', 'Lax', 'Strict'];

if(\in_array($samesite, $valid)) {
return true;
}

return false;
return \in_array($samesite, ['None', 'Lax', 'Strict']);
}

/**
Expand Down

0 comments on commit bc97368

Please sign in to comment.