chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

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

    #[Groups(['resource_file:read', 'resource_node:read', 'document:read', 'media_object_read', 'message:read'])]

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

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

Multi-line function call not indented correctly; expected 16 spaces but found 20
Open

                    && $session === $element->getSession()

Missing function doc comment
Open

    public function setParentResourceNode(?int $resourceNode): self

Missing function doc comment
Open

    public function getUploadFile(): ?UploadedFile

CASE statements must be defined using a colon
Open

                case 'GROUP':

Scope keyword "static" must be followed by a single space
Open

    public function addLink(ResourceLink $link): static

Missing function doc comment
Open

    public function addResourceToUserList(

Scope keyword "static" must be followed by a single space
Open

    public function setResourceLinkArray(array $links): static

Missing function doc comment
Open

    public function getFirstResourceLink(): ?ResourceLink

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

    #[ApiProperty(types: ['https://schema.org/contentUrl'])]

Missing function doc comment
Open

    public function getResourceLinkEntityList(): array

Missing function doc comment
Open

    public function getResourceNode(): ?ResourceNode

Missing function doc comment
Open

    public function addResourceToGroupList(

Missing function doc comment
Open

    public function hasUploadFile(): bool

Add a single space around assignment operators
Open

declare(strict_types=1);

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

    #[ApiProperty(types: ['https://schema.org/contentUrl'])]

Missing function doc comment
Open

    abstract public function setResourceName(string $name);

Missing function doc comment
Open

    public function getParent()

Missing function doc comment
Open

    public function getParentResourceNode(): ?int

Missing function doc comment
Open

    public function getUsersAndGroupSubscribedToResource(): array

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

    #[ApiProperty(types: ['https://schema.org/contentUrl'])]

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

    #[ORM\OneToOne(targetEntity: ResourceNode::class, cascade: ['persist'])]

Missing function doc comment
Open

    public function setResourceNode(?ResourceNode $resourceNode): self

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

    #[Groups(['c_tool_intro:write', 'resource_node:write', 'c_student_publication:write', 'calendar_event:write'])]

CASE statements must be defined using a colon
Open

                case 'USER':

Missing function doc comment
Open

    abstract public function getResourceName(): string;

CASE statements must be defined using a colon
Open

            case ResourceLink::VISIBILITY_DRAFT:

Missing function doc comment
Open

    public function hasParentResourceNode(): bool

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

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

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

    #[Groups(['resource_file:read', 'resource_node:read', 'document:read', 'document:write', 'media_object_read'])]

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

    #[Groups([

Missing function doc comment
Open

    public function getFirstResourceLinkFromCourseSession(Course $course, ?Session $session = null): ?ResourceLink

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

    #[Groups([

CASE statements must be defined using a colon
Open

            case ResourceLink::VISIBILITY_PENDING:

Missing function doc comment
Open

    public function isUserSubscribedToResource(User $user): bool

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

abstract class AbstractResource

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

    #[Groups([

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

    #[Groups([

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

    #[Assert\Valid]

Missing function doc comment
Open

    public function hasResourceNode(): bool

Scope keyword "static" must be followed by a single space
Open

    public function setParent(ResourceInterface $parent): static

Missing function doc comment
Open

    public function setUploadFile(?UploadedFile $file): self

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

    #[Groups(['resource_file:read', 'resource_node:read', 'document:read', 'media_object_read', 'message:read'])]

Missing function doc comment
Open

    public function addGroupLink(Course $course, CGroup $group, ?Session $session = null): static

Missing function doc comment
Open

    public function getResourceLinkListFromEntity(): ?array

Missing function doc comment
Open

    public function isVisible(Course $course, ?Session $session = null): bool

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

    #[ApiProperty(types: ['https://schema.org/image'])]

Scope keyword "static" must be followed by a single space
Open

    public function addGroupLink(Course $course, CGroup $group, ?Session $session = null): static

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

    #[Groups(['resource_node:read', 'document:read'])]

Missing function doc comment
Open

    public function setResourceLinkArray(array $links): static

Missing function doc comment
Open

    public function setResourceLinkListFromEntity(): void

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

#[ORM\MappedSuperclass]

Space before opening parenthesis of function call prohibited
Open

                fn ($key, $element) => $course === $element->getCourse()

Missing function doc comment
Open

    public function setParent(ResourceInterface $parent): static

Missing function doc comment
Open

    public function addUserLink(

Missing function doc comment
Open

    public function getResourceLinkArray(): array

Multi-line function call not indented correctly; expected 16 spaces but found 20
Open

                    && $session === $element->getSession()

Space before opening parenthesis of function call prohibited
Open

                fn ($key, $element) => $course === $element->getCourse()

There are no issues that match your filters.

Category
Status