mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
fix cs
This commit is contained in:
@@ -15,7 +15,7 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Table(name="chill_main_geographical_unit", uniqueConstraints={
|
||||
* @ORM\UniqueConstraint(name="geographical_unit_refid", columns={"layer_id", "unitRefId"})
|
||||
* @ORM\UniqueConstraint(name="geographical_unit_refid", columns={"layer_id", "unitRefId"})
|
||||
* })
|
||||
* @ORM\Entity(readOnly=true)
|
||||
*/
|
||||
@@ -33,6 +33,11 @@ class GeographicalUnit
|
||||
*/
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=GeographicalUnitLayer::class, inversedBy="units")
|
||||
*/
|
||||
private ?GeographicalUnitLayer $layer;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
*/
|
||||
@@ -43,21 +48,14 @@ class GeographicalUnit
|
||||
*/
|
||||
private string $unitRefId;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=GeographicalUnitLayer::class, inversedBy="units")
|
||||
*/
|
||||
private ?GeographicalUnitLayer $layer;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
protected function setId(int $id): self
|
||||
public function getLayer(): ?GeographicalUnitLayer
|
||||
{
|
||||
$this->id = $id;
|
||||
|
||||
return $this;
|
||||
return $this->layer;
|
||||
}
|
||||
|
||||
public function getUnitName(): ?string
|
||||
@@ -65,31 +63,10 @@ class GeographicalUnit
|
||||
return $this->unitName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return GeographicalUnitLayer|null
|
||||
*/
|
||||
public function getLayer(): ?GeographicalUnitLayer
|
||||
{
|
||||
return $this->layer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $unitRefId
|
||||
* @return GeographicalUnit
|
||||
*/
|
||||
public function setUnitRefId(string $unitRefId): GeographicalUnit
|
||||
{
|
||||
$this->unitRefId = $unitRefId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param GeographicalUnitLayer|null $layer
|
||||
* @return GeographicalUnit
|
||||
*/
|
||||
public function setLayer(?GeographicalUnitLayer $layer): GeographicalUnit
|
||||
{
|
||||
$this->layer = $layer;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -99,4 +76,18 @@ class GeographicalUnit
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setUnitRefId(string $unitRefId): GeographicalUnit
|
||||
{
|
||||
$this->unitRefId = $unitRefId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function setId(int $id): self
|
||||
{
|
||||
$this->id = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,14 @@
|
||||
<?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.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\MainBundle\Entity;
|
||||
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
@@ -8,7 +17,7 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Table(name="chill_main_geographical_unit_layer", uniqueConstraints={
|
||||
* @ORM\UniqueConstraint(name="geographical_unit_layer_refid", columns={"refId"})
|
||||
* @ORM\UniqueConstraint(name="geographical_unit_layer_refid", columns={"refId"})
|
||||
* })
|
||||
* @ORM\Entity
|
||||
*/
|
||||
@@ -41,45 +50,30 @@ class GeographicalUnitLayer
|
||||
$this->units = new ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int|null
|
||||
*/
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getName(): array
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $name
|
||||
* @return GeographicalUnitLayer
|
||||
*/
|
||||
public function setName(array $name): GeographicalUnitLayer
|
||||
{
|
||||
$this->name = $name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getRefId(): string
|
||||
{
|
||||
return $this->refId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function getUnits(): Collection
|
||||
{
|
||||
return $this->units;
|
||||
}
|
||||
}
|
||||
|
||||
public function setName(array $name): GeographicalUnitLayer
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user