<commit_before><?php

namespace Cocktails\RecipesBundle\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Cocktails\RecipesBundle\Entity\RecipesIngredients;

class LoadRecipesIngtedientsData extends AbstractFixture implements OrderedFixtureInterface
{
    /**
     * {@inheritDoc}
     */
    public function load(ObjectManager $manager)
    {

        $recipesIngredients = array(
            array('recipe-1','ingredient-1'),
            array('recipe-2','ingredient-3'),
            array('recipe-1','ingredient-5'),
            array('recipe-4','ingredient-4'),
            array('recipe-3','ingredient-2'),
        );

        foreach($recipesIngredients as $r_s){
            $data = new RecipesIngredients();
            $data->setRecipe($this->getReference($r_s[0],$data));
            $data->setIngredient($this->getReference($r_s[1],$data));
            $manager->persist($data);
        }
        $manager->flush();<commit_msg>Datafixtures receptai/ingredientai kiekio column'ai<commit_after><?php

namespace Cocktails\RecipesBundle\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Cocktails\RecipesBundle\Entity\RecipesIngredients;

class LoadRecipesIngtedientsData extends AbstractFixture implements OrderedFixtureInterface
{
    /**
     * {@inheritDoc}
     */
    public function load(ObjectManager $manager)
    {

        $recipesIngredients = array(
            array('recipe-1','ingredient-1','66'),
            array('recipe-2','ingredient-3', '15'),
            array('recipe-1','ingredient-5', '20'),
            array('recipe-4','ingredient-4', '5'),
            array('recipe-3','ingredient-2', '125'),
        );

        foreach($recipesIngredients as $r_s){
            $data = new RecipesIngredients();
            $data->setRecipe($this->getReference($r_s[0],$data));
            $data->setIngredient($this->getReference($r_s[1],$data));
            $data->setQuantity($r_s[2]);
            $manager->persist($data);
        }
        $manager->flush();
{'fraction_non_alphanumeric': 0.1455357142857143, 'fraction_numerical': 0.015625, 'mean_word_length': 3.204502814258912, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 16, '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': '141778', 'n_tokens_mistral': 715, 'n_tokens_neox': 689, 'n_words': 85}