Skip to content

Commit

Permalink
Fix DateTimeImmutable usage in Cookie.php
Browse files Browse the repository at this point in the history
Ensure the global namespace is used for DateTimeImmutable to avoid potential namespace conflicts. This change improves code reliability and maintains consistency throughout the file.
  • Loading branch information
Paul Bearne committed Nov 4, 2024
1 parent 6a8c726 commit 717110e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Cookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ protected function normalize_attribute($name, $value) {
return null;
}

$expiry_time = ( new DateTimeImmutable( $value ) )->getTimestamp();
$expiry_time = ( new \DateTimeImmutable( $value ) )->getTimestamp();

Check failure on line 331 in src/Cookie.php

View workflow job for this annotation

GitHub Actions / PHPCS

Expected 0 space after open parenthesis; 1 found

Check failure on line 331 in src/Cookie.php

View workflow job for this annotation

GitHub Actions / PHPCS

Space after opening parenthesis of function call prohibited

Check failure on line 331 in src/Cookie.php

View workflow job for this annotation

GitHub Actions / PHPCS

Expected 0 spaces before closing parenthesis; 1 found

Check failure on line 331 in src/Cookie.php

View workflow job for this annotation

GitHub Actions / PHPCS

Expected 0 space before close parenthesis; 1 found
if ($expiry_time === false) {
return null;
}
Expand Down

0 comments on commit 717110e

Please sign in to comment.