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 @@
namespace App\Entity;
use App\Repository\AllocationRepository;
use Gedmo\Timestampable\Traits\TimestampableEntity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Timestampable\Traits\TimestampableEntity;
/**
* @ORM\Entity(repositoryClass=AllocationRepository::class)
*
*
* 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,
* 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.
*/
class Allocation
......@@ -40,14 +40,14 @@ class Allocation
/**
* @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.
*/
private $complementaryFlux;
/**
* @ORM\Column(type="float")
*
*
* Amount of the allocation, combinaison of cotisation flux to which is added or added the complementary flux
*/
private $amount;
......
......@@ -2,9 +2,7 @@
namespace App\Entity;
use App\Repository\PrestataireProductFamilyRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
......@@ -39,7 +37,6 @@ class DependentChild
*/
protected $sharedCustodyPercentage;
public function getId(): ?int
{
return $this->id;
......@@ -68,7 +65,7 @@ class DependentChild
return $this;
}
public function getSharedCustodyPercentage()
{
return $this->sharedCustodyPercentage;
......
......@@ -108,18 +108,17 @@ class ExternalAdherentDatedData
public function __toString(): string
{
$incomes = [];
if ($this->getMonthlyIncome() != null) {
$incomes[] = "mensuels : " . $this->getMonthlyIncome() . "€";
if (null != $this->getMonthlyIncome()) {
$incomes[] = 'mensuels : ' . $this->getMonthlyIncome() . '€';
}
if ($this->getAnnualIncome() != null) {
$incomes[] = "annuels : " . $this->getAnnualIncome() . "€";
if (null != $this->getAnnualIncome()) {
$incomes[] = 'annuels : ' . $this->getAnnualIncome() . '€';
}
if (count($incomes) > 0) {
return "Année " . $this->getYear() . " : Revenus " . join(" / ", $incomes);
return 'Année ' . $this->getYear() . ' : Revenus ' . join(' / ', $incomes);
} else {
return "";
return '';
}
}
}
......@@ -2,14 +2,12 @@
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Timestampable\Traits\TimestampableEntity;
use Ramsey\Uuid\Doctrine\UuidGenerator;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="App\Repository\ProfilDeCotisationRepository")
* @ORM\HasLifecycleCallbacks()
......@@ -32,7 +30,7 @@ class ProfilDeCotisation
/**
* The amount the user will pay.
* The amount the user will receive depends on tauxCotisation.
*
*
* @ORM\Column(name="montant", type="integer")
* @Assert\Type("numeric")
* @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