$hits Every rule followed, first to last. */ public function __construct( public readonly array $hits, public readonly ?string $url, public readonly int $code, public readonly bool $loop ) {} public function first(): ?Rule { return isset( $this->hits[0] ) ? $this->hits[0]->rule : null; } /** Whether any rule followed depends on who is asking. */ public function conditional(): bool { foreach ( $this->hits as $hit ) { if ( [] !== $hit->rule->conditions || null !== $hit->rule->ends_at || null !== $hit->rule->starts_at ) { return true; } } return false; } }