From 2727baefc258e5e52bbc2fe55f7d7df60331ef2b Mon Sep 17 00:00:00 2001 From: Luke Kuzmish Date: Thu, 4 Jul 2024 21:53:06 -0400 Subject: [PATCH] renaming --- .../Concerns/TagNormalizerAwareTrait.php | 2 +- .../Contracts/TagNormalizerAware.php | 2 +- .../Datadog/DatadogStatsDClientAdapter.php} | 10 +++---- .../InMemory/InMemoryClientAdapter.php} | 26 +++++++++---------- .../InMemory/Models/InMemoryCountRecord.php | 2 +- .../Models/InMemoryDistributionRecord.php | 2 +- .../InMemory/Models/InMemoryGaugeRecord.php | 2 +- .../Models/InMemoryHistogramRecord.php | 2 +- .../InMemory/Models/InMemorySetRecord.php | 2 +- .../InMemory/Models/InMemoryStatsRecord.php | 2 +- .../InMemory/Models/InMemoryTimingRecord.php | 2 +- .../League/LeagueStatsDClientAdapter.php} | 10 +++---- .../StatsDClientAdapter.php} | 4 +-- .../Datadog/DatadogLoggingClient.php | 2 +- .../InMemory/InMemoryDecrementTest.php | 12 ++++----- .../InMemory/InMemoryGaugeTest.php | 10 +++---- .../InMemory/InMemoryHistogramTest.php | 10 +++---- .../InMemory/InMemoryIncrementTest.php | 14 +++++----- .../InMemory/InMemorySetTest.php | 10 +++---- .../InMemory/InMemoryTest.php | 16 ++++++------ .../InMemory/InMemoryTimingTest.php | 10 +++---- .../League/LeagueStatsDClientTest.php | 6 ++--- .../Datadog/DatadogLoggingClientTest.php | 4 +-- tests/{ => Doubles}/ClockStub.php | 2 +- 24 files changed, 82 insertions(+), 82 deletions(-) rename src/{Clients => Adapters}/Concerns/TagNormalizerAwareTrait.php (88%) rename src/{Clients => Adapters}/Contracts/TagNormalizerAware.php (76%) rename src/{Clients/Datadog/DatadogStatsDClient.php => Adapters/Datadog/DatadogStatsDClientAdapter.php} (87%) rename src/{Clients/InMemory/InMemoryClient.php => Adapters/InMemory/InMemoryClientAdapter.php} (79%) rename src/{Clients => Adapters}/InMemory/Models/InMemoryCountRecord.php (81%) rename src/{Clients => Adapters}/InMemory/Models/InMemoryDistributionRecord.php (82%) rename src/{Clients => Adapters}/InMemory/Models/InMemoryGaugeRecord.php (82%) rename src/{Clients => Adapters}/InMemory/Models/InMemoryHistogramRecord.php (82%) rename src/{Clients => Adapters}/InMemory/Models/InMemorySetRecord.php (82%) rename src/{Clients => Adapters}/InMemory/Models/InMemoryStatsRecord.php (91%) rename src/{Clients => Adapters}/InMemory/Models/InMemoryTimingRecord.php (83%) rename src/{Clients/League/LeagueStatsDClient.php => Adapters/League/LeagueStatsDClientAdapter.php} (91%) rename src/{Clients/StatsDClient.php => Adapters/StatsDClientAdapter.php} (92%) rename src/{ => Clients}/Datadog/DatadogLoggingClient.php (90%) rename tests/{Clients => Adapters}/InMemory/InMemoryDecrementTest.php (80%) rename tests/{Clients => Adapters}/InMemory/InMemoryGaugeTest.php (79%) rename tests/{Clients => Adapters}/InMemory/InMemoryHistogramTest.php (81%) rename tests/{Clients => Adapters}/InMemory/InMemoryIncrementTest.php (78%) rename tests/{Clients => Adapters}/InMemory/InMemorySetTest.php (78%) rename tests/{Clients => Adapters}/InMemory/InMemoryTest.php (76%) rename tests/{Clients => Adapters}/InMemory/InMemoryTimingTest.php (80%) rename tests/{Clients => Adapters}/League/LeagueStatsDClientTest.php (68%) rename tests/{ => Clients}/Datadog/DatadogLoggingClientTest.php (91%) rename tests/{ => Doubles}/ClockStub.php (94%) diff --git a/src/Clients/Concerns/TagNormalizerAwareTrait.php b/src/Adapters/Concerns/TagNormalizerAwareTrait.php similarity index 88% rename from src/Clients/Concerns/TagNormalizerAwareTrait.php rename to src/Adapters/Concerns/TagNormalizerAwareTrait.php index d9695df..a86a031 100644 --- a/src/Clients/Concerns/TagNormalizerAwareTrait.php +++ b/src/Adapters/Concerns/TagNormalizerAwareTrait.php @@ -1,6 +1,6 @@ decrement("some-stat", value: 1845); diff --git a/tests/Clients/InMemory/InMemoryGaugeTest.php b/tests/Adapters/InMemory/InMemoryGaugeTest.php similarity index 79% rename from tests/Clients/InMemory/InMemoryGaugeTest.php rename to tests/Adapters/InMemory/InMemoryGaugeTest.php index 0aa4a7f..29a40d1 100644 --- a/tests/Clients/InMemory/InMemoryGaugeTest.php +++ b/tests/Adapters/InMemory/InMemoryGaugeTest.php @@ -1,10 +1,10 @@ gauge("gauge-stat", 23488); @@ -37,7 +37,7 @@ public function storesGaugeRecord() public function normalizesTags() { // Given - $inMemoryClient = new InMemoryClient(new ClockStub(new DateTimeImmutable())); + $inMemoryClient = new InMemoryClientAdapter(new ClockStub(new DateTimeImmutable())); // And $tagNormalizerSpy = new TagNormalizerSpy(); diff --git a/tests/Clients/InMemory/InMemoryHistogramTest.php b/tests/Adapters/InMemory/InMemoryHistogramTest.php similarity index 81% rename from tests/Clients/InMemory/InMemoryHistogramTest.php rename to tests/Adapters/InMemory/InMemoryHistogramTest.php index ed44f23..5f9079a 100644 --- a/tests/Clients/InMemory/InMemoryHistogramTest.php +++ b/tests/Adapters/InMemory/InMemoryHistogramTest.php @@ -1,10 +1,10 @@ histogram( @@ -42,7 +42,7 @@ public function storesHistogramRecord() public function normalizesTags() { // Given - $inMemoryClient = new InMemoryClient(new ClockStub(new DateTimeImmutable())); + $inMemoryClient = new InMemoryClientAdapter(new ClockStub(new DateTimeImmutable())); // And $tagNormalizerSpy = new TagNormalizerSpy(); diff --git a/tests/Clients/InMemory/InMemoryIncrementTest.php b/tests/Adapters/InMemory/InMemoryIncrementTest.php similarity index 78% rename from tests/Clients/InMemory/InMemoryIncrementTest.php rename to tests/Adapters/InMemory/InMemoryIncrementTest.php index e71555b..05f08d6 100644 --- a/tests/Clients/InMemory/InMemoryIncrementTest.php +++ b/tests/Adapters/InMemory/InMemoryIncrementTest.php @@ -1,11 +1,11 @@ increment("hello", tags: ["abc" => 199, "xyz" => "end"]); @@ -55,7 +55,7 @@ public function recordsTags() public function normalizesTags() { // Given - $inMemoryClient = new InMemoryClient(new ClockStub(new DateTimeImmutable())); + $inMemoryClient = new InMemoryClientAdapter(new ClockStub(new DateTimeImmutable())); // And $tagNormalizerSpy = new TagNormalizerSpy(); diff --git a/tests/Clients/InMemory/InMemorySetTest.php b/tests/Adapters/InMemory/InMemorySetTest.php similarity index 78% rename from tests/Clients/InMemory/InMemorySetTest.php rename to tests/Adapters/InMemory/InMemorySetTest.php index 1345ceb..72fb2f8 100644 --- a/tests/Clients/InMemory/InMemorySetTest.php +++ b/tests/Adapters/InMemory/InMemorySetTest.php @@ -1,10 +1,10 @@ set("set-test", 14); @@ -37,7 +37,7 @@ public function storesSetRecord() public function normalizesTags() { // Given - $inMemoryClient = new InMemoryClient(new ClockStub(new DateTimeImmutable())); + $inMemoryClient = new InMemoryClientAdapter(new ClockStub(new DateTimeImmutable())); // And $tagNormalizerSpy = new TagNormalizerSpy(); diff --git a/tests/Clients/InMemory/InMemoryTest.php b/tests/Adapters/InMemory/InMemoryTest.php similarity index 76% rename from tests/Clients/InMemory/InMemoryTest.php rename to tests/Adapters/InMemory/InMemoryTest.php index e114953..2a6c076 100644 --- a/tests/Clients/InMemory/InMemoryTest.php +++ b/tests/Adapters/InMemory/InMemoryTest.php @@ -1,11 +1,11 @@ getStats(); @@ -30,7 +30,7 @@ public function getStats_returnsInMemoryStatsRecord() public function reset_clearsStats() { // Given - $inMemoryClient = new InMemoryClient(new ClockStub(new DateTimeImmutable())); + $inMemoryClient = new InMemoryClientAdapter(new ClockStub(new DateTimeImmutable())); // And set some data $inMemoryClient->increment("bogus", 1, ["tag1" => true], 99); @@ -49,7 +49,7 @@ public function reset_clearsStats() public function setTagNormalizer() { // Given - $inMemoryClient = new InMemoryClient(new ClockStub(new DateTimeImmutable())); + $inMemoryClient = new InMemoryClientAdapter(new ClockStub(new DateTimeImmutable())); // And $tagNormalizerSpy = new TagNormalizerSpy(); @@ -66,7 +66,7 @@ public function setTagNormalizer() public function getClient_returnsNull() { // Given - $inMemoryClient = new InMemoryClient(new ClockStub(new DateTimeImmutable())); + $inMemoryClient = new InMemoryClientAdapter(new ClockStub(new DateTimeImmutable())); // When $client = $inMemoryClient->getClient(); diff --git a/tests/Clients/InMemory/InMemoryTimingTest.php b/tests/Adapters/InMemory/InMemoryTimingTest.php similarity index 80% rename from tests/Clients/InMemory/InMemoryTimingTest.php rename to tests/Adapters/InMemory/InMemoryTimingTest.php index a0089c2..4198e3b 100644 --- a/tests/Clients/InMemory/InMemoryTimingTest.php +++ b/tests/Adapters/InMemory/InMemoryTimingTest.php @@ -1,10 +1,10 @@ timing("timing-stat", 199, 0.2, ["timing" => "some-value"]); @@ -37,7 +37,7 @@ public function storesTimingRecord() public function normalizesTags() { // Given - $inMemoryClient = new InMemoryClient(new ClockStub(new DateTimeImmutable())); + $inMemoryClient = new InMemoryClientAdapter(new ClockStub(new DateTimeImmutable())); // And $tagNormalizerSpy = new TagNormalizerSpy(); diff --git a/tests/Clients/League/LeagueStatsDClientTest.php b/tests/Adapters/League/LeagueStatsDClientTest.php similarity index 68% rename from tests/Clients/League/LeagueStatsDClientTest.php rename to tests/Adapters/League/LeagueStatsDClientTest.php index cf58a28..3955a99 100644 --- a/tests/Clients/League/LeagueStatsDClientTest.php +++ b/tests/Adapters/League/LeagueStatsDClientTest.php @@ -1,8 +1,8 @@ getClient(); diff --git a/tests/Datadog/DatadogLoggingClientTest.php b/tests/Clients/Datadog/DatadogLoggingClientTest.php similarity index 91% rename from tests/Datadog/DatadogLoggingClientTest.php rename to tests/Clients/Datadog/DatadogLoggingClientTest.php index 652ae19..5902b9a 100644 --- a/tests/Datadog/DatadogLoggingClientTest.php +++ b/tests/Clients/Datadog/DatadogLoggingClientTest.php @@ -1,10 +1,10 @@