11<?php
22
3+ declare (strict_types=1 );
4+
35namespace OpenTelemetry \Tests \Contrib \Instrumentation \Laravel ;
46
5- use OpenTelemetry \Tests \Contrib \Instrumentation \Laravel \Integration \TestCase ;
67use Illuminate \Support \Facades \DB ;
78use OpenTelemetry \Tests \Contrib \Instrumentation \Laravel \Fixtures \Models \TestModel ;
9+ use OpenTelemetry \Tests \Contrib \Instrumentation \Laravel \Integration \TestCase ;
810
911/**
1012 * Integration test for Eloquent\Model hooks
@@ -54,7 +56,7 @@ private function filterOnlyEloquentSpans(): array
5456 return array_values (
5557 array_filter (
5658 iterator_to_array ($ this ->storage ),
57- fn ($ span ) =>
59+ fn ($ span ) =>
5860 $ span instanceof \OpenTelemetry \SDK \Trace \ImmutableSpan &&
5961 $ span ->getAttributes ()->has ('laravel.eloquent.operation ' )
6062 )
@@ -83,11 +85,11 @@ public function test_find_and_get_models(): void
8385 $ spans = $ this ->filterOnlyEloquentSpans ();
8486
8587 // spans contains 2 eloquent spans for 'find' and 'get', because it method internally calls 'getModels' method.
86- $ this ->assertCount (2 , $ spans );
88+ $ this ->assertCount (2 , $ spans );
8789
8890 foreach ($ spans as $ span ) {
8991 $ this ->assertSame (
90- 'OpenTelemetry\Tests\Contrib\Instrumentation\Laravel\Fixtures\Models\TestModel ' ,
92+ 'OpenTelemetry\Tests\Contrib\Instrumentation\Laravel\Fixtures\Models\TestModel ' ,
9193 $ span ->getAttributes ()->get ('laravel.eloquent.model ' )
9294 );
9395 $ this ->assertSame ('test_models ' , $ span ->getAttributes ()->get ('laravel.eloquent.table ' ));
@@ -162,7 +164,7 @@ public function test_destory(): void
162164
163165 foreach ($ spans as $ span ) {
164166 $ this ->assertSame (
165- 'OpenTelemetry\Tests\Contrib\Instrumentation\Laravel\Fixtures\Models\TestModel ' ,
167+ 'OpenTelemetry\Tests\Contrib\Instrumentation\Laravel\Fixtures\Models\TestModel ' ,
166168 $ span ->getAttributes ()->get ('laravel.eloquent.model ' )
167169 );
168170 $ this ->assertSame ('test_models ' , $ span ->getAttributes ()->get ('laravel.eloquent.table ' ));
@@ -192,4 +194,4 @@ public function test_refresh(): void
192194 $ this ->assertSame ('test_models ' , $ span ->getAttributes ()->get ('laravel.eloquent.table ' ));
193195 $ this ->assertSame ('refresh ' , $ span ->getAttributes ()->get ('laravel.eloquent.operation ' ));
194196 }
195- }
197+ }
0 commit comments