<commit_before><?php

namespace Starter\RestApiBundle\Entity;

use Starter\RestApiBundle\Model\ContentInterface;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Hateoas\Configuration\Annotation as Hateoas;

/**
 * @ORM\Entity(repositoryClass="Starter\RestApiBundle\Repository\ContentRepository")
 * @ORM\Table(name="contents")
 *
 * @Hateoas\Relation("self", href = "expr('/api/contents/' ~ object.getId())")
 */
class Content extends BaseEntity implements ContentInterface
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     * @ORM\Column(name="title", type="string", length=255)
     * @Assert\NotBlank()
     */
    private $title;

    /**<commit_msg>use route name for hateoas content entity<commit_after><?php

namespace Starter\RestApiBundle\Entity;

use Starter\RestApiBundle\Model\ContentInterface;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Hateoas\Configuration\Annotation as Hateoas;

/**
 * @ORM\Entity(repositoryClass="Starter\RestApiBundle\Repository\ContentRepository")
 * @ORM\Table(name="contents")
 *
 * @Hateoas\Relation(
 *     "self",
 *     href = @Hateoas\Route(
 *         "get_content",
 *         parameters={"id" = "expr(object.getId())"}
 *     )
 * )
 */
class Content extends BaseEntity implements ContentInterface
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     * @ORM\Column(name="title", type="string", length=255)
     * @Assert\NotBlank()
     */
    private $title;

    /**
{'fraction_non_alphanumeric': 0.1557649667405765, 'fraction_numerical': 0.0033259423503325942, 'mean_word_length': 3.402439024390244, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '5034393', 'n_tokens_mistral': 581, 'n_tokens_neox': 578, 'n_words': 99}