chamilo/chamilo-lms

View on GitHub
src/CourseBundle/Entity/CThematicAdvance.php

Summary

Maintainability
A
0 mins
Test Coverage

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

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

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

    #[ORM\Id]

Missing function doc comment
Open

    public function setContent(string $content): self

Missing function doc comment
Open

    public function getRoom(): ?Room

Missing function doc comment
Open

    public function setRoom(Room $room): self

Missing function doc comment
Open

    public function setDuration(int $duration): self

Missing function doc comment
Open

    public function getIid(): ?int

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

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

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

    #[ORM\JoinColumn(name: 'thematic_id', referencedColumnName: 'iid')]

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

    #[ORM\ManyToOne(targetEntity: CAttendance::class)]

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

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

Missing function doc comment
Open

    public function getThematic(): CThematic

Missing function doc comment
Open

    public function getAttendance(): ?CAttendance

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

class CThematicAdvance implements Stringable // extends AbstractResource implements ResourceInterface

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

    #[ORM\ManyToOne(targetEntity: CThematic::class, inversedBy: 'advances')]

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

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

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

    #[ORM\Column(name: 'content', type: 'text', nullable: true)]

Missing function doc comment
Open

    public function setStartDate(DateTime $startDate): self

Missing function doc comment
Open

    public function setThematic(CThematic $thematic): self

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

    #[ORM\JoinColumn(name: 'room_id', referencedColumnName: 'id')]

Missing function doc comment
Open

    public function __toString(): string

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

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

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

    #[ORM\JoinColumn(name: 'attendance_id', referencedColumnName: 'iid', onDelete: 'CASCADE')]

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

    #[ORM\ManyToOne(targetEntity: Room::class)]

Missing function doc comment
Open

    public function setAttendance(CAttendance $attendance): self

Missing function doc comment
Open

    public function setDoneAdvance(bool $doneAdvance): self

The 'getDoneAdvance()' method which returns a boolean should be named 'is...()' or 'has...()'
Open

    public function getDoneAdvance()
    {
        return $this->doneAdvance;
    }

BooleanGetMethodName

Since: 0.2

Looks for methods named 'getX()' with 'boolean' as the return type. The convention is to name these methods 'isX()' or 'hasX()'.

Example

class Foo {
    /**
     * @return boolean
     */
    public function getFoo() {} // bad
    /**
     * @return bool
     */
    public function isFoo(); // ok
    /**
     * @return boolean
     */
    public function getFoo($bar); // ok, unless checkParameterizedMethods=true
}

Source https://phpmd.org/rules/naming.html#booleangetmethodname

There are no issues that match your filters.

Category
Status