chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

You must use "/**" style comments for a class comment
Open

class SessionRelCourse

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

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

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

#[ORM\Index(columns: ['c_id'], name: 'idx_session_rel_course_course_id')]

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

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

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

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

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

Add a single space around assignment operators
Open

declare(strict_types=1);

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

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

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

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

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

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

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

#[UniqueEntity(fields: ['course', 'session'], message: 'The course is already registered in this session.')]

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

    #[Groups(['session_rel_course:read', 'session_rel_course:write', 'session:read', 'user_subscriptions:sessions'])]

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

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

Missing function doc comment
Open

    public function setCourse(Course $course): self

Missing function doc comment
Open

    public function setPosition(int $position): void

Missing function doc comment
Open

    public function getNbrUsers(): int

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

#[ORM\UniqueConstraint(name: 'course_session_unique', columns: ['session_id', 'c_id'])]

Missing function doc comment
Open

    public function setNbrUsers(int $nbrUsers): self

Missing function doc comment
Open

    public function getPosition(): int

Missing function doc comment
Open

    public function setSession(Session $session): self

Missing function doc comment
Open

    public function getCourse(): Course

Missing function doc comment
Open

    public function __construct()

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

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

Missing function doc comment
Open

    public function getId(): ?int

Missing function doc comment
Open

    public function getSession(): Session

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

)]

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?int $id = null;

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

{

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?Session $session = null;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?Course $course = null;

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

        $this->nbrUsers = 0;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setCourse(Course $course): self

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setSession(Session $session): self

Line indented incorrectly; expected 4 spaces, found 0
Open

class SessionRelCourse

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected int $nbrUsers;

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

        $this->course = $course;

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

        return $this->position;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getCourse(): Course

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

        $this->position = $position;

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

        return $this->course;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getPosition(): int

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setNbrUsers(int $nbrUsers): self

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

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected int $position;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getSession(): Session

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

        $this->nbrUsers = $nbrUsers;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setPosition(int $position): void

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

        return $this->nbrUsers;

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

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

        return $this->session;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getNbrUsers(): 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 8 spaces, found 4
Open

    }

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

        $this->session = $session;

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

        $this->position = 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 at least 8 spaces, found 4
Open

    {

There are no issues that match your filters.

Category
Status