<commit_before><?php

/**
 * This file is covered by the AGPLv3 license, which can be found at the LICENSE file in the root of this project.
 * @copyright 2017 subtitulamos.tv
 */

namespace App\Entities;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="episodes")
 */
class Episode
{
    /**
     * @ORM\Column(type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;
    
    /**
     * @ORM\ManyToOne(targetEntity="Show", inversedBy="episodes")
     * @ORM\JoinColumn(name="show_id", referencedColumnName="id")
     */
    private $show;

    /**
     * @ORM\Column(type="integer")
     */
    private $season;
    
    /**
     * @ORM\Column(type="integer")
     */
    private $number;

    /**
     * @ORM\Column(type="string", length=100)
     */
    private $name;
    
    /**
     * @ORM\Column(type="integer")
     */
    private $downloads;
    
    /**
     * @ORM\OneToMany(targetEntity="Version", mappedBy="episode")
     */
    private $versions;

    /**
     * @ORM\OneToMany(targetEntity="EpisodeComment", mappedBy="episode")
     */
    private $comments;

    public function getFullName()
    {
        return $this->show->getName() . " " .\str_pad($this->season, 2, "0", STR_PAD_LEFT) . "x" . \str_pad($this->number, 2, "0", STR_PAD_LEFT) . " - " . $this->getName();
    }
    
    /////////////////////////// AUTOGENERATED METHODS \\\\\\\\\\\\\\\\\\\\\
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->versions = new \Doctrine\Common\Collections\ArrayCollection();
        $this->comments = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set season<commit_msg>Season number is no longer 0-padded<commit_after><?php

/**
 * This file is covered by the AGPLv3 license, which can be found at the LICENSE file in the root of this project.
 * @copyright 2017 subtitulamos.tv
 */

namespace App\Entities;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="episodes")
 */
class Episode
{
    /**
     * @ORM\Column(type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;
    
    /**
     * @ORM\ManyToOne(targetEntity="Show", inversedBy="episodes")
     * @ORM\JoinColumn(name="show_id", referencedColumnName="id")
     */
    private $show;

    /**
     * @ORM\Column(type="integer")
     */
    private $season;
    
    /**
     * @ORM\Column(type="integer")
     */
    private $number;

    /**
     * @ORM\Column(type="string", length=100)
     */
    private $name;
    
    /**
     * @ORM\Column(type="integer")
     */
    private $downloads;
    
    /**
     * @ORM\OneToMany(targetEntity="Version", mappedBy="episode")
     */
    private $versions;

    /**
     * @ORM\OneToMany(targetEntity="EpisodeComment", mappedBy="episode")
     */
    private $comments;

    public function getFullName()
    {
        return $this->show->getName() . " " . $this->season . "x" . \str_pad($this->number, 2, "0", STR_PAD_LEFT) . " - " . $this->getName();
    }
    
    /////////////////////////// AUTOGENERATED METHODS \\\\\\\\\\\\\\\\\\\\\
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->versions = new \Doctrine\Common\Collections\ArrayCollection();
        $this->comments = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set season
{'fraction_non_alphanumeric': 0.1869742198100407, 'fraction_numerical': 0.006241519674355495, 'mean_word_length': 2.03125, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '322096', 'n_tokens_mistral': 1211, 'n_tokens_neox': 1169, 'n_words': 213}