Commit 42119226 by Damien Moulard

Apply php-cs-fixer to entities touched by the mapping fixes

Formatting only, no behavior change.
parent fe2b789e
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
namespace App\Entity; namespace App\Entity;
use App\Repository\AllocationRepository; use App\Repository\AllocationRepository;
use Gedmo\Timestampable\Traits\TimestampableEntity;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Gedmo\Timestampable\Traits\TimestampableEntity;
/** /**
* @ORM\Entity(repositoryClass=AllocationRepository::class) * @ORM\Entity(repositoryClass=AllocationRepository::class)
* *
* In SSA environment, defines the allocation an Adhérent gets when they pay their cotisation. * In SSA environment, defines the allocation an Adhérent gets when they pay their cotisation.
* An allocation is composed of a cotisation, which is the amount they will pay, * An allocation is composed of a cotisation, which is the amount they will pay,
* and an optional complementary flux to add to or withdraw from the user eMLC account so they get an allocation of [amount] eMLC. * and an optional complementary flux to add to or withdraw from the user eMLC account so they get an allocation of [amount] eMLC.
* *
* This table is primarily used in an external context (i.e. Metabase), to simplify access to allocation data. * This table is primarily used in an external context (i.e. Metabase), to simplify access to allocation data.
*/ */
class Allocation class Allocation
...@@ -40,14 +40,14 @@ class Allocation ...@@ -40,14 +40,14 @@ class Allocation
/** /**
* @ORM\OneToOne(targetEntity=Flux::class, inversedBy="allocation", cascade={"persist", "remove"}) * @ORM\OneToOne(targetEntity=Flux::class, inversedBy="allocation", cascade={"persist", "remove"})
* *
* Can be null if the user gets the same amount of allocation as their cotisation. * Can be null if the user gets the same amount of allocation as their cotisation.
*/ */
private $complementaryFlux; private $complementaryFlux;
/** /**
* @ORM\Column(type="float") * @ORM\Column(type="float")
* *
* Amount of the allocation, combinaison of cotisation flux to which is added or added the complementary flux * Amount of the allocation, combinaison of cotisation flux to which is added or added the complementary flux
*/ */
private $amount; private $amount;
......
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
namespace App\Entity; namespace App\Entity;
use App\Repository\PrestataireProductFamilyRepository;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
/** /**
...@@ -39,7 +37,6 @@ class DependentChild ...@@ -39,7 +37,6 @@ class DependentChild
*/ */
protected $sharedCustodyPercentage; protected $sharedCustodyPercentage;
public function getId(): ?int public function getId(): ?int
{ {
return $this->id; return $this->id;
...@@ -68,7 +65,7 @@ class DependentChild ...@@ -68,7 +65,7 @@ class DependentChild
return $this; return $this;
} }
public function getSharedCustodyPercentage() public function getSharedCustodyPercentage()
{ {
return $this->sharedCustodyPercentage; return $this->sharedCustodyPercentage;
......
...@@ -108,18 +108,17 @@ class ExternalAdherentDatedData ...@@ -108,18 +108,17 @@ class ExternalAdherentDatedData
public function __toString(): string public function __toString(): string
{ {
$incomes = []; $incomes = [];
if ($this->getMonthlyIncome() != null) { if (null != $this->getMonthlyIncome()) {
$incomes[] = "mensuels : " . $this->getMonthlyIncome() . "€"; $incomes[] = 'mensuels : ' . $this->getMonthlyIncome() . '€';
} }
if ($this->getAnnualIncome() != null) { if (null != $this->getAnnualIncome()) {
$incomes[] = "annuels : " . $this->getAnnualIncome() . "€"; $incomes[] = 'annuels : ' . $this->getAnnualIncome() . '€';
} }
if (count($incomes) > 0) { if (count($incomes) > 0) {
return "Année " . $this->getYear() . " : Revenus " . join(" / ", $incomes); return 'Année ' . $this->getYear() . ' : Revenus ' . join(' / ', $incomes);
} else { } else {
return ""; return '';
} }
} }
} }
...@@ -2,14 +2,12 @@ ...@@ -2,14 +2,12 @@
namespace App\Entity; namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Gedmo\Timestampable\Traits\TimestampableEntity; use Gedmo\Timestampable\Traits\TimestampableEntity;
use Ramsey\Uuid\Doctrine\UuidGenerator; use Ramsey\Uuid\Doctrine\UuidGenerator;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
/** /**
* @ORM\Entity(repositoryClass="App\Repository\ProfilDeCotisationRepository") * @ORM\Entity(repositoryClass="App\Repository\ProfilDeCotisationRepository")
* @ORM\HasLifecycleCallbacks() * @ORM\HasLifecycleCallbacks()
...@@ -32,7 +30,7 @@ class ProfilDeCotisation ...@@ -32,7 +30,7 @@ class ProfilDeCotisation
/** /**
* The amount the user will pay. * The amount the user will pay.
* The amount the user will receive depends on tauxCotisation. * The amount the user will receive depends on tauxCotisation.
* *
* @ORM\Column(name="montant", type="integer") * @ORM\Column(name="montant", type="integer")
* @Assert\Type("numeric") * @Assert\Type("numeric")
* @Assert\GreaterThanOrEqual( * @Assert\GreaterThanOrEqual(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment