<commit_before><?php

namespace App\Entity;

use App\App\Location;
use App\Geolocalize\GeolocalizeInterface;
use App\Reject\Reject;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use JMS\Serializer\Annotation\ExclusionPolicy;
use JMS\Serializer\Annotation\Expose;
use JMS\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;

/**
 * Place.
 *
 * @ORM\Table(name="Place", indexes={
 *     @ORM\Index(name="place_nom_idx", columns={"nom"}),
 *     @ORM\Index(name="place_slug_idx", columns={"slug"}),
 *     @ORM\Index(name="place_external_id_idx", columns={"external_id"})
 * })
 * @ORM\Entity
 * @ORM\HasLifecycleCallbacks
 * @ExclusionPolicy("all")
 * @ORM\Entity(repositoryClass="App\Repository\PlaceRepository")
 */
class Place implements GeolocalizeInterface
{
    use EntityTimestampableTrait;

    /**
     * @var int
     *
     * @ORM\Column(type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     * @Groups({"list_event"})
     * @Expose
     */
    protected $id;

    /**
     * @ORM\Column(type="string", length=127, nullable=true)
     */
    protected $externalId;

    /**
     * @var string
     *
     * @ORM\Column(type="string", length=127, nullable=true)
     * @Groups({"list_event"})
     * @Expose
     */
    private $rue;

    /**
     * @var float
     *
     * @ORM\Column(type="float", nullable=true)
     * @Groups({"list_event"})
     * @Expose
     */
    private $latitude;

    /**
     * @var float
     *
     * @ORM\Column(type="float", nullable=true)
     * @Groups({"list_event"})
     * @Expose
     */
    private $longitude;

    /**
     * @var string
     *
     * @ORM\Column(type="string", length=255)
     * @Assert\NotBlank(message="Vous devez indiquer le lieu de votre événement")
     * @Groups({"list_event"})
     * @Expose
     */
    private $nom;

    /**
     * @var string
     * @Gedmo\Slug(fields={"nom"})
     * @ORM\Column(type="string", length=255, unique=true)
     */
    private $slug;

    /**
     * @var string
     *
     * @ORM\Column(type="string", length=255, nullable=true)
     */
    private $path;

    /**
     * @var string
     *
     * @ORM\Column(type="string", length=255, nullable=true)
     */
    private $url;

    /**
     * @ORM\Column(type="string", length=127, nullable=true)
     * @Groups({"list_event"})
     * @Expose
     */
    protected $ville;

    /**
     * @ORM\Column(type="string", length=7, nullable=true)
     * @Groups({"list_event"})
     * @Expose
     */
    protected $codePostal;

    /**
     * @var string
     *
     * @ORM\Column(type="string", length=256, nullable=true)
     */
    protected $facebookId;

    /**
     * @var City|null
     * @ORM\ManyToOne(targetEntity="App\Entity\City", fetch="EAGER")
     * @ORM\JoinColumn(nullable=true)
     * @Groups({"list_event"})
     * @Expose
     */
    protected $city;

    /**
     * @var ZipCity|null
     */
    protected $zipCity;

    /**
     * @ORM\ManyToOne(targetEntity="App\Entity\Country")
     * @ORM\JoinColumn(nullable=true)
     * @Groups({"list_event"})
     * @Expose
     */
    protected $country;

    /**
     * @ORM\Column(type="boolean", nullable=true)
     */
    protected $isJunk;

    /**
     * @var string
     */
    protected $countryName;

    /**
     * @var Reject
     */
    protected $reject;

    /** @var Location */
    protected $location;

    public function getLocation(): Location {
        if(null !== $this->location) {
            return $this->location;
        }

        $location = new Location();
        $location->setCity($this->city);
        $location->setCountry($this->country);
        return $this->location = $location;
    }

    public function getLocationSlug(): string
    {
        return $this->getLocation()->getSlug();
    }

    public function setReject(Reject $reject = null): self
    {
        $this->reject = $reject;

        return $this;
    }

    public function getReject(): ?Reject
    {
        return $this->reject;<commit_msg>Added missing place methods to Place<commit_after><?php

namespace App\Entity;

use App\App\Location;
use App\Geolocalize\GeolocalizeInterface;
use App\Reject\Reject;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use JMS\Serializer\Annotation\ExclusionPolicy;
use JMS\Serializer\Annotation\Expose;
use JMS\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;

/**
 * Place.
 *
 * @ORM\Table(name="Place", indexes={
 *     @ORM\Index(name="place_nom_idx", columns={"nom"}),
 *     @ORM\Index(name="place_slug_idx", columns={"slug"}),
 *     @ORM\Index(name="place_external_id_idx", columns={"external_id"})
 * })
 * @ORM\Entity
 * @ORM\HasLifecycleCallbacks
 * @ExclusionPolicy("all")
 * @ORM\Entity(repositoryClass="App\Repository\PlaceRepository")
 */
class Place implements GeolocalizeInterface
{
    use EntityTimestampableTrait;

    /**
     * @var int
     *
     * @ORM\Column(type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     * @Groups({"list_event"})
     * @Expose
     */
    protected $id;

    /**
     * @ORM\Column(type="string", length=127, nullable=true)
     */
    protected $externalId;

    /**
     * @var string
     *
     * @ORM\Column(type="string", length=127, nullable=true)
     * @Groups({"list_event"})
     * @Expose
     */
    private $rue;

    /**
     * @var float
     *
     * @ORM\Column(type="float", nullable=true)
     * @Groups({"list_event"})
     * @Expose
     */
    private $latitude;

    /**
     * @var float
     *
     * @ORM\Column(type="float", nullable=true)
     * @Groups({"list_event"})
     * @Expose
     */
    private $longitude;

    /**
     * @var string
     *
     * @ORM\Column(type="string", length=255)
     * @Assert\NotBlank(message="Vous devez indiquer le lieu de votre événement")
     * @Groups({"list_event"})
     * @Expose
     */
    private $nom;

    /**
     * @var string
     * @Gedmo\Slug(fields={"nom"})
     * @ORM\Column(type="string", length=255, unique=true)
     */
    private $slug;

    /**
     * @var string
     *
     * @ORM\Column(type="string", length=255, nullable=true)
     */
    private $path;

    /**
     * @var string
     *
     * @ORM\Column(type="string", length=255, nullable=true)
     */
    private $url;

    /**
     * @ORM\Column(type="string", length=127, nullable=true)
     * @Groups({"list_event"})
     * @Expose
     */
    protected $ville;

    /**
     * @ORM\Column(type="string", length=7, nullable=true)
     * @Groups({"list_event"})
     * @Expose
     */
    protected $codePostal;

    /**
     * @var string
     *
     * @ORM\Column(type="string", length=256, nullable=true)
     */
    protected $facebookId;

    /**
     * @var City|null
     * @ORM\ManyToOne(targetEntity="App\Entity\City", fetch="EAGER")
     * @ORM\JoinColumn(nullable=true)
     * @Groups({"list_event"})
     * @Expose
     */
    protected $city;

    /**
     * @var ZipCity|null
     */
    protected $zipCity;

    /**
     * @ORM\ManyToOne(targetEntity="App\Entity\Country")
     * @ORM\JoinColumn(nullable=true)
     * @Groups({"list_event"})
     * @Expose
     */
    protected $country;

    /**
     * @ORM\Column(type="boolean", nullable=true)
     */
    protected $isJunk;

    /**
     * @var string|null
     */
    protected $countryName;

    /**
     * @var Reject
     */
    protected $reject;

    /** @var Location */
    protected $location;

    public function getLocation(): Location {
        if(null !== $this->location) {
            return $this->location;
        }

        $location = new Location();
        $location->setCity($this->city);
        $location->setCountry($this->country);
        return $this->location = $location;
    }

    public function getLocationSlug(): string
    {
        return $this->getLocation()->getSlug();
    }

    /**
     * @return ZipCity|null
     */
    public function getZipCity(): ?ZipCity
    {
        return $this->zipCity;
    }

    /**
     * @param ZipCity|null $zipCity
     * @return Place
     */
    public function setZipCity(?ZipCity $zipCity): Place
    {
        $this->zipCity = $zipCity;
        return $this;
    }

    /**
     * @return string|null
     */
    public function getCountryName(): ?string
    {
        return $this->countryName;
    }

    /**
     * @param string|null $countryName
     * @return Place
     */
    public function setCountryName(?string $countryName): Place
    {
        $this->countryName = $countryName;
        return $this;
    }

    public function setReject(Reject $reject = null): self
    {
        $this->reject = $reject;

        return $this;
    }

    public function getReject(): ?Reject
    {
        return $this->reject;
{'fraction_non_alphanumeric': 0.16477916194790487, 'fraction_numerical': 0.0056625141562853904, 'mean_word_length': 2.3757645259938838, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, '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': '194546', 'n_tokens_mistral': 2996, 'n_tokens_neox': 2880, 'n_words': 482}