mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-31 20:13:49 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user