mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 14:54:57 +00:00
cs: Fix code style (safe rules only).
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\MainBundle\Entity;
|
||||
|
||||
use Chill\MainBundle\Doctrine\Model\Point;
|
||||
@@ -7,37 +14,26 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
|
||||
/**
|
||||
* PostalCode
|
||||
* PostalCode.
|
||||
*
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(
|
||||
* name="chill_main_postal_code",
|
||||
* indexes={@ORM\Index(
|
||||
* name="search_name_code",
|
||||
* columns={"code", "label"}
|
||||
* )})
|
||||
* @ORM\HasLifecycleCallbacks()
|
||||
*
|
||||
* name="search_name_code",
|
||||
* columns={"code", "label"}
|
||||
* )})
|
||||
* @ORM\HasLifecycleCallbacks
|
||||
*/
|
||||
class PostalCode
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
* @var Point
|
||||
*
|
||||
* @ORM\Id
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
* @groups({"write", "read"})
|
||||
* @ORM\Column(type="point", nullable=true)
|
||||
* @groups({"read"})
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(type="string", length=255, name="label")
|
||||
* @groups({"write", "read"})
|
||||
*/
|
||||
private $name;
|
||||
private $center;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
@@ -56,7 +52,25 @@ class PostalCode
|
||||
private $country;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Id
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
* @groups({"write", "read"})
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(type="string", length=255, name="label")
|
||||
* @groups({"write", "read"})
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="origin", type="integer", nullable=true)
|
||||
* @groups({"write", "read"})
|
||||
@@ -69,7 +83,7 @@ class PostalCode
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
* @groups({"read"})
|
||||
*/
|
||||
private $refPostalCodeId;
|
||||
private $postalCodeSource;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
@@ -77,68 +91,45 @@ class PostalCode
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
* @groups({"read"})
|
||||
*/
|
||||
private $postalCodeSource;
|
||||
private $refPostalCodeId;
|
||||
|
||||
public function getCenter(): ?Point
|
||||
{
|
||||
return $this->center;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var Point
|
||||
* Get code.
|
||||
*
|
||||
* @ORM\Column(type="point", nullable=true)
|
||||
* @groups({"read"})
|
||||
* @return string
|
||||
*/
|
||||
private $center;
|
||||
public function getCode()
|
||||
{
|
||||
return $this->code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id
|
||||
* Get country.
|
||||
*
|
||||
* @return integer
|
||||
* @return Country
|
||||
*/
|
||||
public function getCountry()
|
||||
{
|
||||
return $this->country;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set origin
|
||||
*
|
||||
* @param int $origin
|
||||
*
|
||||
* @return PostalCode
|
||||
*/
|
||||
public function setOrigin($origin)
|
||||
{
|
||||
$this->origin = $origin;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get origin
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getOrigin()
|
||||
{
|
||||
return $this->origin;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set name
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return PostalCode
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* Get name.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -148,7 +139,34 @@ class PostalCode
|
||||
}
|
||||
|
||||
/**
|
||||
* Set code
|
||||
* Get origin.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getOrigin()
|
||||
{
|
||||
return $this->origin;
|
||||
}
|
||||
|
||||
public function getPostalCodeSource(): ?string
|
||||
{
|
||||
return $this->postalCodeSource;
|
||||
}
|
||||
|
||||
public function getRefPostalCodeId(): ?string
|
||||
{
|
||||
return $this->refPostalCodeId;
|
||||
}
|
||||
|
||||
public function setCenter(?Point $center): self
|
||||
{
|
||||
$this->center = $center;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set code.
|
||||
*
|
||||
* @param string $code
|
||||
*
|
||||
@@ -162,23 +180,13 @@ class PostalCode
|
||||
}
|
||||
|
||||
/**
|
||||
* Get code
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCode()
|
||||
{
|
||||
return $this->code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set country
|
||||
* Set country.
|
||||
*
|
||||
* @param Country $country
|
||||
*
|
||||
* @return PostalCode
|
||||
*/
|
||||
public function setCountry(Country $country = null)
|
||||
public function setCountry(?Country $country = null)
|
||||
{
|
||||
$this->country = $country;
|
||||
|
||||
@@ -186,30 +194,31 @@ class PostalCode
|
||||
}
|
||||
|
||||
/**
|
||||
* Get country
|
||||
* Set name.
|
||||
*
|
||||
* @return Country
|
||||
* @param string $name
|
||||
*
|
||||
* @return PostalCode
|
||||
*/
|
||||
public function getCountry()
|
||||
public function setName($name)
|
||||
{
|
||||
return $this->country;
|
||||
}
|
||||
|
||||
public function getRefPostalCodeId(): ?string
|
||||
{
|
||||
return $this->refPostalCodeId;
|
||||
}
|
||||
|
||||
public function setRefPostalCodeId(?string $refPostalCodeId): self
|
||||
{
|
||||
$this->refPostalCodeId = $refPostalCodeId;
|
||||
$this->name = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getPostalCodeSource(): ?string
|
||||
/**
|
||||
* Set origin.
|
||||
*
|
||||
* @param int $origin
|
||||
*
|
||||
* @return PostalCode
|
||||
*/
|
||||
public function setOrigin($origin)
|
||||
{
|
||||
return $this->postalCodeSource;
|
||||
$this->origin = $origin;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setPostalCodeSource(?string $postalCodeSource): self
|
||||
@@ -219,16 +228,10 @@ class PostalCode
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCenter(): ?Point
|
||||
public function setRefPostalCodeId(?string $refPostalCodeId): self
|
||||
{
|
||||
return $this->center;
|
||||
}
|
||||
|
||||
public function setCenter(?Point $center): self
|
||||
{
|
||||
$this->center = $center;
|
||||
$this->refPostalCodeId = $refPostalCodeId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user