chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

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

    #[ORM\Column(name: 'moved_at', type: 'datetime', unique: false, nullable: true)]

Missing function doc comment
Open

    public function getUser(): User

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

#[ORM\UniqueConstraint(name: 'session_user_unique', columns: ['session_id', 'user_id', 'relation_type'])]

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(

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

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

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

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

Missing function doc comment
Open

    public function getMovedStatus(): ?int

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

    #[Groups(['session_rel_user:read', 'session:item:read', 'user_subscriptions:sessions'])]

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

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

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

    #[ORM\Column(name: 'duration', type: 'integer', nullable: false)]

Missing function doc comment
Open

    public function setRelationType(int $relationType): self

Missing class doc comment
Open

class SessionRelUser

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

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

Missing function doc comment
Open

    public function getSession(): ?Session

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

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

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\Column(name: 'moved_to', type: 'integer', unique: false, nullable: true)]

Missing function doc comment
Open

    public function getId(): ?int

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

    #[Groups(['session_rel_user:read', 'session:item:read', 'user_subscriptions:sessions', 'session:basic'])]

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

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

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

    #[Assert\Choice(callback: [Session::class, 'getRelationTypeList'], message: 'Choose a valid relation type.')]

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

    #[ORM\Column(name: 'collapsed', type: 'boolean', nullable: true, options: ['default' => null])]

Missing function doc comment
Open

    public function getRelationType(): int

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\JoinColumn(name: 'session_id', referencedColumnName: 'id')]

Missing function doc comment
Open

    public function getMovedTo(): ?int

Missing function doc comment
Open

    public function getCourses(): Collection

Missing function doc comment
Open

    public function setSession(?Session $session): self

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

#[ApiResource(

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

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

Missing function doc comment
Open

    public function setDuration(int $duration): self

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

#[ORM\Index(columns: ['user_id', 'moved_to'], name: 'idx_session_rel_user_id_user_moved')]

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

#[UniqueEntity(

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

    #[ORM\Column(name: 'moved_status', type: 'integer', unique: false, nullable: true)]

Missing function doc comment
Open

    public function getDuration(): int

Add a single space around assignment operators
Open

declare(strict_types=1);

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\GeneratedValue]

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

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

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

    #[ORM\Column(name: 'registered_at', type: 'datetime')]

Missing function doc comment
Open

    public function setUser(User $user): self

Missing function doc comment
Open

    public function setMovedTo(int $movedTo): self

Missing function doc comment
Open

    public function setMovedAt(DateTime $movedAt): self

Missing function doc comment
Open

    public function setRegisteredAt(DateTime $registeredAt): self

Missing function doc comment
Open

    public function getRegisteredAt(): DateTime

Missing function doc comment
Open

    public function setMovedStatus(int $movedStatus): self

Missing function doc comment
Open

    public function getMovedAt(): ?DateTime

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?int $id = null;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getUser(): User

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

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getMovedStatus(): ?int

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

        return $this->user;

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

    {

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

        $this->movedStatus = null;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getId(): ?int

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected Collection $courses;

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

    {

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

        return $this->session->getSessionRelCourseByUser($this->getUser());

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

        $user->addSessionRelUser($this);

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

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected int $duration;

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

    {

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->relationType;

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

        $this->duration = 0;

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

    }

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

        $this->movedTo = null;

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 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 getMovedTo(): ?int

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setMovedTo(int $movedTo): self

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?DateTime $movedAt = null;

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

        $this->registeredAt = new DateTime('now', new DateTimeZone('UTC'));

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

    {

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

        $this->movedTo = $movedTo;

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

)]

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

)]

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

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

        return $this->movedTo;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

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

        $this->relationType = Session::STUDENT;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setSession(?Session $session): self

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

    {

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

)]

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected int $relationType;

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

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

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

        $this->movedAt = $movedAt;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getRegisteredAt(): DateTime

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?Session $session = null;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?int $movedTo;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?int $movedStatus;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getSession(): ?Session

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getRelationType(): int

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 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

    }

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

    {

Line indented incorrectly; expected 4 spaces, found 0
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 at least 8 spaces, found 4
Open

    {

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

        return $this->movedStatus;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getDuration(): int

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

    {

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

        return $this->registeredAt;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

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

)]

Line indented incorrectly; expected 4 spaces, found 0
Open

class SessionRelUser

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

{

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected User $user;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected DateTime $registeredAt;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?bool $collapsed = null;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setUser(User $user): self

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

    }

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

        $this->relationType = $relationType;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getCourses(): Collection

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

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

        $this->session = $session;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setRelationType(int $relationType): self

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setDuration(int $duration): self

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

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setRegisteredAt(DateTime $registeredAt): self

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 8 spaces, found 4
Open

    public function __construct()

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

        $this->user = $user;

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

        return $this->session;

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

        $this->registeredAt = $registeredAt;

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 8 spaces, found 4
Open

    public function getMovedAt(): ?DateTime

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

        $this->duration = $duration;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setMovedStatus(int $movedStatus): self

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setMovedAt(DateTime $movedAt): self

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

        return $this->duration;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

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

        $this->movedStatus = $movedStatus;

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->movedAt;

There are no issues that match your filters.

Category
Status