<commit_before><?php

/*
 * This file is a part of Sculpin.
 *
 * (c) Dragonfly Development Inc.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Sculpin\Bundle\SculpinBundle\DependencyInjection\Compiler;

use dflydev\util\antPathMatcher\AntPathMatcher;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

/**
 * Text Extension Provider pass
 *
 * @author <NAME> <<EMAIL>>
 */
class CustomMimeTypesRepositoryPass implements CompilerPassInterface
{
    /**
     * {@inheritdoc}
     */
    public function process(ContainerBuilder $container)
    {
        if (false === $container->hasDefinition('sculpin.custom_mime_types_repository')) {
            return;
        }

        $definition = $container->getDefinition('sculpin.custom_mime_types_repository');

        $data = [];
        foreach ($container->findTaggedServiceIds('sculpin.custom_mime_extensions') as $tagAttributes) {
            foreach ($tagAttributes as $attributes) {
                $type = $attributes['type'];
                $parameter = $attributes['parameter'];
<commit_msg>This should be php <5.4 compatible!<commit_after><?php

/*
 * This file is a part of Sculpin.
 *
 * (c) Dragonfly Development Inc.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Sculpin\Bundle\SculpinBundle\DependencyInjection\Compiler;

use dflydev\util\antPathMatcher\AntPathMatcher;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

/**
 * Text Extension Provider pass
 *
 * @author <NAME> <<EMAIL>>
 */
class CustomMimeTypesRepositoryPass implements CompilerPassInterface
{
    /**
     * {@inheritdoc}
     */
    public function process(ContainerBuilder $container)
    {
        if (false === $container->hasDefinition('sculpin.custom_mime_types_repository')) {
            return;
        }

        $definition = $container->getDefinition('sculpin.custom_mime_types_repository');

        $data = array();
        foreach ($container->findTaggedServiceIds('sculpin.custom_mime_extensions') as $tagAttributes) {
            foreach ($tagAttributes as $attributes) {
                $type = $attributes['type'];
                $parameter = $attributes['parameter'];

{'fraction_non_alphanumeric': 0.10816244471250502, 'fraction_numerical': 0.0008041817450743868, 'mean_word_length': 3.6159554730983303, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2410187', 'n_tokens_mistral': 668, 'n_tokens_neox': 648, 'n_words': 154}