<commit_before><?php

/*
 * This file is part of the FixtureDumper library.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Sp\FixtureDumper\Generator\Alice;

use Symfony\Component\Yaml\Yaml;
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
use Sp\FixtureDumper\Converter\Alice\YamlVisitor;
use Sp\FixtureDumper\Generator\AbstractAliceGenerator;

/**
 * @author <NAME> <<EMAIL>>
 */
class YamlFixtureGenerator extends AbstractAliceGenerator
{

    /**
     * {@inheritdoc}
     */
    public function createFilename(ClassMetadata $metadata, $multipleFiles = true)
    {
        if ($multipleFiles) {
            return lcfirst($this->namingStrategy->fixtureName($metadata) .'.yml');
        }

        return 'fixtures.yml';
    }

    /**
     * {@inheritdoc}
     */
    protected function prepareData(ClassMetadata $metadata, array $data)
    {
        $yaml = new Yaml();

        return $yaml->dump(array($metadata->getName() => $data), 3);
    }

    /**
     * {@inheritdoc}
     */
    protected function getDefaultVisitor()
    {
        return new YamlVisitor();
    }
}<commit_msg>Use camel case yaml naming strategy instead of lower camel case<commit_after><?php

/*
 * This file is part of the FixtureDumper library.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Sp\FixtureDumper\Generator\Alice;

use Symfony\Component\Yaml\Yaml;
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
use Sp\FixtureDumper\Converter\Alice\YamlVisitor;
use Sp\FixtureDumper\Generator\AbstractAliceGenerator;

/**
 * @author <NAME> <<EMAIL>>
 */
class YamlFixtureGenerator extends AbstractAliceGenerator
{

    /**
     * {@inheritdoc}
     */
    public function createFilename(ClassMetadata $metadata, $multipleFiles = true)
    {
        if ($multipleFiles) {
            return $this->namingStrategy->fixtureName($metadata) .'.yml';
        }

        return 'fixtures.yml';
    }

    /**
     * {@inheritdoc}
     */
    protected function prepareData(ClassMetadata $metadata, array $data)
    {
        $yaml = new Yaml();

        return $yaml->dump(array($metadata->getName() => $data), 3);
    }

    /**
     * {@inheritdoc}
     */
    protected function getDefaultVisitor()
    {
        return new YamlVisitor();
    }
}
{'fraction_non_alphanumeric': 0.12635814889336017, 'fraction_numerical': 0.0008048289738430583, 'mean_word_length': 2.9776, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 25, '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': '5711130', 'n_tokens_mistral': 744, 'n_tokens_neox': 724, 'n_words': 176}