Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Mar 13, 2023
1 parent 08f510b commit f5de869
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/CookieCollection.php
Expand Up @@ -28,6 +28,7 @@ final class CookieCollection implements IteratorAggregate, ArrayAccess, Countabl
{
/**
* @var Cookie[] The cookies in this collection (indexed by the cookie name).
*
* @psalm-var array<string, Cookie>
*/
private array $cookies = [];
Expand Down Expand Up @@ -239,6 +240,7 @@ public function contains(Cookie $cookie): bool
* Tests for the existence of the cookie that satisfies the given predicate.
*
* @param callable $p The predicate.
*
* @psalm-param callable(Cookie, string):bool $p
*
* @return bool Whether the predicate is true for at least on cookie.
Expand Down Expand Up @@ -281,6 +283,7 @@ public function expire(string $name): void
* parameter of the callback as reference.
*
* @param callable $callback
*
* @psalm-param callable(Cookie, string):void $callback
*/
public function walk(callable $callback): void
Expand Down
4 changes: 2 additions & 2 deletions tests/CookieTest.php
Expand Up @@ -76,13 +76,13 @@ public function testWithExpires(): void

public function testIsExpiredTrue(): void
{
$cookie = (new Cookie('test', '42'))->withExpires((new DateTimeImmutable('-5 years')));
$cookie = (new Cookie('test', '42'))->withExpires(new DateTimeImmutable('-5 years'));
$this->assertTrue($cookie->isExpired());
}

public function testIsExpiredFalse(): void
{
$cookie = (new Cookie('test', '42'))->withExpires((new DateTimeImmutable('+5 years')));
$cookie = (new Cookie('test', '42'))->withExpires(new DateTimeImmutable('+5 years'));
$this->assertFalse($cookie->isExpired());
}

Expand Down

0 comments on commit f5de869

Please sign in to comment.