$context */ private function __construct( public string $guardCode, public bool $passed, public ?string $messageKey = null, public ?string $offendingFormFieldId = null, public array $context = [], ) {} public static function passed(string $guardCode): self { return new self(guardCode: $guardCode, passed: true); } /** * @param array $context */ public static function failed( string $guardCode, string $messageKey, ?string $offendingFormFieldId = null, array $context = [], ): self { return new self( guardCode: $guardCode, passed: false, messageKey: $messageKey, offendingFormFieldId: $offendingFormFieldId, context: $context, ); } }