Skip to content

Commit

Permalink
Fix stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Sep 5, 2024
1 parent 14eec8c commit 3cf113f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ interface EventDispatcherInterface
*
* @return TEvent
*/
public function dispatch(object $event, string $eventName = null): object;
public function dispatch(object $event, ?string $eventName = null): object;
}
4 changes: 2 additions & 2 deletions stubs/Symfony/Component/HttpFoundation/Cookie.stub
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Cookie
*
* @throws \InvalidArgumentException
*/
public function __construct(string $name, string $value = null, $expire = 0, ?string $path = '/', string $domain = null, ?bool $secure = false, bool $httpOnly = true, bool $raw = false, string $sameSite = null);
public function __construct(string $name, ?string $value = null, $expire = 0, ?string $path = '/', ?string $domain = null, ?bool $secure = false, bool $httpOnly = true, bool $raw = false, ?string $sameSite = null);

/**
* @param string $name The name of the cookie
Expand All @@ -36,7 +36,7 @@ class Cookie
*
* @throws \InvalidArgumentException
*/
public function create(string $name, string $value = null, $expire = 0, ?string $path = '/', string $domain = null, ?bool $secure = false, bool $httpOnly = true, bool $raw = false, string $sameSite = null): self;
public function create(string $name, ?string $value = null, $expire = 0, ?string $path = '/', ?string $domain = null, ?bool $secure = false, bool $httpOnly = true, bool $raw = false, ?string $sameSite = null): self;

/**
* @return self::SAMESITE_*|null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ExtraAttributesException extends RuntimeException
/**
* @param string[] $extraAttributes
*/
public function __construct(array $extraAttributes, \Throwable $previous = null)
public function __construct(array $extraAttributes, ?\Throwable $previous = null)
{
}

Expand Down
2 changes: 1 addition & 1 deletion stubs/Symfony/Contracts/Cache/CacheInterface.stub
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ interface CacheInterface
*
* @throws InvalidArgumentException
*/
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null);
public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null);
}

0 comments on commit 3cf113f

Please sign in to comment.