<commit_before><?php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
namespace Egulias\QuizBundle\Model\Quizes;

use Egulias\QuizBundle\Model\Questions\Question;
use Doctrine\Common\Collections\ArrayCollection;
/**
 * Declaration of abstract class Quiz to allow the creation of multiple types of quizes
 *
 * @author <NAME> <<EMAIL>>
 */
abstract class Quiz implements QuizInterface
{
    /**
     * To store quiz questions
     * @var $question array
     */
    protected $questions = array();

    protected $name = '';

    protected $type = 'Quiz';

    protected $uuid = '';

    public function __construct()
    {
        $this->questions = new ArrayCollection;
        $this->setUUID();
    }
    /**
     * Add a question to the quiz
     *
     * @param Question $q
     * @return Quiz for concatenation
     */
    public function addQuestion(Question $q)
    {
        $this->questions[] = $q;
        return $this;
    }

    public function getQuestions()
    {
        return $this->questions;
    }

    public function getQuestion($n = NULL)
    {
        if(is_null($n)) {
            $cur = $this->questions->current();
            $this->questions->next();
            return $cur;
        }<commit_msg>Doing it the right way :)<commit_after><?php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
namespace Egulias\QuizBundle\Model\Quizes;

use Egulias\QuizBundle\Model\Questions\Question;
use Doctrine\Common\Collections\ArrayCollection;
/**
 * Declaration of abstract class Quiz to allow the creation of multiple types of quizes
 *
 * @author <NAME> <<EMAIL>>
 */
abstract class Quiz implements QuizInterface
{
    /**
     * To store quiz questions
     * @var $question array
     */
    protected $questions = array();

    protected $name = '';

    protected $type = 'Quiz';

    protected $uuid = '';

    public function __construct()
    {
        $this->questions = new ArrayCollection;
        $this->setUUID();
    }
    /**
     * Add a question to the quiz
     *
     * @param Question $q
     * @return Quiz for concatenation
     */
    public function addQuestion(Question $q)
    {
        $this->questions->add($q);
        return $this;
    }

    public function getQuestions()
    {
        return $this->questions;
    }

    public function getQuestion($n = NULL)
    {
        if(is_null($n)) {
            $cur = $this->questions->current();
            $this->questions->next();
            return $cur;
        }
{'fraction_non_alphanumeric': 0.12540584415584416, 'fraction_numerical': 0.0016233766233766235, 'mean_word_length': 2.335588633288227, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 26, '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': '4513830', 'n_tokens_mistral': 739, 'n_tokens_neox': 705, 'n_words': 192}