<commit_before><?php

namespace Bthuillier\Bundle\MainBundle\Controller;

use Symfony\Component\DependencyInjection\ContainerAware;

/**
 * Description of Controller
 *
 * @author bthuillier
 */
class BaseController extends ContainerAware {
    
    protected function get($id) {
        return $this->container->get($id);
    }
    
    /**
     * 
     * @return Symfony\Bundle\DoctrineMongoDBBundle\ManagerRegistry
     */
    protected function getDoctrine() {
        return $this->container->get('doctrine.odm.mongodb');
    }
    

    /**
     * @return Doctrine\ODM\MongoDB\DocumentManager
     */
    protected function getManager() {
        return $this->getDoctrine()->getManager();
    }
    
    /**
     * @param string $documentName  The name of the Document.
     * 
     * @return \Doctrine\ODM\MongoDB\DocumentRepository
     */
    protected function getRepository($documentName) {
        return $this->getDoctrine()->getRepository($documentName);
    }
}
<commit_msg>rename some function to be more clear and work with manager<commit_after><?php

namespace Bthuillier\Bundle\MainBundle\Controller;

use Symfony\Component\DependencyInjection\ContainerAware;

/**
 * Description of Controller
 *
 * @author bthuillier
 */
class BaseController extends ContainerAware {
    
    protected function get($id) {
        return $this->container->get($id);
    }
    
    /**
     * 
     * @return Symfony\Bundle\DoctrineMongoDBBundle\ManagerRegistry
     */
    protected function getDoctrine() {
        return $this->container->get('doctrine.odm.mongodb');
    }
    

    /**
     * @return Doctrine\ODM\MongoDB\DocumentManager
     */
    protected function getDocumentManager() {
        return $this->getDoctrine()->getManager();
    }
    
    /**
     * @param string $documentName  The name of the Document.
     * 
     * @return \Doctrine\ODM\MongoDB\DocumentRepository
     */
    protected function getRepository($documentName) {
        return $this->getDoctrine()->getRepository($documentName);
    }
}

{'fraction_non_alphanumeric': 0.11897738446411013, 'fraction_numerical': 0.0, 'mean_word_length': 2.803738317757009, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '677168', 'n_tokens_mistral': 590, 'n_tokens_neox': 584, 'n_words': 106}