chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

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

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

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

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

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

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

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

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

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

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

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

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

    #[Assert\NotBlank]

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

class CLink extends AbstractResource implements ResourceInterface, ResourceShowCourseResourcesInSessionInterface, Stringable

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

    #[Groups(['link:read', 'link:write', 'link:browse'])]

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

    #[Groups(['link:read', 'link:write', 'link:browse'])]

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

    #[ORM\ManyToOne(targetEntity: CLinkCategory::class, inversedBy: 'links')]

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

    #[ORM\JoinColumn(name: 'category_id', referencedColumnName: 'iid', onDelete: 'SET NULL')]

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

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

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

    #[Groups(['link:read', 'link:write', 'link:browse'])]

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

    #[Groups(['link:read', 'link:write', 'link:browse'])]

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

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

    #[ORM\Column(name: 'target', type: 'string', length: 10, 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

    #[ORM\Column(name: 'url', type: 'text', nullable: false)]

Missing function doc comment
Open

    public function setUrl(string $url): self

Missing function doc comment
Open

    public function getResourceName(): string

Missing function doc comment
Open

    public function getCategory(): ?CLinkCategory

Missing function doc comment
Open

    public function __toString(): string

Missing function doc comment
Open

    public function getDescription(): ?string

Missing function doc comment
Open

    public function setResourceName(string $name): self

Missing function doc comment
Open

    public function setTitle(string $title): self

Missing function doc comment
Open

    public function getResourceIdentifier(): int

Missing function doc comment
Open

    public function setDescription(string $description): self

Missing function doc comment
Open

    public function setTarget(string $target): self

Missing function doc comment
Open

    public function getIid(): int

Missing function doc comment
Open

    public function toggleVisibility(): void

Missing function doc comment
Open

    public function getUrl(): string

Missing function doc comment
Open

    public function setCategory(?CLinkCategory $category): self

Missing function doc comment
Open

    public function getLinkVisible(): bool

Missing function doc comment
Open

    public function getTitle(): string

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

)]

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

        $this->description = '';

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?int $iid = null;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected string $url;

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

{

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?string $target = null;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?CLinkCategory $category = null;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function __toString(): string

Line indented incorrectly; expected 4 spaces, found 0
Open

class CLink extends AbstractResource implements ResourceInterface, ResourceShowCourseResourcesInSessionInterface, Stringable

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?string $description;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected string $title;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected bool $linkVisible = true;

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

    public function setUrl(string $url): self

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

        return $this->url;

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

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getTarget()

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

        return $this->target;

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

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getResourceIdentifier(): int

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

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function toggleVisibility(): void

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

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setDescription(string $description): self

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

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

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

        $this->description = $description;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getCategory(): ?CLinkCategory

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

        $this->url = $url;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setTarget(string $target): self

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getIid(): int

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

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getLinkVisible(): bool

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

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

        return $this->setTitle($name);

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

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

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

        $this->category = $category;

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

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

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

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

        return $this->description;

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

        return $this->linkVisible;

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

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

        return $this->title;

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

    {

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

        $this->target = $target;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

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

        return $this->category;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setResourceName(string $name): self

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

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setCategory(?CLinkCategory $category): self

There are no issues that match your filters.

Category
Status