Skip to content

Commit

Permalink
Don't Require TokenInterface to Name Constructors of Context
Browse files Browse the repository at this point in the history
  • Loading branch information
zanbaldwin committed Apr 22, 2024
1 parent ae14a10 commit b3e3fed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ValueObject/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ public static function console(): self
return new self(AuditSource::CONSOLE, null, null);
}

public static function ui(Request $request, TokenInterface $token): self
public static function ui(Request $request, ?TokenInterface $token): self
{
return new self(AuditSource::UI, $token, IpAddress::fromRequest($request));
}

public static function api(Request $request, TokenInterface $token): self
public static function api(Request $request, ?TokenInterface $token): self
{
return new self(AuditSource::API, $token, IpAddress::fromRequest($request));
}
Expand Down

0 comments on commit b3e3fed

Please sign in to comment.