<commit_before><?php

namespace UCP\AbsenceBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity(repositoryClass="UCP\AbsenceBundle\Repository\AbsenceRepository")
 */
class Absence
{
    /**
     * @ORM\Id
     * @ORM\ManyToOne(targetEntity="Student", inversedBy="absences")
     */
    private $student;

    /**
     * @ORM\Id
     * @ORM\ManyToOne(targetEntity="Lesson", inversedBy="absences")
     */
    private $lesson;

    /**
     * @ORM\Column(type="boolean")
     */
    private $justified;

    /**
     * @ORM\Column(type="string", nullable=true)
     */
    private $reason;

    /**
     * Set justified
     *
     * @param boolean $justified
     * @return Absence
     */<commit_msg>Add convenience constructor for absences<commit_after><?php

namespace UCP\AbsenceBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity(repositoryClass="UCP\AbsenceBundle\Repository\AbsenceRepository")
 */
class Absence
{
    /**
     * @ORM\Id
     * @ORM\ManyToOne(targetEntity="Student", inversedBy="absences")
     */
    private $student;

    /**
     * @ORM\Id
     * @ORM\ManyToOne(targetEntity="Lesson", inversedBy="absences")
     */
    private $lesson;

    /**
     * @ORM\Column(type="boolean")
     */
    private $justified;

    /**
     * @ORM\Column(type="string", nullable=true)
     */
    private $reason;

    public function __construct(Lesson $lesson, Student $student)
    {
        $this->lesson = $lesson;
        $this->student = $student;
    }

    /**
     * Set justified
     *
     * @param boolean $justified
     * @return Absence
     */
{'fraction_non_alphanumeric': 0.15628891656288915, 'fraction_numerical': 0.0, 'mean_word_length': 2.5241228070175437, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6527579', 'n_tokens_mistral': 536, 'n_tokens_neox': 524, 'n_words': 82}