chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

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

    #[Groups(['course:read', 'trackCourseRanking:read', 'trackCourseRanking:write'])]

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

    #[Groups(['course:read', 'trackCourseRanking:read'])]

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

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

#[ORM\Index(columns: ['creation_date'], name: 'idx_tcc_creation_date')]

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

    #[ORM\GeneratedValue(strategy: 'IDENTITY')]

Missing function doc comment
Open

    public function setCourse(Course $course): self

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

    #[Groups(['course:read', 'trackCourseRanking:read', 'trackCourseRanking:write'])]

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

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

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

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

Add a single space around assignment operators
Open

declare(strict_types=1);

Missing function doc comment
Open

    public function __construct()

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

#[ORM\Index(columns: ['session_id'], name: 'idx_tcc_sid')]

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

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

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

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

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

class TrackCourseRanking

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

    #[Groups(['course:read', 'trackCourseRanking:read'])]

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

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

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

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

Missing function doc comment
Open

    public function getCourse(): Course

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

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

Missing function doc comment
Open

    public function getRealTotalScore(): int

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

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

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

    #[ORM\OneToOne(inversedBy: 'trackCourseRanking', targetEntity: Course::class)]

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

#[ORM\Index(columns: ['url_id'], name: 'idx_tcc_urlid')]

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

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

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

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

    #[Groups(['course:read', 'trackCourseRanking:read'])]

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

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

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

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

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?int $realTotalScore = null;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

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

        $this->accesses = 0;

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

            return (int) round($this->totalScore / $this->users);

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

        $this->creationDate = new DateTime();

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

        return $this->course;

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;

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

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setCreationDate(DateTime $creationDate)

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected Course $course;

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

    {

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

        $this->users = $users;

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

        return $this->creationDate;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setSessionId(int $sessionId)

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

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setTotalScore(int $totalScore)

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

        $this->creationDate = $creationDate;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected int $sessionId;

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

        $this->totalScore += $totalScore;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getUsers()

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

        return 0;

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

        $this->course = $course;

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

    {

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

        $this->sessionId = $sessionId;

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

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setAccesses(int $accesses)

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

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

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected int $users;

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

        return $this;

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

        return $this->id;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected DateTime $creationDate;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected int $accesses;

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

        $this->urlId = 0;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setCourse(Course $course): self

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

    {

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

        $this->urlId = $urlId;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getAccesses()

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

        $this->accesses = $accesses;

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

        $this->users++;

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

    public function __construct()

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

    {

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

        return $this->sessionId;

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 getCreationDate()

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?int $id = null;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getUrlId()

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setUrlId(int $urlId)

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

        return $this->totalScore;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getId()

Line indented incorrectly; expected 4 spaces, found 0
Open

class TrackCourseRanking

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

        $this->totalScore = 0;

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

        $this->users = 0;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getSessionId()

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

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getCourse(): Course

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

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getTotalScore()

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

        return $this->users;

Line indented incorrectly; expected 12 spaces, found 8
Open

        if (0 !== $this->totalScore && 0 !== $this->users) {

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected int $urlId;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected int $totalScore;

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

    {

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

        return $this->urlId;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setUsers(int $users)

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

There are no issues that match your filters.

Category
Status