Add phpdoc to prevent restoreTime being removed
authorEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 1 Mar 2023 20:05:46 +0000 (09:05 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 1 Mar 2023 20:05:46 +0000 (09:05 +1300)
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

index 3132858ad3016994ac39ec97911fe2b53f8e3038..9d2aa7c7686d3625d1886ce30e63b8220e60b103 100644 (file)
@@ -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']);