mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-27 17:15:02 +00:00
Apply rector rules: symfony up to 54
This commit is contained in:
@@ -27,15 +27,9 @@ abstract class AbstractElement
|
||||
{
|
||||
/**
|
||||
* @ORM\Column(name="amount", type="decimal", precision=10, scale=2)
|
||||
*
|
||||
* @Assert\GreaterThan(
|
||||
* value=0
|
||||
* )
|
||||
*
|
||||
* @Assert\NotNull(
|
||||
* message="The amount cannot be empty"
|
||||
* )
|
||||
*/
|
||||
#[Assert\GreaterThan(value: 0)]
|
||||
#[Assert\NotNull(message: 'The amount cannot be empty')]
|
||||
private string $amount;
|
||||
|
||||
/**
|
||||
@@ -45,12 +39,8 @@ abstract class AbstractElement
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="endDate", type="datetime_immutable", nullable=true)
|
||||
*
|
||||
* @Assert\GreaterThan(
|
||||
* propertyPath="startDate",
|
||||
* message="The budget element's end date must be after the start date"
|
||||
* )
|
||||
*/
|
||||
#[Assert\GreaterThan(propertyPath: 'startDate', message: "The budget element's end date must be after the start date")]
|
||||
private ?\DateTimeImmutable $endDate = null;
|
||||
|
||||
/**
|
||||
@@ -69,9 +59,8 @@ abstract class AbstractElement
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="startDate", type="datetime_immutable")
|
||||
*
|
||||
* @Assert\Date
|
||||
*/
|
||||
#[Assert\Date]
|
||||
private \DateTimeImmutable $startDate;
|
||||
|
||||
/**
|
||||
|
@@ -23,9 +23,8 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
* )
|
||||
*
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @UniqueEntity(fields={"kind"})
|
||||
*/
|
||||
#[UniqueEntity(fields: ['kind'])]
|
||||
class ChargeKind
|
||||
{
|
||||
/**
|
||||
@@ -44,11 +43,9 @@ class ChargeKind
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, options={"default": ""}, nullable=false)
|
||||
*
|
||||
* @Assert\Regex(pattern="/^[a-z0-9\-_]{1,}$/", message="budget.admin.form.kind.only_alphanumeric")
|
||||
*
|
||||
* @Assert\Length(min=3)
|
||||
*/
|
||||
#[Assert\Regex(pattern: '/^[a-z0-9\-_]{1,}$/', message: 'budget.admin.form.kind.only_alphanumeric')]
|
||||
#[Assert\Length(min: 3)]
|
||||
private string $kind = '';
|
||||
|
||||
/**
|
||||
|
@@ -22,11 +22,12 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
*
|
||||
* @ORM\UniqueConstraint(name="resource_kind_unique_type_idx", fields={"kind"})
|
||||
* })
|
||||
* @ORM\UniqueConstraint(name="resource_kind_unique_type_idx", fields={"kind"})
|
||||
* })
|
||||
*
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @UniqueEntity(fields={"kind"})
|
||||
*/
|
||||
#[UniqueEntity(fields: ['kind'])]
|
||||
class ResourceKind
|
||||
{
|
||||
/**
|
||||
@@ -45,11 +46,9 @@ class ResourceKind
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=false, options={"default": ""})
|
||||
*
|
||||
* @Assert\Regex(pattern="/^[a-z0-9\-_]{1,}$/", message="budget.admin.form.kind.only_alphanumeric")
|
||||
*
|
||||
* @Assert\Length(min=3)
|
||||
*/
|
||||
#[Assert\Regex(pattern: '/^[a-z0-9\-_]{1,}$/', message: 'budget.admin.form.kind.only_alphanumeric')]
|
||||
#[Assert\Length(min: 3)]
|
||||
private string $kind = '';
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user