| Total Complexity | 3 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | final class NullTracer implements TracerInterface |
||
| 12 | { |
||
| 13 | 434 | public function __construct( |
|
| 14 | private readonly ?ScopeInterface $scope = new Container(), |
||
| 15 | ) { |
||
| 16 | } |
||
| 17 | |||
| 18 | 146 | public function trace( |
|
| 19 | string $name, |
||
| 20 | callable $callback, |
||
| 21 | array $attributes = [], |
||
| 22 | bool $scoped = false, |
||
| 23 | bool $debug = false, |
||
| 24 | ?TraceKind $traceKind = null, |
||
| 25 | ?int $startTime = null |
||
| 26 | ): mixed { |
||
| 27 | 146 | $span = new Span($name); |
|
| 28 | 146 | $span->setAttributes($attributes); |
|
| 29 | |||
| 30 | 146 | return $this->scope->runScope([ |
|
|
|
|||
| 31 | SpanInterface::class => $span, |
||
| 32 | 146 | ], static fn (InvokerInterface $invoker): mixed => $invoker->invoke($callback)); |
|
| 33 | } |
||
| 34 | |||
| 35 | 94 | public function getContext(): array |
|
| 38 | } |
||
| 39 | } |
||
| 40 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.