mirror of
https://github.com/standardebooks/web.git
synced 2025-07-14 18:42:00 -04:00
Fix PHPStan errors
This commit is contained in:
parent
6af2717773
commit
008ffc8ccd
5 changed files with 10 additions and 5 deletions
|
@ -1,9 +1,11 @@
|
|||
<?
|
||||
use Safe\DateTimeImmutable;
|
||||
|
||||
$hideDonationAlert = HttpInput::Bool(POST, 'hide-donation-alert');
|
||||
$colorScheme = HttpInput::Str(POST, 'color-scheme');
|
||||
|
||||
if($hideDonationAlert !== null){
|
||||
setcookie('hide-donation-alert', $hideDonationAlert ? 'true' : 'false', ['expires' => (new DateTimeImmutable('+1 month'))->format('U'), 'path' => '/', 'domain' => SITE_DOMAIN, 'secure' => true, 'httponly' => true, 'samesite' => 'Lax']);
|
||||
setcookie('hide-donation-alert', $hideDonationAlert ? 'true' : 'false', ['expires' => intval((new DateTimeImmutable('+1 month'))->format('U')), 'path' => '/', 'domain' => SITE_DOMAIN, 'secure' => true, 'httponly' => true, 'samesite' => 'Lax']);
|
||||
}
|
||||
|
||||
if($colorScheme !== null){
|
||||
|
@ -16,7 +18,7 @@ if($colorScheme !== null){
|
|||
setcookie('color-scheme', '', ['expires' => 0, 'path' => '/', 'domain' => SITE_DOMAIN, 'secure' => true, 'httponly' => true, 'samesite' => 'Lax']);
|
||||
}
|
||||
else{
|
||||
setcookie('color-scheme', $colorScheme, ['expires' => (new DateTimeImmutable('+1 year'))->format('U'), 'path' => '/', 'domain' => SITE_DOMAIN, 'secure' => true, 'httponly' => true, 'samesite' => 'Lax']);
|
||||
setcookie('color-scheme', $colorScheme, ['expires' => intval((new DateTimeImmutable('+1 year'))->format('U')), 'path' => '/', 'domain' => SITE_DOMAIN, 'secure' => true, 'httponly' => true, 'samesite' => 'Lax']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue