<commit_before><?php

namespace Ojstr\JournalBundle\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Ojstr\JournalBundle\Entity\Citation;

class LoadCitationData extends AbstractFixture implements OrderedFixtureInterface {

    public function load(ObjectManager $manager) {
        $article = $manager->createQuery('SELECT c FROM OjstrJournalBundle:Article c')
                        ->setMaxResults(1)->getResult();
        if (isset($article[0])) {
            $c = new Citation();
            $c->addArticle($article[0]);
            $c->setOrderNum(0);
            $c->setSource("Citation source");
            $c->setType(\Ojstr\Common\Params\CitationParams::$CITATION_TYPE_ARTICLE);
            $manager->persist($c);
            $manager->flush();
        }
    }

    public function getOrder() {
        return 13;<commit_msg>citation data fixture controller fixed<commit_after><?php

namespace Ojstr\JournalBundle\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Ojstr\JournalBundle\Entity\Citation;

class LoadCitationData extends AbstractFixture implements OrderedFixtureInterface {

    public function load(ObjectManager $manager) {
        $article = $manager->createQuery('SELECT c FROM OjstrJournalBundle:Article c')
                        ->setMaxResults(1)->getResult();
        if (isset($article[0])) {
            $c = new Citation();
            $c->addArticle($article[0]);
            $c->setOrderNum(0);
            $c->setRaw("Citation raw");
            $c->setType('article');
            $manager->persist($c);
            $manager->flush();
        }
    }

    public function getOrder() {
        return 13;
{'fraction_non_alphanumeric': 0.12046291425565492, 'fraction_numerical': 0.00631246712256707, 'mean_word_length': 3.0042105263157897, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '7390314', 'n_tokens_mistral': 542, 'n_tokens_neox': 520, 'n_words': 93}