From 6e035321910192a262737543fa61d693bb3366e2 Mon Sep 17 00:00:00 2001
From: catch <catch@35733.no-reply.drupal.org>
Date: Thu, 11 Apr 2024 09:36:54 +0100
Subject: [PATCH] Issue #3440087 by dww: Update CacheTagOperation enum to use
 UpperCamelCase

---
 .../performance_test/src/Cache/CacheTagOperation.php        | 6 +++---
 .../src/Cache/CacheTagsChecksumDecorator.php                | 6 +++---
 core/tests/Drupal/Tests/PerformanceTestTrait.php            | 6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/core/modules/system/tests/modules/performance_test/src/Cache/CacheTagOperation.php b/core/modules/system/tests/modules/performance_test/src/Cache/CacheTagOperation.php
index fb96e66a3a09..96dbeb507b33 100644
--- a/core/modules/system/tests/modules/performance_test/src/Cache/CacheTagOperation.php
+++ b/core/modules/system/tests/modules/performance_test/src/Cache/CacheTagOperation.php
@@ -11,7 +11,7 @@
  * @see \Drupal\Core\Cache\CacheTagsInvalidatorInterface
  */
 enum CacheTagOperation {
-  case getCurrentChecksum;
-  case invalidateTags;
-  case isValid;
+  case GetCurrentChecksum;
+  case InvalidateTags;
+  case IsValid;
 }
diff --git a/core/modules/system/tests/modules/performance_test/src/Cache/CacheTagsChecksumDecorator.php b/core/modules/system/tests/modules/performance_test/src/Cache/CacheTagsChecksumDecorator.php
index e39a4f48af28..ba01cd809c44 100644
--- a/core/modules/system/tests/modules/performance_test/src/Cache/CacheTagsChecksumDecorator.php
+++ b/core/modules/system/tests/modules/performance_test/src/Cache/CacheTagsChecksumDecorator.php
@@ -28,7 +28,7 @@ public function getCurrentChecksum(array $tags) {
     $start = microtime(TRUE);
     $return = $this->checksumInvalidator->getCurrentChecksum($tags);
     $stop = microtime(TRUE);
-    $this->logCacheTagOperation($tags, $start, $stop, CacheTagOperation::getCurrentChecksum);
+    $this->logCacheTagOperation($tags, $start, $stop, CacheTagOperation::GetCurrentChecksum);
     return $return;
   }
 
@@ -44,7 +44,7 @@ public function isValid($checksum, array $tags) {
     $start = microtime(TRUE);
     $return = $this->checksumInvalidator->isValid($checksum, $tags);
     $stop = microtime(TRUE);
-    $this->logCacheTagOperation($tags, $start, $stop, CacheTagOperation::isValid);
+    $this->logCacheTagOperation($tags, $start, $stop, CacheTagOperation::IsValid);
     return $return;
   }
 
@@ -60,7 +60,7 @@ public function invalidateTags(array $tags) {
     $start = microtime(TRUE);
     $return = $this->checksumInvalidator->invalidateTags($tags);
     $stop = microtime(TRUE);
-    $this->logCacheTagOperation($tags, $start, $stop, CacheTagOperation::invalidateTags);
+    $this->logCacheTagOperation($tags, $start, $stop, CacheTagOperation::InvalidateTags);
     return $return;
   }
 
diff --git a/core/tests/Drupal/Tests/PerformanceTestTrait.php b/core/tests/Drupal/Tests/PerformanceTestTrait.php
index 0e774a7d0a33..48cb4f15e258 100644
--- a/core/tests/Drupal/Tests/PerformanceTestTrait.php
+++ b/core/tests/Drupal/Tests/PerformanceTestTrait.php
@@ -159,9 +159,9 @@ public function collectPerformanceData(callable $callable, ?string $service_name
       }
       foreach ($performance_test_data['cache_tag_operations'] as $operation) {
         match($operation['operation']) {
-          CacheTagOperation::getCurrentChecksum => $cache_tag_checksum_count++,
-          CacheTagOperation::isValid => $cache_tag_is_valid_count++,
-          CacheTagOperation::invalidateTags => $cache_tag_invalidation_count++,
+          CacheTagOperation::GetCurrentChecksum => $cache_tag_checksum_count++,
+          CacheTagOperation::IsValid => $cache_tag_is_valid_count++,
+          CacheTagOperation::InvalidateTags => $cache_tag_invalidation_count++,
         };
       }
       $performance_data->setCacheGetCount($cache_get_count);
-- 
GitLab