<commit_before><?php
namespace UserBundle\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use UserBundle\Entity\Estudiante;

class LoadEstudianteData extends AbstractFixture implements OrderedFixtureInterface
{
    /**
     * {@inheritDoc}
     */
    public function load(ObjectManager $manager)
    {
        //$users = $manager->getRepository('UserBundle:Usuario')->findStudentsToCreate("ROLE_ESTUDIANTE");
        
        $users = $manager->getRepository('UserBundle:Usuario')->findAll();
        foreach ($users as $i=> $user) {
           
            $est = new Estudiante();
            $est->setNombre("nombre ".$i);
            $est->setApellido("apellido ".$i);
            $est->setCedula(20000 + $i);
            
            $est->setNotaPrimero(rand(1000,2000)/100);
            $est->setNotaSegundo(rand(1000,2000)/100);
            $est->setNotaTercero(rand(1000,2000)/100);
            $est->setNotaCuarto(rand(1000,2000)/100);
            $est->setCantMaterias(rand(40,60));
            $est->setPromedio(rand(1000,2000)/100);
            
            $est->setPrimeraOpcionOpsu(rand(0,4));
            $est->setSegundaOpcionOpsu(rand(0,4));
            $est->setSexo(rand(0,1));
            $est->setTieneAccesoInternet(rand(0,1));
            $est->setEsAsignadoOPSU(rand(0,1));
            $est->setGestionPlantel(rand(0,2));
            $est->setTipoPlantel(rand(0,1));
            $est->setNivelSocioeconomico(rand(0,2));
            $est->setNivelEstudioPadres(rand(0,3));
            $est->setUsuario($user);

            $manager->persist($est);
            $manager->flush();
        }
    }
    /**
    * Función que identifica el orden de ejecución de DataFixture
    * @return int
    */
    public function getOrder()
    {
        return 2;
    }
}<commit_msg>correccion de funcion<commit_after><?php
namespace UserBundle\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use UserBundle\Entity\Estudiante;

class LoadEstudianteData extends AbstractFixture implements OrderedFixtureInterface
{
    /**
     * {@inheritDoc}
     */
    public function load(ObjectManager $manager)
    {
        //$users = $manager->getRepository('UserBundle:Usuario')->findStudentsToCreate("ROLE_ESTUDIANTE");
        
        $users = $manager->getRepository('UserBundle:Usuario')->findAll();
        foreach ($users as $i=> $user) {
           
            $est = new Estudiante();
            $est->setNombre("nombre ".$i);
            $est->setApellido("apellido ".$i);
            $est->setCedula(20000 + $i);
            
            $est->setNotaPrimero(rand(1000,2000)/100);
            $est->setNotaSegundo(rand(1000,2000)/100);
            $est->setNotaTercero(rand(1000,2000)/100);
            $est->setNotaCuarto(rand(1000,2000)/100);
            $est->setCantMaterias(rand(40,60));
            $est->setPromedio(rand(1000,2000)/100);
            
            $est->setPrimeraOpcion(rand(0,4));
            $est->setSegundaOpcion(rand(0,4));
            $est->setSexo(rand(0,1));
            $est->setTieneAccesoInternet(rand(0,1));
            $est->setEsAsignadoOPSU(rand(0,1));
            $est->setGestionPlantel(rand(0,2));
            $est->setTipoPlantel(rand(0,1));
            $est->setNivelSocioeconomico(rand(0,2));
            $est->setNivelEstudioPadres(rand(0,3));
            $est->setUsuario($user);

            $manager->persist($est);
            $manager->flush();
        }
    }
    /**
    * Función que identifica el orden de ejecución de DataFixture
    * @return int
    */
    public function getOrder()
    {
        return 2;
    }
}
{'fraction_non_alphanumeric': 0.15, 'fraction_numerical': 0.043229166666666666, 'mean_word_length': 2.4760180995475114, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 55, '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': '3745740', 'n_tokens_mistral': 1355, 'n_tokens_neox': 1260, 'n_words': 150}