<commit_before><?php

namespace RcmAdmin\Factory;

use RcmAdmin\Controller\AdminPanelController;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;


class AdminPanelControllerFactory implements FactoryInterface
{

    /**
     * Factory for the Admin Panel Controller
     *
     * @param ServiceLocatorInterface $serviceLocator Zend Service Locator
     *
     * @return AdminPanelController
     */
    public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $serviceLocator->get('config');

        $adminPanelConfig = array();

        if (!empty($config['rcmAdmin']['adminPanel'])
            && is_array($config['rcmAdmin']['adminPanel'])
        ) {
            $adminPanelConfig = $config['rcmAdmin']['adminPanel'];
        }

        /** @var \RcmUser\Service\RcmUserService $rcmUserService */
        $rcmUserService = $serviceLocator->get(
            'RcmUser\Service\RcmUserService'
        );

        /** @var \Rcm\Service\SiteManager $siteManager */
        $siteManager = $serviceLocator->get('Rcm\Service\SiteManager');

        $siteId = $siteManager->getCurrentSiteId();

        return new AdminPanelController(
            $adminPanelConfig,
            $rcmUserService,
            $siteId
        );
    }
}<commit_msg>More removal of site manager and fix for rendering containers.<commit_after><?php

namespace RcmAdmin\Factory;

use RcmAdmin\Controller\AdminPanelController;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;


class AdminPanelControllerFactory implements FactoryInterface
{

    /**
     * Factory for the Admin Panel Controller
     *
     * @param ServiceLocatorInterface $serviceLocator Zend Service Locator
     *
     * @return AdminPanelController
     */
    public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $serviceLocator->get('config');

        $adminPanelConfig = array();

        if (!empty($config['rcmAdmin']['adminPanel'])
            && is_array($config['rcmAdmin']['adminPanel'])
        ) {
            $adminPanelConfig = $config['rcmAdmin']['adminPanel'];
        }

        /** @var \RcmUser\Service\RcmUserService $rcmUserService */
        $rcmUserService = $serviceLocator->get(
            'RcmUser\Service\RcmUserService'
        );

        /** @var \Rcm\Entity\Site $currentSite */
        $currentSite = $serviceLocator->get('Rcm\Service\CurrentSite');

        $siteId = $currentSite->getSiteId();

        return new AdminPanelController(
            $adminPanelConfig,
            $rcmUserService,
            $siteId
        );
    }
}
{'fraction_non_alphanumeric': 0.11380597014925373, 'fraction_numerical': 0.0, 'mean_word_length': 2.82453637660485, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6718844', 'n_tokens_mistral': 731, 'n_tokens_neox': 710, 'n_words': 127}