<commit_before><?php

namespace IsmaAmbrosi\Bundle\GeneratorBundle\Command;

use Doctrine\Bundle\DoctrineBundle\Command\DoctrineCommand;

abstract class GenerateDoctrineCommand extends DoctrineCommand
{

    protected function parseShortcutNotation($shortcut)
    {
        $document = str_replace('/', '\\', $shortcut);

        if (false === $pos = strpos($document, ':')) {
            throw new \InvalidArgumentException(sprintf('The document name must contain a : ("%s" given, expecting something like AcmeBlogBundle:Blog/Post)', $document));
        }

        return array(substr($document, 0, $pos), substr($document, $pos + 1));
    }

    /**
     * @param $name
     *
     * @return \Symfony\Component\HttpKernel\Bundle\BundleInterface
     */
    protected function getBundle($name)
    {
        return $this->getContainer()->get('kernel')->getBundle($name);
    }

    /**
     * @return \Doctrine\ODM\MongoDB\DocumentManager
     */
    protected function getDocumentManager()
    {
        return $this->getContainer()->get('doctrine.odm.mongodb.document_manager');
    }

    /**
     * @param string $bundle
     *
     * @return string
     */
    protected function getDocumentNamespace($bundle)
    {
        return $this->getBundle($bundle)->getNamespace().'\\Document';
    }

    /**
     * @param $documentClass
     *
     * @return \Doctrine\ODM\MongoDB\Mapping\ClassMetadata
     */
    protected function getDocumentMetadata($documentClass)
    {
        $factory = new \Doctrine\ODM\MongoDB\Mapping\ClassMetadataFactory();
        $factory->setDocumentManager($this->getDocumentManager());
        $factory->setConfiguration($this->getDocumentManager()->getConfiguration());

        $metadata = $factory->getMetadataFor($documentClass);

        return $metadata;
    }

    /**
     * @return \Symfony\Component\Filesystem\Filesystem
     */
    protected function getFilesystem()
    {
        return $this->getContainer()->get('filsystem');
    }
}<commit_msg>Fixed typo on service name<commit_after><?php

namespace IsmaAmbrosi\Bundle\GeneratorBundle\Command;

use Doctrine\Bundle\DoctrineBundle\Command\DoctrineCommand;

abstract class GenerateDoctrineCommand extends DoctrineCommand
{

    protected function parseShortcutNotation($shortcut)
    {
        $document = str_replace('/', '\\', $shortcut);

        if (false === $pos = strpos($document, ':')) {
            throw new \InvalidArgumentException(sprintf('The document name must contain a : ("%s" given, expecting something like AcmeBlogBundle:Blog/Post)', $document));
        }

        return array(substr($document, 0, $pos), substr($document, $pos + 1));
    }

    /**
     * @param $name
     *
     * @return \Symfony\Component\HttpKernel\Bundle\BundleInterface
     */
    protected function getBundle($name)
    {
        return $this->getContainer()->get('kernel')->getBundle($name);
    }

    /**
     * @return \Doctrine\ODM\MongoDB\DocumentManager
     */
    protected function getDocumentManager()
    {
        return $this->getContainer()->get('doctrine.odm.mongodb.document_manager');
    }

    /**
     * @param string $bundle
     *
     * @return string
     */
    protected function getDocumentNamespace($bundle)
    {
        return $this->getBundle($bundle)->getNamespace().'\\Document';
    }

    /**
     * @param $documentClass
     *
     * @return \Doctrine\ODM\MongoDB\Mapping\ClassMetadata
     */
    protected function getDocumentMetadata($documentClass)
    {
        $factory = new \Doctrine\ODM\MongoDB\Mapping\ClassMetadataFactory();
        $factory->setDocumentManager($this->getDocumentManager());
        $factory->setConfiguration($this->getDocumentManager()->getConfiguration());

        $metadata = $factory->getMetadataFor($documentClass);

        return $metadata;
    }

    /**
     * @return \Symfony\Component\Filesystem\Filesystem
     */
    protected function getFilesystem()
    {
        return $this->getContainer()->get('filesystem');
    }
}
{'fraction_non_alphanumeric': 0.14085914085914086, 'fraction_numerical': 0.000999000999000999, 'mean_word_length': 2.9614243323442135, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, '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': '2629375', 'n_tokens_mistral': 1126, 'n_tokens_neox': 1093, 'n_words': 186}