Apply rector rules: add annotation for doctrine mapping

This commit is contained in:
2024-04-05 13:11:42 +02:00
parent a3f775a69b
commit 0ff4593863
118 changed files with 143 additions and 658 deletions

View File

@@ -13,9 +13,7 @@ namespace Chill\BudgetBundle\Entity;
use Chill\PersonBundle\Entity\Household\Household;
use Chill\PersonBundle\Entity\Person;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Ramsey\Uuid\Type\Decimal;
use Symfony\Component\Validator\Constraints as Assert;
/**

View File

@@ -17,8 +17,6 @@ use Doctrine\ORM\Mapping as ORM;
/**
* Charge.
*
*
*/
#[ORM\Entity(repositoryClass: \Chill\BudgetBundle\Repository\ChargeRepository::class)]
#[ORM\Table(name: 'chill_budget.charge')]
@@ -39,7 +37,6 @@ class Charge extends AbstractElement implements HasCentersInterface
self::HELP_NOT_RELEVANT,
];
#[ORM\ManyToOne(targetEntity: ChargeKind::class, inversedBy: 'AbstractElement')]
#[ORM\JoinColumn]
private ?ChargeKind $charge = null;
@@ -47,7 +44,6 @@ class Charge extends AbstractElement implements HasCentersInterface
#[ORM\Column(name: 'help', type: \Doctrine\DBAL\Types\Types::STRING, nullable: true)]
private ?string $help = self::HELP_NOT_RELEVANT;
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]

View File

@@ -17,8 +17,6 @@ use Symfony\Component\Validator\Constraints as Assert;
/**
* Type of charge.
*
*
*/
#[UniqueEntity(fields: ['kind'])]
#[ORM\Entity]
@@ -26,7 +24,6 @@ use Symfony\Component\Validator\Constraints as Assert;
#[ORM\UniqueConstraint(name: 'charge_kind_unique_type_idx', fields: ['kind'])]
class ChargeKind
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]

View File

@@ -17,20 +17,16 @@ use Doctrine\ORM\Mapping as ORM;
/**
* Resource.
*
*
*/
#[ORM\Entity(repositoryClass: \Chill\BudgetBundle\Repository\ResourceRepository::class)]
#[ORM\Table(name: 'chill_budget.resource')]
class Resource extends AbstractElement implements HasCentersInterface
{
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private ?int $id = null;
#[ORM\ManyToOne(targetEntity: ResourceKind::class, inversedBy: 'AbstractElement')]
#[ORM\JoinColumn]
private ?ResourceKind $resource = null;

View File

@@ -17,8 +17,6 @@ use Symfony\Component\Validator\Constraints as Assert;
/**
* Type of resource.
*
*
*/
#[UniqueEntity(fields: ['kind'])]
#[ORM\UniqueConstraint(name: 'resource_kind_unique_type_idx', fields: ['kind'])] // @ORM\Entity
@@ -28,7 +26,6 @@ use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity] // @ORM\Entity
class ResourceKind
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]