From a7610ba78452e84f1eb624885b77dae15d4e40e5 Mon Sep 17 00:00:00 2001 From: Chris Lightfoot-Wild Date: Thu, 16 Nov 2023 16:25:59 +0000 Subject: [PATCH] Laravel: psalm linting. --- .../tests/Integration/LaravelInstrumentationTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Instrumentation/Laravel/tests/Integration/LaravelInstrumentationTest.php b/src/Instrumentation/Laravel/tests/Integration/LaravelInstrumentationTest.php index b8bd2703..d13a8dda 100644 --- a/src/Instrumentation/Laravel/tests/Integration/LaravelInstrumentationTest.php +++ b/src/Instrumentation/Laravel/tests/Integration/LaravelInstrumentationTest.php @@ -20,12 +20,12 @@ public function test_request_response(): void $response = $this->call('GET', '/'); $this->assertEquals(200, $response->status()); $this->assertCount(1, $this->storage); - $span = $this->storage->offsetGet(0); + $span = $this->storage[0]; $this->assertSame('GET', $span->getName()); $response = Http::get('opentelemetry.io'); $this->assertEquals(200, $response->status()); - $span = $this->storage->offsetGet(1); + $span = $this->storage[1]; $this->assertSame('GET', $span->getName()); } public function test_cache_log_db(): void @@ -46,7 +46,7 @@ public function test_cache_log_db(): void $response = $this->call('GET', '/hello'); $this->assertEquals(200, $response->status()); $this->assertCount(2, $this->storage); - $span = $this->storage->offsetGet(1); + $span = $this->storage[1]; $this->assertSame('GET', $span->getName()); $this->assertSame('http://localhost/hello', $span->getAttributes()->get(TraceAttributes::URL_FULL)); $this->assertCount(5, $span->getEvents()); @@ -56,7 +56,7 @@ public function test_cache_log_db(): void $this->assertSame('cache hit', $span->getEvents()[3]->getName()); $this->assertSame('cache forget', $span->getEvents()[4]->getName()); - $span = $this->storage->offsetGet(0); + $span = $this->storage[0]; $this->assertSame('sql SELECT', $span->getName()); $this->assertSame('SELECT', $span->getAttributes()->get('db.operation')); $this->assertSame(':memory:', $span->getAttributes()->get('db.name'));