chamilo/chamilo-lms

View on GitHub
src/CoreBundle/Entity/MessageRelUser.php

Summary

Maintainability
A
0 mins
Test Coverage

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[ORM\JoinColumn(name: 'user_id', referencedColumnName: 'id', nullable: false, onDelete: 'CASCADE')]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[ORM\Column(name: 'receiver_type', type: 'smallint', nullable: false)]

Missing function doc comment
Open

    public function isStarred(): bool

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[ORM\JoinColumn(name: 'message_id', referencedColumnName: 'id', nullable: false)]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[Groups(['message_rel_user:read'])]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[ORM\ManyToOne(targetEntity: Message::class, cascade: ['persist'], inversedBy: 'receivers')]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[Groups(['message:read', 'message:write', 'message_rel_user:read'])]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[ORM\ManyToOne(targetEntity: User::class, cascade: ['persist'], inversedBy: 'receivedMessages')]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[ORM\Column(name: 'msg_read', type: 'boolean', nullable: false)]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

#[ApiFilter(

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[ORM\Column(name: 'starred', type: 'boolean', nullable: false)]

Missing function doc comment
Open

    public function setRead(bool $read): self

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[Groups(['message:read', 'message:write'])]

Add a single space around assignment operators
Open

declare(strict_types=1);

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

#[ORM\Entity]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

#[ApiFilter(

Missing function doc comment
Open

    public function isRead(): bool

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[ORM\Column(name: 'id', type: 'integer')]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[ORM\GeneratedValue]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[Assert\NotNull]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

#[ORM\UniqueConstraint(name: 'message_receiver', columns: ['message_id', 'user_id', 'receiver_type'])]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[ORM\JoinTable(name: 'message_rel_user_rel_tags')]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[ORM\ManyToMany(targetEntity: MessageTag::class, inversedBy: 'messageRelUsers', cascade: ['persist', 'remove'])]

Missing function doc comment
Open

    public function getId(): ?int

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

#[Gedmo\SoftDeleteable(timeAware: true)]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[Groups(['message_rel_user:read'])]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[Groups(['message:read', 'message:write', 'message_rel_user:read', 'message_rel_user:write'])]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[Groups(['message:read', 'message:write', 'message_rel_user:read', 'message_rel_user:write'])]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

#[UniqueEntity(

Missing function doc comment
Open

    public function setReceiverType(int $receiverType): self

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[ORM\Id]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

#[ORM\Table(name: 'message_rel_user')]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[Assert\Valid]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[Groups(['message:read', 'message_rel_user:read', 'message_rel_user:write'])]

Missing function doc comment
Open

    public function addTag(MessageTag $tag): self

Missing function doc comment
Open

    public function removeTag(MessageTag $tag): self

Missing function doc comment
Open

    public function setStarred(bool $starred): self

Missing function doc comment
Open

    public function setReceiver(User $receiver): self

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

#[ApiResource(

Missing class doc comment
Open

class MessageRelUser

Missing function doc comment
Open

    public function __construct()

Missing function doc comment
Open

    public function getMessage(): Message

Missing function doc comment
Open

    public function getReceiverType(): int

Missing function doc comment
Open

    public function setMessage(Message $message): self

Missing function doc comment
Open

    public function getReceiver(): User

Line indented incorrectly; expected at least 4 spaces, found 0
Open

)]

Line indented incorrectly; expected 12 spaces, found 8
Open

        if (!$this->tags->contains($tag)) {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const TYPE_INVITATION = 6;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const TYPE_SENDER = 8;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected bool $starred;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $this->tags->removeElement($tag);

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setStarred(bool $starred): self

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 4 spaces, found 0
Open

class MessageRelUser

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->starred = false;

Line indented incorrectly; expected at least 4 spaces, found 0
Open

)]

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected Collection $tags;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->tags = new ArrayCollection();

Line indented incorrectly; expected 12 spaces, found 8
Open

        if ($this->tags->contains($tag)) {

Line indented incorrectly; expected at least 4 spaces, found 0
Open

)]

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function addTag(MessageTag $tag): self

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected User $receiver;

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->read = $read;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const TYPE_PROMOTED = 3;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const TYPE_CONVERSATION = 7;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected bool $read;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const TYPE_GROUP = 5;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->read;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->read = false;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getId(): ?int

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function removeTag(MessageTag $tag): self

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const TYPE_TO = 1;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const TYPE_CC = 2;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->receiverType = self::TYPE_TO;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?int $id = null;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected Message $message;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getTags(): Collection

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->message = $message;

Line indented incorrectly; expected at least 4 spaces, found 0
Open

)]

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const TYPE_WALL = 4;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function __construct()

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $this->tags->add($tag);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->starred;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->starred = $starred;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    use SoftDeleteableEntity;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function isStarred(): bool

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->receiverType;

Line indented incorrectly; expected at least 4 spaces, found 0
Open

{

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected int $receiverType;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->id;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->tags;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function isRead(): bool

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setRead(bool $read): self

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->receiver;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->message;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setMessage(Message $message): self

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->receiver = $receiver;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getMessage(): Message

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setReceiverType(int $receiverType): self

Line indented incorrectly; expected 4 spaces, found 0
Open

}

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getReceiver(): User

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getReceiverType(): int

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setReceiver(User $receiver): self

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->receiverType = $receiverType;

There are no issues that match your filters.

Category
Status