cancellazione modifiche dopo step before oauth

This commit is contained in:
2026-06-16 21:43:24 +02:00
parent 6001c2e3b8
commit c333bbce4e
5770 changed files with 677814 additions and 16 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
namespace Laravel\AgentDetector;
class AgentResult
{
public readonly bool $isAgent;
public function __construct(public readonly ?string $name = null)
{
$this->isAgent = $name !== null;
}
public static function forAgent(KnownAgent|string $name): self
{
return new self($name instanceof KnownAgent ? $name->value : $name);
}
public static function noAgent(): self
{
return new self();
}
public function knownAgent(): ?KnownAgent
{
return KnownAgent::tryFrom($this->name ?? '');
}
}