<commit_before><?php
/**
 * Created by PhpStorm.
 * User: karlvaniseghem
 * Date: 18/06/15
 * Time: 21:07
 */

namespace Bakgat\Notos\Domain\Model\Identity;


use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;

use JMS\Serializer\Annotation as JMS;

/**
 * @ORM\Entity
 * @ORM\Table(name="groups")
 *
 */
class Group extends Party
{
    /**
     * @ORM\Column(type="string", nullable=true)
     * @JMS\Groups({"detail", "list"})
     */
    private $description;
    /**
     * @ORM\Column(type="string", nullable=true)
     * @JMS\Exclude
     */
    private $avatar;
    /**
     * @ORM\ManyToOne(targetEntity="Group", inversedBy="children")
     */
    private $parent;

    /**
     * @ORM\OneToMany(targetEntity="Group", mappedBy="parent")
     */
    private $children;

    public function __construct($name)
    {
        parent::__construct($name);
    }

    public static function register(Name $name)
    {
        return new Group($name);
    }

    /**
     * Setting the name of the organization
     *
     * @param Name $name
     * @return $this
     */
    public function setName(Name $name)
    {
        $this->setLastName($name);
    }

    /**
     * Gets the name of the Group
     *
     * @JMS\VirtualProperty
     * @JMS\Groups({"list","detail","full"})
     */
    public function name()
    {
        return $this->lastName();
    }

    /**
     * @param  description
     * @return void
     */<commit_msg>fixed broken name virtual property<commit_after><?php
/**
 * Created by PhpStorm.
 * User: karlvaniseghem
 * Date: 18/06/15
 * Time: 21:07
 */

namespace Bakgat\Notos\Domain\Model\Identity;


use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;

use JMS\Serializer\Annotation as JMS;

/**
 * @ORM\Entity
 * @ORM\Table(name="groups")
 *
 */
class Group extends Party
{
    /**
     * @ORM\Column(type="string", nullable=true)
     * @JMS\Groups({"detail", "list"})
     */
    private $description;
    /**
     * @ORM\Column(type="string", nullable=true)
     * @JMS\Exclude
     */
    private $avatar;
    /**
     * @ORM\ManyToOne(targetEntity="Group", inversedBy="children")
     */
    private $parent;

    /**
     * @ORM\OneToMany(targetEntity="Group", mappedBy="parent")
     */
    private $children;

    public function __construct($name)
    {
        parent::__construct($name);
    }

    public static function register(Name $name)
    {
        return new Group($name);
    }

    /**
     * Setting the name of the organization
     *
     * @param Name $name
     * @return $this
     */
    public function setName(Name $name)
    {
        $this->setLastName($name);
    }

    /**
     * Gets the name of the Group
     *
     * @JMS\VirtualProperty
     */
    public function name()
    {
        return $this->lastName();
    }

    /**
     * @param  description
     * @return void
     */
{'fraction_non_alphanumeric': 0.15193745751189666, 'fraction_numerical': 0.006798096532970768, 'mean_word_length': 2.303030303030303, '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': '3205595', 'n_tokens_mistral': 978, 'n_tokens_neox': 946, 'n_words': 191}