<commit_before><?php

/**
 * ProTalk
 *
 * Copyright (c) 2012-2013, ProTalk
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Protalk\MediaBundle\Tests\Fixtures;

use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Common\Collections\ArrayCollection;
use Protalk\MediaBundle\Entity\Media;
use Protalk\MediaBundle\Entity\Mediatype;
use Protalk\MediaBundle\Entity\Speaker;
use Protalk\MediaBundle\Entity\Category;
use Protalk\MediaBundle\Entity\Tag;

class LoadMediaData extends AbstractFixture implements DependentFixtureInterface
{
    public function load(ObjectManager $manager)
    {
        $phpbb4 = new Media();
        $phpbb4->setMediatype($this->getReference('video'));
        $phpbb4->setSpeakers(
            new ArrayCollection(
                array(
                    $this->getReference('nils-adermann')
                )
            )
        );

        $phpbb4->setCategories(
            new ArrayCollection(
                array(
                    $this->getReference('php')
                )
            )
        );

        $phpbb4->setDate(new \Datetime());
        $phpbb4->setCreationDate(new \DateTime());<commit_msg>[BUGFIX] Fixed fixture, call to nonexistent function<commit_after><?php

/**
 * ProTalk
 *
 * Copyright (c) 2012-2013, ProTalk
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Protalk\MediaBundle\Tests\Fixtures;

use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Common\Collections\ArrayCollection;
use Protalk\MediaBundle\Entity\Media;
use Protalk\MediaBundle\Entity\Mediatype;
use Protalk\MediaBundle\Entity\Speaker;
use Protalk\MediaBundle\Entity\Category;
use Protalk\MediaBundle\Entity\Tag;

class LoadMediaData extends AbstractFixture implements DependentFixtureInterface
{
    public function load(ObjectManager $manager)
    {
        $phpbb4 = new Media();
        $phpbb4->setMediatype($this->getReference('video'));
        $phpbb4->setSpeakers(
            new ArrayCollection(
                array(
                    $this->getReference('nils-adermann')
                )
            )
        );

//        $phpbb4->setCategories(
//            new ArrayCollection(
//                array(
//                    $this->getReference('php')
//                )
//            )
//        );

        $phpbb4->setDate(new \Datetime());
        $phpbb4->setCreationDate(new \DateTime());
{'fraction_non_alphanumeric': 0.10543360921194675, 'fraction_numerical': 0.010075566750629723, 'mean_word_length': 2.6435124508519006, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '6076861', 'n_tokens_mistral': 795, 'n_tokens_neox': 757, 'n_words': 151}