<commit_before><?php

/*
 * This file is part of the Topycs package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
 
namespace Topycs\Entity;

use Doctrine\ORM\Mapping as ORM;
use Topycs\Entity\Collection\ThreadCollection;

/**
 * A basic category.
 *
 * @author <NAME> <<EMAIL>>
 * @package Topycs\Entity
 *
 * @ORM\Entity
 * @ORM\Table(name="categories")
 */
class Category implements CategoryInterface
{
    /**
     * @var int
     *
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @var string
     * 
     * @ORM\Column(type="text")
     */
    protected $name;

    /**
     * @var string
     *
     * @ORM\Column(type="text")
     */
    protected $description;

    /**
     * @var \Topycs\Entity\Collection\ThreadCollection
     * 
     * @ORM\OneToMany(targetEntity="\Topycs\Entity\Thread", mappedBy="thread")
     */
    protected $threads;

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

    /**
     * {@inheritdoc}
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * {@inheritdoc}
     */
    public function setName($name)
    {
        if (!is_string($name)) {
            throw new \InvalidArgumentException(
                sprintf('Expected string, got %s', gettype($name))
            );
        }
        
        $this->name = $name;
    }

    /**
     * {@inheritdoc}
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * {@inheritdoc}
     */
    public function setDescription($description)
    {
        if (!is_string($description)) {
            throw new \InvalidArgumentException(
                sprintf('Expected string, got %s', gettype($description))
            );
        }

        $this->description = $description;
    }

    /**
     * {@inheritdoc}
     */
    public function getThreads()
    {
        return $this->threads;
    }

    /**
     * {@inheritdoc}
     */
    public function setThreads(ThreadCollection $threads)
    {
        $this->threads = $threads;
    }

    /**
     * {@inheritdoc}
     */
    public function addThread(ThreadInterface $thread)
    {
        $this->threads->add($thread);
    }
}
<commit_msg>Fixed orm type of fields on category<commit_after><?php

/*
 * This file is part of the Topycs package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
 
namespace Topycs\Entity;

use Doctrine\ORM\Mapping as ORM;
use Topycs\Entity\Collection\ThreadCollection;

/**
 * A basic category.
 *
 * @author <NAME> <<EMAIL>>
 * @package Topycs\Entity
 *
 * @ORM\Entity
 * @ORM\Table(name="categories")
 */
class Category implements CategoryInterface
{
    /**
     * @var int
     *
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @var string
     * 
     * @ORM\Column(type="string")
     */
    protected $name;

    /**
     * @var string
     *
     * @ORM\Column(type="string")
     */
    protected $description;

    /**
     * @var \Topycs\Entity\Collection\ThreadCollection
     * 
     * @ORM\OneToMany(targetEntity="\Topycs\Entity\Thread", mappedBy="thread")
     */
    protected $threads;

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

    /**
     * {@inheritdoc}
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * {@inheritdoc}
     */
    public function setName($name)
    {
        if (!is_string($name)) {
            throw new \InvalidArgumentException(
                sprintf('Expected string, got %s', gettype($name))
            );
        }
        
        $this->name = $name;
    }

    /**
     * {@inheritdoc}
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * {@inheritdoc}
     */
    public function setDescription($description)
    {
        if (!is_string($description)) {
            throw new \InvalidArgumentException(
                sprintf('Expected string, got %s', gettype($description))
            );
        }

        $this->description = $description;
    }

    /**
     * {@inheritdoc}
     */
    public function getThreads()
    {
        return $this->threads;
    }

    /**
     * {@inheritdoc}
     */
    public function setThreads(ThreadCollection $threads)
    {
        $this->threads = $threads;
    }

    /**
     * {@inheritdoc}
     */
    public function addThread(ThreadInterface $thread)
    {
        $this->threads->add($thread);
    }
}

{'fraction_non_alphanumeric': 0.1459227467811159, 'fraction_numerical': 0.0, 'mean_word_length': 1.8737522019964767, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 33, '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': '4601771', 'n_tokens_mistral': 1496, 'n_tokens_neox': 1463, 'n_words': 296}