<commit_before><?php

namespace CL\Chill\MainBundle\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Acme\HelloBundle\Entity\UserGroup;

/**
 * Load countries into database
 *
 * @author <NAME> <julien arobase fastre point info>
 */
class LoadCountries extends AbstractFixture {
    
    public function getOrder() {
        return 1001;
    }
    
    public function load(ObjectManager $manager) {
        foreach ($this->countries as $code => $name) {
            $country = new \CL\Chill\MainBundle\Entity\Country();
            $country->setLabel(ucwords($name));
            $manager->persist($country);
        }
        
        $manager->flush();
    }
    
    
    public $countries = array(
        "ad" => "andorre",
        "ae" => "emirats arabes unis",
        "af" => "afghanistan",
        "ag" => "antigua-et-barbuda",
        "ai" => "anguilla",
        "al" => "albanie",
        "am" => "arménie",
        "an" => "antilles",
        "ao" => "angola",
        "aq" => "antarctique",
        "ar" => "argentine",
        "as" => "samoa américaines",<commit_msg>load countries<commit_after><?php

namespace CL\Chill\MainBundle\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Acme\HelloBundle\Entity\UserGroup;

/**
 * Load countries into database
 *
 * @author <NAME> <julien arobase fastre point info>
 */
class LoadCountries extends AbstractFixture {
    
    public function getOrder() {
        return 1001;
    }
    
    public function load(ObjectManager $manager) {
        
        echo "loading countries... \n";
        
        foreach ($this->countries as $code => $name) {
            $country = new \CL\Chill\MainBundle\Entity\Country();
            $country->setLabel(ucwords($name));
            $manager->persist($country);
        }
        
        $manager->flush();
    }
    
    
    public $countries = array(
        "ad" => "andorre",
        "ae" => "emirats arabes unis",
        "af" => "afghanistan",
        "ag" => "antigua-et-barbuda",
        "ai" => "anguilla",
        "al" => "albanie",
        "am" => "arménie",
        "an" => "antilles",
        "ao" => "angola",
        "aq" => "antarctique",
        "ar" => "argentine",
        "as" => "samoa américaines",
{'fraction_non_alphanumeric': 0.14953647722692462, 'fraction_numerical': 0.0032245062474808546, 'mean_word_length': 2.3631436314363143, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 41, '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': '4103252', 'n_tokens_mistral': 800, 'n_tokens_neox': 795, 'n_words': 156}