<commit_before><?php

namespace NightsWatch\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * An IP Address
 *
 * @package NightsWatch\Entity
 * @ORM\Entity
 * @ORM\Table(name="ip", uniqueConstraints={@ORM\UniqueConstraint(name="user_ip_unique", columns={"userId", "ip"})})
 * @property int $id
 * @property string $ip
 * @property User $user
 * @property \DateTime $firstSeen
 * @property \DateTime $lastSeen
 */
class Ip
{
    /**
     * @var int
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

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

    /**
     * @var User
     * @ORM\ManyToOne(targetEntity="User", inversedBy="ips")
     * @ORM\JoinColumn(name="userId", referencedColumnName="id", nullable=false)
     */
    protected $user;

    /**
     * @var \DateTime
     * @ORM\Column(type="datetime")
     */
    protected $firstSeen;

    /**
     * @var \DateTime
     * @ORM\Column(type="datetime")
     */
    protected $lastSeen;

    public function __construct()
    {
        $this->firstSeen = $this->lastSeen = new \DateTime();
    }

    public function __get($property)<commit_msg>Undo a thing the database won't like (setting ip to not nullable - changing columns with foreign keys - sigh)<commit_after><?php

namespace NightsWatch\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * An IP Address
 *
 * @package NightsWatch\Entity
 * @ORM\Entity
 * @ORM\Table(name="ip", uniqueConstraints={@ORM\UniqueConstraint(name="user_ip_unique", columns={"userId", "ip"})})
 * @property int $id
 * @property string $ip
 * @property User $user
 * @property \DateTime $firstSeen
 * @property \DateTime $lastSeen
 */
class Ip
{
    /**
     * @var int
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

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

    /**
     * @var User
     * @ORM\ManyToOne(targetEntity="User", inversedBy="ips")
     * @ORM\JoinColumn(name="userId", referencedColumnName="id")
     */
    protected $user;

    /**
     * @var \DateTime
     * @ORM\Column(type="datetime")
     */
    protected $firstSeen;

    /**
     * @var \DateTime
     * @ORM\Column(type="datetime")
     */
    protected $lastSeen;

    public function __construct()
    {
        $this->firstSeen = $this->lastSeen = new \DateTime();
    }

    public function __get($property)
{'fraction_non_alphanumeric': 0.16374501992031873, 'fraction_numerical': 0.0, 'mean_word_length': 2.77593984962406, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '3427220', 'n_tokens_mistral': 827, 'n_tokens_neox': 813, 'n_words': 165}