From a358abfc71ecc41d447e8eabd95747a8593eb7a0 Mon Sep 17 00:00:00 2001
From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com>
Date: Tue, 13 Aug 2024 17:00:18 +1200
Subject: [PATCH] MNT Ignore lint failure we can't fix yet (#558)

---
 src/RequestHandler/RegistrationHandlerTrait.php | 4 ++++
 src/RequestHandler/VerificationHandlerTrait.php | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/src/RequestHandler/RegistrationHandlerTrait.php b/src/RequestHandler/RegistrationHandlerTrait.php
index b0fc3713..1b744bf3 100644
--- a/src/RequestHandler/RegistrationHandlerTrait.php
+++ b/src/RequestHandler/RegistrationHandlerTrait.php
@@ -46,6 +46,7 @@ public function createStartRegistrationResponse(
             ->addHeader('Content-Type', 'application/json');
 
         if (!$allowReregistration && $existingRegisteredMethod) {
+            /** @phpstan-ignore translation.key (we can't change this to __TRAIT__ until the next major release) */
             return $response->setBody(json_encode(['errors' => [_t(
                 __CLASS__ . '.METHOD_ALREADY_REGISTERED',
                 'That method has already been registered against this Member'
@@ -80,6 +81,7 @@ public function completeRegistrationRequest(
         HTTPRequest $request
     ): Result {
         if (!SecurityToken::inst()->checkRequest($request)) {
+            /** @phpstan-ignore translation.key (we can't change this to __TRAIT__ until the next major release) */
             return Result::create(false, _t(
                 __CLASS__ . '.CSRF_FAILURE',
                 'Your request timed out. Please refresh and try again'
@@ -90,6 +92,7 @@ public function completeRegistrationRequest(
 
         // If a registration process hasn't been initiated in a previous request, calling this method is invalid
         if (!$storedMethodName) {
+            /** @phpstan-ignore translation.key (we can't change this to __TRAIT__ until the next major release) */
             return Result::create(false, _t(__CLASS__ . '.NO_REGISTRATION_IN_PROGRESS', 'No registration in progress'));
         }
 
@@ -97,6 +100,7 @@ public function completeRegistrationRequest(
         if ($storedMethodName !== $method->getURLSegment()) {
             return Result::create(
                 false,
+                /** @phpstan-ignore translation.key (we can't change this to __TRAIT__ until the next major release) */
                 _t(__CLASS__ . '.METHOD_MISMATCH', 'Method does not match registration in progress')
             );
         }
diff --git a/src/RequestHandler/VerificationHandlerTrait.php b/src/RequestHandler/VerificationHandlerTrait.php
index 00f43e70..0391df24 100644
--- a/src/RequestHandler/VerificationHandlerTrait.php
+++ b/src/RequestHandler/VerificationHandlerTrait.php
@@ -54,11 +54,13 @@ protected function createStartVerificationResponse(
         if (!$registeredMethod) {
             // We can display a specific message if there was no method specified
             if (!$requestedMethod) {
+                /** @phpstan-ignore translation.key (we can't change this to __TRAIT__ until the next major release) */
                 $message = _t(
                     __CLASS__ . '.METHOD_NOT_PROVIDED',
                     'No method was provided to login with and the Member has no default'
                 );
             } else {
+                /** @phpstan-ignore translation.key (we can't change this to __TRAIT__ until the next major release) */
                 $message = _t(__CLASS__ . '.METHOD_NOT_REGISTERED', 'Member does not have this method registered');
             }
 
@@ -90,6 +92,7 @@ protected function createStartVerificationResponse(
     protected function completeVerificationRequest(StoreInterface $store, HTTPRequest $request): Result
     {
         if (!SecurityToken::inst()->checkRequest($request)) {
+            /** @phpstan-ignore translation.key (we can't change this to __TRAIT__ until the next major release) */
             return Result::create(false, _t(
                 __CLASS__ . '.CSRF_FAILURE',
                 'Your request timed out. Please refresh and try again'