Skip to content

Commit

Permalink
refactor: ECS code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Feb 13, 2024
1 parent eac2a77 commit a72bd56
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
6 changes: 2 additions & 4 deletions src/services/CookiesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ public function set(
bool $secure = false,
bool $httpOnly = false,
string $sameSite = 'Lax',
): void
{
): void {
if (empty($value)) {
Craft::$app->response->cookies->remove($name);
} else {
Expand Down Expand Up @@ -80,8 +79,7 @@ public function setSecure(
bool $secure = false,
bool $httpOnly = false,
string $sameSite = 'Lax',
): void
{
): void {
if (empty($value)) {
Craft::$app->response->cookies->remove($name);
} else {
Expand Down
6 changes: 2 additions & 4 deletions src/twigextensions/CookiesTwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ public function setCookie(
bool $secure = false,
bool $httpOnly = false,
string $sameSite = 'Lax',
): void
{
): void {
Cookies::$plugin->cookies->set(
$name,
$value,
Expand Down Expand Up @@ -104,8 +103,7 @@ public function setSecureCookie(
bool $secure = false,
bool $httpOnly = false,
string $sameSite = 'Lax',
): void
{
): void {
Cookies::$plugin->cookies->setSecure(
$name,
$value,
Expand Down
6 changes: 2 additions & 4 deletions src/variables/CookiesVariable.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ public function set(
bool $secure = false,
bool $httpOnly = false,
string $sameSite = 'Lax',
): void
{
): void {
Cookies::$plugin->cookies->set(
$name,
$value,
Expand Down Expand Up @@ -67,8 +66,7 @@ public function setSecure(
bool $secure = false,
bool $httpOnly = false,
string $sameSite = 'Lax',
): void
{
): void {
Cookies::$plugin->cookies->setSecure(
$name,
$value,
Expand Down

0 comments on commit a72bd56

Please sign in to comment.