<commit_before><?php
/**
 * Created by PhpStorm.
 * User: Gabe
 * Date: 2017.01.23.
 * Time: 11:24
 */

namespace Kunstmaan\NodeBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

class HomepagePass implements CompilerPassInterface
{
    public function process(ContainerBuilder $container)
    {
        // always first check if the primary service is defined
        if (!$container->has('kunstmaan_node.pages_configuration')) {
            return;
        }

        $definition = $container->findDefinition('kunstmaan_node.pages_configuration');
        $definition->addMethodCall('setDoctrine', [new Reference('doctrine')]);
        $definition->addMethodCall('initConfiguration');
    }
}<commit_msg>Homepage collector bugfix<commit_after><?php
/**
 * Created by PhpStorm.
 * User: Gabe
 * Date: 2017.01.23.
 * Time: 11:24
 */

namespace Kunstmaan\NodeBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

class HomepagePass implements CompilerPassInterface
{
    public function process(ContainerBuilder $container)
    {
        // always first check if the primary service is defined
        if (!$container->has('kunstmaan_node.pages_configuration')) {
            return;
        }

        $definition = $container->findDefinition('kunstmaan_node.pages_configuration');
        $definition->addMethodCall('setDoctrine', [new Reference('doctrine')]);
    }
}
{'fraction_non_alphanumeric': 0.10728862973760933, 'fraction_numerical': 0.013994169096209912, 'mean_word_length': 4.312693498452012, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, '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': '6817552', 'n_tokens_mistral': 478, 'n_tokens_neox': 465, 'n_words': 89}