chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

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

#[ORM\HasLifecycleCallbacks]

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

    #[Assert\NotBlank]

Missing function doc comment
Open

    public function __construct()

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

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

Missing function doc comment
Open

    public function getNameToTranslate(): string

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

#[ApiFilter(CidFilter::class)]

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: 'c_tool')]

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

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

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

class CTool extends AbstractResource implements ResourceInterface, ResourceShowCourseResourcesInSessionInterface, Stringable

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: 'title', type: 'text', nullable: false)]

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

#[ApiFilter(OrderFilter::class, properties: ['position' => 'ASC'])]

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

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

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

    #[Gedmo\SortableGroup]

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

    #[Gedmo\SortablePosition]

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

    #[Gedmo\SortableGroup]

Missing function doc comment
Open

    public function __toString(): string

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

    #[ORM\ManyToOne(targetEntity: Course::class, inversedBy: 'tools')]

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

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

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

    #[ORM\JoinColumn(name: 'tool_id', referencedColumnName: 'id', 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\Index(columns: ['session_id'], name: 'session_id')]

Missing function doc comment
Open

    public function getTitle(): string

Add a single space around assignment operators
Open

declare(strict_types=1);

Missing function doc comment
Open

    public function getTool(): Tool

Missing function doc comment
Open

    public function getResourceName(): string

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

#[ORM\Entity(repositoryClass: CToolRepository::class)]

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

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

Missing function doc comment
Open

    public function getVisibility(): ?bool

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

#[ApiFilter(SidFilter::class)]

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

    #[ORM\Column(name: 'visibility', type: 'boolean', nullable: true)]

Missing function doc comment
Open

    public function setCourse(Course $course): self

Missing function doc comment
Open

    public function getPosition(): int

Missing function doc comment
Open

    public function getCourse(): Course

Missing function doc comment
Open

    public function setSession(?Session $session = null): self

Missing function doc comment
Open

    public function setVisibility(bool $visibility): self

Missing function doc comment
Open

    public function getIid(): ?int

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

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

Missing function doc comment
Open

    public function setPosition(int $position): self

Missing function doc comment
Open

    public function getResourceIdentifier(): int

Missing function doc comment
Open

    public function setTitle(string $title): self

Missing function doc comment
Open

    public function setTool(Tool $tool): self

Missing function doc comment
Open

    public function getSession(): ?Session

Missing function doc comment
Open

    public function setResourceName(string $name): self

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected string $title;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 4 spaces, found 0
Open

class CTool extends AbstractResource implements ResourceInterface, ResourceShowCourseResourcesInSessionInterface, Stringable

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected int $position;

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

        return $this->getTitle();

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

    {

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

        return ucfirst(str_replace('_', ' ', $this->title));

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setTitle(string $title): self

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

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setPosition(int $position): self

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

        return $this->getTitle();

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

        return $this->visibility;

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->visibility = true;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getTool(): Tool

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setResourceName(string $name): self

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?bool $visibility = null;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getNameToTranslate(): string

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

        return $this->title;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getVisibility(): ?bool

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

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setTool(Tool $tool): self

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

        $this->position = $position;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getIid(): ?int

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

    }

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

        return $this->iid;

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

    protected Tool $tool;

Line indented incorrectly; expected 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

    protected ?int $iid = null;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected Course $course;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function __construct()

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getTitle(): string

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

    {

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

        $this->visibility = $visibility;

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

)]

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function __toString(): string

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

    {

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

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

    {

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

        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->setTitle($name);

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

        return $this->iid;

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

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getResourceIdentifier(): int

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

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setSession(?Session $session = null): self

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setVisibility(bool $visibility): self

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

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getSession(): ?Session

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

    public function getResourceName(): string

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

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

        $this->title = $title;

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

    {

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

        $this->tool = $tool;

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

    }

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

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

    {

There are no issues that match your filters.

Category
Status