src/Viserio/Component/HttpFoundation/Provider/FoundationDataCollectorServiceProvider.php
public static function extendProfiler(
        ContainerInterface $container,
        ?ProfilerContract $profiler = null
    ): ?ProfilerContract {
        if ($profiler !== null) {
            $options = self::resolveOptions($container->get('config'));
            $kernel  = $container->get(KernelContract::class);

            if ($options['collector']['viserio_http']) {
                $profiler->addCollector(
                    new ViserioHttpDataCollector(
                        $container->get(RouterContract::class),
                        $kernel->getRoutesPath()
                    ),
                    1
                );
            }
        }

        return $profiler;
    }
public static function extendProfiler(
        ContainerInterface $container,
        ?ProfilerContract $profiler = null
    ): ?ProfilerContract {
        if ($profiler !== null) {
            $options = self::resolveOptions($container->get('config'));
            $kernel  = $container->get(KernelContract::class);

            if ($options['collector']['viserio_http']) {
                $profiler->addCollector(
                    new ViserioHttpDataCollector(
                        $container->get(RouterContract::class),
                        $kernel->getRoutesPath()
                    ),
                    1
                );
            }
        }

        return $profiler;
    }
Extend viserio profiler with data collector.

@param \Psr\Container\ContainerInterface                  $container
@param null|\Viserio\Component\Contract\Profiler\Profiler $profiler

@return null|\Viserio\Component\Contract\Profiler\Profiler