<commit_before><?php
declare(strict_types=1);

namespace AppBundle\Entity;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;


/**
 * Metadata
 *
 * @ORM\Table(name="metadata")
 * @ORM\Entity
 */
class Metadata
{
    const TYPE_NUMBER = 'number';
    const TYPE_TEXT = 'text';

    protected static $types = [
        self::TYPE_NUMBER,
        self::TYPE_TEXT
    ];

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned"=true})
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     * @Groups({"get_image", "create_image_metadata"})
     */
    protected $id;

    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=50, nullable=false)
     * @Groups({"get_image", "create_image_metadata"})
     */
    protected $name;

    /**
     * @var string
     *
     * @ORM\Column(name="type", type="string", columnDefinition="ENUM('number', 'text')", nullable=false)
     * @Groups({"get_image", "create_image_metadata"})
     */
    protected $type = self::TYPE_TEXT;

    /**
     * @var Metadata
     * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Metadata", inversedBy="children")
     * @ORM\JoinColumn(name="parent_id", referencedColumnName="id")
     */
    protected $parent;

    /**
     * One Category has Many Categories.
     * @ORM\OneToMany(targetEntity="AppBundle\Entity\Metadata", mappedBy="parent")
     */
    protected $children;

    /**
     * Metadata constructor.
     */
    public function __construct()
    {
        $this->children = new ArrayCollection();
    }

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

    /**
     * @return string
     */
    public function getName(): string
    {
        return $this->name;<commit_msg>parent nullable<commit_after><?php
declare(strict_types=1);

namespace AppBundle\Entity;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;


/**
 * Metadata
 *
 * @ORM\Table(name="metadata")
 * @ORM\Entity
 */
class Metadata
{
    const TYPE_NUMBER = 'number';
    const TYPE_TEXT = 'text';

    protected static $types = [
        self::TYPE_NUMBER,
        self::TYPE_TEXT
    ];

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned"=true})
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     * @Groups({"get_image", "create_image_metadata"})
     */
    protected $id;

    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=50, nullable=false)
     * @Groups({"get_image", "create_image_metadata"})
     */
    protected $name;

    /**
     * @var string
     *
     * @ORM\Column(name="type", type="string", columnDefinition="ENUM('number', 'text')", nullable=false)
     * @Groups({"get_image", "create_image_metadata"})
     */
    protected $type = self::TYPE_TEXT;

    /**
     * @var null|Metadata
     * @ORM\ManyToOne(targetEntity="Metadata")
     * @ORM\JoinColumn(name="parent_id", referencedColumnName="id")
     */
    protected $parent;

    /**
     * Metadata constructor.
     */
    public function __construct()
    {
        $this->children = new ArrayCollection();
    }

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

    /**
     * @return string
     */
    public function getName(): string
    {
        return $this->name;
{'fraction_non_alphanumeric': 0.1611923820038642, 'fraction_numerical': 0.0016560861164780568, 'mean_word_length': 2.682926829268293, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '6698822', 'n_tokens_mistral': 1158, 'n_tokens_neox': 1128, 'n_words': 196}