private function getResourcePaths(ContainerBuilder $container)
    {
        $paths   = [];
        $rootDir = dirname($container->getParameter('kernel.root_dir'));

        foreach ($container->getParameter('kernel.bundles') as $name => $class) {
            if (null !== ($path = $this->getResourcePathFromBundle($rootDir, $name, $class))) {
                $paths[] = $path;
            }
        }

        if (is_readable($rootDir . '/app/Resources/contao/config/services.php')) {
            $paths[] = $rootDir . '/app/Resources/contao/config/services.php';
        }

        if (is_readable($rootDir . '/system/config/services.php')) {
            $paths[] = $rootDir . '/system/config/services.php';
        }

        return $paths;
    }