Passed
Pull Request — master (#8)
by
unknown
03:37 queued 48s
created

SpanAttributeHelper   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 3
c 2
b 0
f 0
dl 0
loc 6
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A setAttributes() 0 4 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Umbrellio\Jaravel\Services\Span;
6
7
use OpenTelemetry\API\Trace\SpanInterface;
8
9
class SpanAttributeHelper
10
{
11
    public static function setAttributes(SpanInterface $span, array $attributes): void
12
    {
13
        foreach ($attributes as $attribute => $value) {
14
            $span->setAttribute($attribute, (string) $value);
15
        }
16
    }
17
}
18