| Total Complexity | 4 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class NullTracer implements TracerInterface |
||
| 13 | { |
||
| 14 | public function __construct( |
||
| 15 | private readonly ?ScopeInterface $scope = new Container(), |
||
| 16 | ) { |
||
| 17 | } |
||
| 18 | |||
| 19 | public function trace( |
||
| 20 | string $name, |
||
| 21 | callable $callback, |
||
| 22 | array $attributes = [], |
||
| 23 | bool $scoped = false, |
||
| 24 | bool $debug = false, |
||
| 25 | ?TraceKind $traceKind = null, |
||
| 26 | ?int $startTime = null |
||
| 27 | ): mixed { |
||
| 28 | $span = new Span($name); |
||
| 29 | |||
| 30 | return $this->scope->runScope([ |
||
|
|
|||
| 31 | SpanInterface::class => $span, |
||
| 32 | ], static fn (): mixed => ContainerScope::getContainer()->get(InvokerInterface::class)->invoke($callback)); |
||
| 33 | } |
||
| 34 | |||
| 35 | public function withContext(?array $context): self |
||
| 36 | { |
||
| 37 | return $this; |
||
| 38 | } |
||
| 39 | |||
| 40 | public function getContext(): ?array |
||
| 43 | } |
||
| 44 | } |
||
| 45 |
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.