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

            if ($options['collector']['routes']) {
                $profiler->addCollector(
                    new RoutingDataCollector(
                        $container->get(RouterContract::class)->getRoutes()
                    )
                );
            }
        }

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

            if ($options['collector']['routes']) {
                $profiler->addCollector(
                    new RoutingDataCollector(
                        $container->get(RouterContract::class)->getRoutes()
                    )
                );
            }
        }

        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