<commit_before><?php
/**
 * Litus is a project by a group of students from the KU Leuven. The goal is to create
 * various applications to support the IT needs of student unions.
 *
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 *
 * @license http://litus.cc/LICENSE
 */

namespace CommonBundle\Entity\User;

use CommonBundle\Component\Util\AcademicYear,
    CommonBundle\Entity\Acl\Role,
    CommonBundle\Entity\General\Address,
    CommonBundle\Entity\General\AcademicYear as AcademicYearEntity,
    CommonBundle\Entity\General\Language,
    CommonBundle\Entity\User\Code,
    CommonBundle\Entity\User\Credential,
    CommonBundle\Entity\User\Status\Organization as OrganizationStatus,
    Doctrine\Common\Collections\ArrayCollection,
    Doctrine\ORM\EntityManager,
    Doctrine\ORM\Mapping as ORM,
    Zend\Mail\Message,
    Zend\Mail\Transport\TransportInterface;

/**
 * This is the entity for a person.
 *
 * @ORM\Entity(repositoryClass="CommonBundle\Repository\User\Person")
 * @ORM\Table(
 *      name="users.people",
 *      uniqueConstraints={@ORM\UniqueConstraint(name="username_unique", columns={"username"})}
 * )
 * @ORM\InheritanceType("JOINED")
 * @ORM\DiscriminatorColumn(name="inheritance_type", type="string")
 * @ORM\DiscriminatorMap({
 *      "academic"="CommonBundle\Entity\User\Person\Academic",
 *      "corporate"="BrBundle\Entity\User\Person\Corporate",
 *      "supplier"="CudiBundle\Entity\User\Person\Supplier"
 * })
 */
abstract class Person
{
    /**
     * @var string The persons unique identifier
     *
     * @ORM\Id
     * @ORM\GeneratedValue
     * @ORM\Column(type="bigint")
     */
    private $id;

    /**
     * @var string The persons username
     *
     * @ORM\Column(type="string", length=50)
     */
    private $username;

    /**
     * @var \CommonBundle\Entity\User\Credential The person's credential
     *
     * @ORM\OneToOne(targetEntity="CommonBundle\Entity\User\Credential", cascade={"all"}, fetch="EAGER")
     * @ORM\JoinColumn(name="credential", referencedColumnName="id")
     */
    private $credential;

    /**
     * @var \Doctrine\Common\Collections\ArrayCollection;
     *
     * @ORM\ManyToMany(targetEntity="CommonBundle\Entity\Acl\Role")
     * @ORM\JoinTable(
     *      name="users.people_roles_map",
     *      joinColumns={@ORM\JoinColumn(name="person", referencedColumnName="id")},
     *      inverseJoinColumns={@ORM\JoinColumn(name="role", referencedColumnName="name")}
     * )
     */
    private $roles;

    /**
     * @var string The persons first name
     *
     * @ORM\Column(name="first_name", type="string", length=30)
     */
    private $firstName;

    /**
     * @var string The persons last name
     *
     * @ORM\Column(name="last_name", type="string", length=30)
     */
    private $lastName;

    /**
     * @var string The users email address.
     *
     * @ORM\Column(type="string", nullable=true, length=100)
     */
    private $email;

    /**
     * @var \CommonBundle\Entity\General\Address The address of the supplier
     *
     * @ORM\OneToOne(targetEntity="CommonBundle\Entity\General\Address", cascade={"persist"})
     * @ORM\JoinColumn(name="address", referencedColumnName="id")
     */
    private $address;

    /**
     * @var string The persons telephone number
     *
     * @ORM\Column(type="string", length=15, nullable=true)
     */
    private $phoneNumber;

    /**
     * @var string The persons sex ('m' or 'f')
     *
     * @ORM\Column(type="string", length=1, nullable=true)
     */
    private $sex;<commit_msg>There are some people what strange names<commit_after><?php
/**
 * Litus is a project by a group of students from the KU Leuven. The goal is to create
 * various applications to support the IT needs of student unions.
 *
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 *
 * @license http://litus.cc/LICENSE
 */

namespace CommonBundle\Entity\User;

use CommonBundle\Component\Util\AcademicYear,
    CommonBundle\Entity\Acl\Role,
    CommonBundle\Entity\General\Address,
    CommonBundle\Entity\General\AcademicYear as AcademicYearEntity,
    CommonBundle\Entity\General\Language,
    CommonBundle\Entity\User\Code,
    CommonBundle\Entity\User\Credential,
    CommonBundle\Entity\User\Status\Organization as OrganizationStatus,
    Doctrine\Common\Collections\ArrayCollection,
    Doctrine\ORM\EntityManager,
    Doctrine\ORM\Mapping as ORM,
    Zend\Mail\Message,
    Zend\Mail\Transport\TransportInterface;

/**
 * This is the entity for a person.
 *
 * @ORM\Entity(repositoryClass="CommonBundle\Repository\User\Person")
 * @ORM\Table(
 *      name="users.people",
 *      uniqueConstraints={@ORM\UniqueConstraint(name="username_unique", columns={"username"})}
 * )
 * @ORM\InheritanceType("JOINED")
 * @ORM\DiscriminatorColumn(name="inheritance_type", type="string")
 * @ORM\DiscriminatorMap({
 *      "academic"="CommonBundle\Entity\User\Person\Academic",
 *      "corporate"="BrBundle\Entity\User\Person\Corporate",
 *      "supplier"="CudiBundle\Entity\User\Person\Supplier"
 * })
 */
abstract class Person
{
    /**
     * @var string The persons unique identifier
     *
     * @ORM\Id
     * @ORM\GeneratedValue
     * @ORM\Column(type="bigint")
     */
    private $id;

    /**
     * @var string The persons username
     *
     * @ORM\Column(type="string", length=50)
     */
    private $username;

    /**
     * @var \CommonBundle\Entity\User\Credential The person's credential
     *
     * @ORM\OneToOne(targetEntity="CommonBundle\Entity\User\Credential", cascade={"all"}, fetch="EAGER")
     * @ORM\JoinColumn(name="credential", referencedColumnName="id")
     */
    private $credential;

    /**
     * @var \Doctrine\Common\Collections\ArrayCollection;
     *
     * @ORM\ManyToMany(targetEntity="CommonBundle\Entity\Acl\Role")
     * @ORM\JoinTable(
     *      name="users.people_roles_map",
     *      joinColumns={@ORM\JoinColumn(name="person", referencedColumnName="id")},
     *      inverseJoinColumns={@ORM\JoinColumn(name="role", referencedColumnName="name")}
     * )
     */
    private $roles;

    /**
     * @var string The persons first name
     *
     * @ORM\Column(name="first_name", type="string", length=50)
     */
    private $firstName;

    /**
     * @var string The persons last name
     *
     * @ORM\Column(name="last_name", type="string", length=50)
     */
    private $lastName;

    /**
     * @var string The users email address.
     *
     * @ORM\Column(type="string", nullable=true, length=100)
     */
    private $email;

    /**
     * @var \CommonBundle\Entity\General\Address The address of the supplier
     *
     * @ORM\OneToOne(targetEntity="CommonBundle\Entity\General\Address", cascade={"persist"})
     * @ORM\JoinColumn(name="address", referencedColumnName="id")
     */
    private $address;

    /**
     * @var string The persons telephone number
     *
     * @ORM\Column(type="string", length=15, nullable=true)
     */
    private $phoneNumber;

    /**
     * @var string The persons sex ('m' or 'f')
     *
     * @ORM\Column(type="string", length=1, nullable=true)
     */
    private $sex;
{'fraction_non_alphanumeric': 0.15034917157332603, 'fraction_numerical': 0.0032863206901273447, 'mean_word_length': 3.152359295054008, 'pattern_counts': {'":': 0, '<': 35, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3942646', 'n_tokens_mistral': 2323, 'n_tokens_neox': 2259, 'n_words': 411}