From 8c7163d704371496b91ff6a660e345c97422e2c5 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 2 Mar 2023 09:05:46 +1300 Subject: [PATCH] Add phpdoc to prevent restoreTime being removed These unused variables cause quite a few bugs - keeping them 'matters' but they look like they can go and people doing that happens moderately often, causing bugs (this has been the cause of more than one 'locks don't work bug' --- tests/phpunit/CRM/Core/BAO/MessageTemplateTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/phpunit/CRM/Core/BAO/MessageTemplateTest.php b/tests/phpunit/CRM/Core/BAO/MessageTemplateTest.php index 3132858ad3..9d2aa7c768 100644 --- a/tests/phpunit/CRM/Core/BAO/MessageTemplateTest.php +++ b/tests/phpunit/CRM/Core/BAO/MessageTemplateTest.php @@ -491,6 +491,7 @@ emo */ public function testTokensIndividually() { // Freeze the time at the start of the test, so checksums don't suffer from second rollovers. + /** @noinspection PhpUnusedLocalVariableInspection */ $restoreTime = $this->useFrozenTime(); $this->hookClass->setHook('civicrm_tokenValues', [$this, 'hookTokenValues']); -- 2.25.1