Apply rector rules: add annotation for doctrine mapping

This commit is contained in:
2024-04-05 00:01:30 +02:00
parent 579bd829f8
commit 72016e1a21
124 changed files with 1724 additions and 3770 deletions

View File

@@ -14,26 +14,19 @@ namespace Chill\MainBundle\Entity\Embeddable;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Embeddable
*/
#[ORM\Embeddable]
class CommentEmbeddable
{
/**
* @ORM\Column(type="text", nullable=true)
*/
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)]
private ?string $comment = null;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTime $date = null;
/**
* Embeddable does not support associations.
*
* @ORM\Column(type="integer", nullable=true)
*/
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: true)]
private ?int $userId = null;
public function getComment(): ?string

View File

@@ -14,16 +14,13 @@ namespace Chill\MainBundle\Entity\Embeddable;
use Chill\MainBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Embeddable
*/
#[ORM\Embeddable]
class PrivateCommentEmbeddable
{
/**
* @ORM\Column(type="json", nullable=false, options={"default": "{}"})
*
* @var array<int, string>
*/
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON, nullable: false, options: ['default' => '{}'])]
private array $comments = [];
public function getCommentForUser(User $user): string