chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

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

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

Missing function doc comment
Open

    public function getTitle(): string

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

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

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

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

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

    #[Assert\NotBlank]

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(['link_category:read', 'link_category:write', 'link_category:browse'])]

Missing function doc comment
Open

    public function getIid(): int

Missing function doc comment
Open

    public function setDescription(string $description): self

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

Add a single space around assignment operators
Open

declare(strict_types=1);

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

    #[Groups(['link_category:read', 'link_category:browse'])]

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

    #[ORM\OneToMany(targetEntity: CLink::class, mappedBy: 'category')]

Missing function doc comment
Open

    public function setTitle(string $title): self

Missing function doc comment
Open

    public function __toString(): string

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

#[ORM\EntityListeners([ResourceListener::class])]

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

class CLinkCategory extends AbstractResource implements ResourceInterface, ResourceShowCourseResourcesInSessionInterface, Stringable

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

    #[ApiProperty(identifier: true)]

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

    #[ORM\GeneratedValue]

Missing function doc comment
Open

    public function __construct()

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

#[ApiFilter(SearchFilter::class, properties: ['title' => 'partial', 'resourceNode.parent' => 'exact'])]

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

    #[ORM\Column(name: 'title', type: 'string', length: 255, nullable: false)]

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

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

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

#[ApiFilter(OrderFilter::class, properties: ['iid', 'resourceNode.title', 'resourceNode.createdAt', 'resourceNode.updatedAt'])]

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

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

Missing function doc comment
Open

    public function getResourceIdentifier(): int

Missing function doc comment
Open

    public function getDescription(): ?string

Missing function doc comment
Open

    public function toggleVisibility(): void

Missing function doc comment
Open

    public function getLinkCategoryVisible(): bool

Missing function doc comment
Open

    public function getResourceName(): string

Missing function doc comment
Open

    public function setResourceName(string $name): self

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

    {

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

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?string $description;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected Collection $links;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function __toString(): string

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

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

        return $this;

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

        return $this->title;

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

        $this->description = $description;

Line indented incorrectly; expected 4 spaces, found 0
Open

class CLinkCategory extends AbstractResource implements ResourceInterface, ResourceShowCourseResourcesInSessionInterface, Stringable

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

    public function getIid(): int

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

        $this->description = '';

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

    {

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 setDescription(string $description): self

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?int $iid = null;

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

    public function setTitle(string $title): self

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getTitle(): string

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected bool $linkCategoryVisible = true;

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

        $this->title = $title;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

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

        $this->links = new ArrayCollection();

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 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 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 getDescription(): ?string

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getResourceName(): string

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

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function toggleVisibility(): void

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

    {

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

        $this->linkCategoryVisible = (bool) $this->getFirstResourceLink()->getVisibility();

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getLinks(): array|Collection

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setResourceName(string $name): self

Line indented incorrectly; expected 4 spaces, found 0
Open

}

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

        return $this->links;

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

        return $this->getTitle();

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

    }

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

        $this->linkCategoryVisible = !$this->getFirstResourceLink()->getVisibility();

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

    public function getLinkCategoryVisible(): bool

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

        return $this->linkCategoryVisible;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

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

        return $this->description;

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

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

There are no issues that match your filters.

Category
Status