<commit_before><?php
/*
 * WellCommerce Open-Source E-Commerce Platform
 *
 * This file is part of the WellCommerce package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information,
 * please view the LICENSE file that was distributed with this source code.
 */

namespace WellCommerce\Bundle\TaxBundle\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\FixtureInterface;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use WellCommerce\Bundle\CoreBundle\DataFixtures\AbstractDataFixture;
use WellCommerce\Bundle\TaxBundle\Entity\Tax;

/**
 * Class LoadTaxData
 *
 * @package WellCommerce\Bundle\TaxBundle\DataFixtures\ORM
 * @author  <NAME> <<EMAIL>>
 */
class LoadTaxData extends AbstractDataFixture implements FixtureInterface, OrderedFixtureInterface
{
    /**
     * {@inheritDoc}
     */
    public function load(ObjectManager $manager)
    {
        $taxes = [0, 3, 5, 7, 23];

        foreach ($taxes as $val) {
            $name = sprintf('%s%s', $val, '%');
            $tax  = new Tax();
            $tax->setValue($val);
            $tax->translate('pl')->setName($name.' VAT');
            $tax->translate('en')->setName($name.' VAT');
            $tax->translate('de')->setName($name.' MwSt.');
            $tax->translate('fr')->setName($name.' TVA');
            $tax->mergeNewTranslations();
            $manager->persist($tax);
        }

        $manager->flush();
    }

    public function getOrder()
    {
        return 1;
    }
}<commit_msg>Removed unneeded languages from tax fixture<commit_after><?php
/*
 * WellCommerce Open-Source E-Commerce Platform
 *
 * This file is part of the WellCommerce package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information,
 * please view the LICENSE file that was distributed with this source code.
 */

namespace WellCommerce\Bundle\TaxBundle\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\FixtureInterface;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use WellCommerce\Bundle\CoreBundle\DataFixtures\AbstractDataFixture;
use WellCommerce\Bundle\TaxBundle\Entity\Tax;

/**
 * Class LoadTaxData
 *
 * @package WellCommerce\Bundle\TaxBundle\DataFixtures\ORM
 * @author  <NAME> <<EMAIL>>
 */
class LoadTaxData extends AbstractDataFixture implements FixtureInterface, OrderedFixtureInterface
{
    /**
     * {@inheritDoc}
     */
    public function load(ObjectManager $manager)
    {
        $taxes = [0, 3, 5, 7, 23];

        foreach ($taxes as $val) {
            $name = sprintf('%s%s', $val, '%');
            $tax  = new Tax();
            $tax->setValue($val);
            $tax->translate('pl')->setName($name.' VAT');
            $tax->translate('en')->setName($name.' VAT');
            $tax->mergeNewTranslations();
            $manager->persist($tax);
        }

        $manager->flush();
    }

    public function getOrder()
    {
        return 1;
    }
}
{'fraction_non_alphanumeric': 0.13938789088489686, 'fraction_numerical': 0.004657351962741184, 'mean_word_length': 3.0146862483311083, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 35, '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': '5563646', 'n_tokens_mistral': 910, 'n_tokens_neox': 892, 'n_words': 199}