chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

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

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

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

    #[ORM\OneToMany(mappedBy: 'group', targetEntity: CGroupRelUser::class)]

Missing function doc comment
Open

    public function getStatus(): bool

Missing function doc comment
Open

    public function setDocState(int $docState): self

Missing function doc comment
Open

    public function setWorkState(int $workState): self

Missing function doc comment
Open

    public function hasMembers(): bool

Missing function doc comment
Open

    public function hasMember(User $user): bool

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\Column(name: 'wiki_state', type: 'integer')]

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

    #[ORM\Column(name: 'self_registration_allowed', type: 'boolean')]

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

Missing function doc comment
Open

    public function setAnnouncementsState(int $announcementsState): self

Space before opening parenthesis of function call prohibited
Open

        $list = $this->members->filter(fn (CGroupRelUser $member) => $member->getUser()->getId() === $user->getId());

Missing function doc comment
Open

    public function setCategory(?CGroupCategory $category = null): self

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

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

Missing function doc comment
Open

    public function __construct()

Missing function doc comment
Open

    public function getAnnouncementsState(): int

Missing function doc comment
Open

    public function getIid(): ?int

Missing function doc comment
Open

    public function setTitle(string $title): self

Missing function doc comment
Open

    public function setChatState(int $chatState): self

Missing function doc comment
Open

    public function hasTutor(User $user): bool

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

    #[ORM\ManyToOne(targetEntity: CGroupCategory::class, cascade: ['persist'])]

Missing function doc comment
Open

    public function getChatState(): int

Missing function doc comment
Open

    public function setDocumentAccess(int $documentAccess): self

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

class CGroup extends AbstractResource implements ResourceInterface, Stringable

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

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

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

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

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

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

Missing function doc comment
Open

    public function getMaxStudent(): int

Missing function doc comment
Open

    public function getDocState(): int

Missing function doc comment
Open

    public function getWikiState(): int

Missing function doc comment
Open

    public function setTutors(Collection $tutors): self

Missing function doc comment
Open

    public function getCategory(): ?CGroupCategory

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

    #[Assert\NotNull]

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

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

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

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

Missing function doc comment
Open

    public function setMaxStudent(int $maxStudent): self

Missing function doc comment
Open

    public function getSelfUnregistrationAllowed(): bool

Missing function doc comment
Open

    public function hasTutors(): bool

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

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

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

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

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

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

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

    #[ORM\OneToMany(mappedBy: 'group', targetEntity: CGroupRelTutor::class)]

Missing function doc comment
Open

    public function getTitle(): string

Missing function doc comment
Open

    public function getWorkState(): int

Missing function doc comment
Open

    public function setForumState(int $forumState): self

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

    #[Assert\NotBlank]

Missing function doc comment
Open

    public function setWikiState(int $wikiState): self

Missing function doc comment
Open

    public function setSelfRegistrationAllowed(bool $selfRegistrationAllowed): self

Missing function doc comment
Open

    public function getSelfRegistrationAllowed(): bool

Missing function doc comment
Open

    public function setSelfUnregistrationAllowed(bool $selfUnregistrationAllowed): self

Missing function doc comment
Open

    public function getResourceName(): string

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\Column(name: 'self_unregistration_allowed', type: 'boolean')]

Missing function doc comment
Open

    public function setCalendarState(int $calendarState): self

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

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

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

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

Missing function doc comment
Open

    public function getForumState(): int

Missing function doc comment
Open

    public function getResourceIdentifier(): int|Uuid

Missing function doc comment
Open

    public function setResourceName(string $name): self

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

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

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

Missing function doc comment
Open

    public function getDocumentAccess(): int

Space before opening parenthesis of function call prohibited
Open

        $list = $this->tutors->filter(fn (CGroupRelTutor $tutor) => $tutor->getUser()->getId() === $user->getId());

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

    #[ORM\Column(name: 'document_access', type: 'integer', options: ['default' => 0])]

Missing function doc comment
Open

    public function setStatus(bool $status): self

Missing function doc comment
Open

    public function setMembers(Collection $members): self

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

#[ApiResource(normalizationContext: ['groups' => ['group:read']], security: "is_granted('ROLE_ADMIN')")]

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: 'max_student', type: 'integer')]

Missing function doc comment
Open

    public function setDescription(string $description): self

Space before opening parenthesis of function call prohibited
Open

        $list = $this->tutors->filter(fn (CGroupRelTutor $tutor) => $tutor->getUser()->getId() === $user->getId());

Space before opening parenthesis of function call prohibited
Open

        $list = $this->members->filter(fn (CGroupRelUser $member) => $member->getUser()->getId() === $user->getId());

There are no issues that match your filters.

Category
Status