src/CourseBundle/Entity/CDocument.php
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Entity(repositoryClass: CDocumentRepository::class)]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\EntityListeners([ResourceListener::class])]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Table(name: 'c_document')]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Groups(['document:read'])]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Index(columns: ['filetype'], name: 'idx_cdoc_type')]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ApiFilter(
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Id]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'title', type: 'string', length: 255, nullable: false)]
- Exclude checks
Add a single space around assignment operators Open
Open
declare(strict_types=1);
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ApiProperty(identifier: true)]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ApiFilter(filterClass: SearchFilter::class, properties: ['title' => 'partial', 'resourceNode.parent' => 'exact', 'filetype' => 'exact'])]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\GeneratedValue]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'comment', type: 'text', nullable: true)]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Groups(['document:read', 'document:write', 'document:browse'])]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ApiFilter(filterClass: PropertyFilter::class)]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ApiFilter(filterClass: SidFilter::class)]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'iid', type: 'integer')]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Assert\NotBlank]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Groups(['document:read', 'document:write'])]
- Exclude checks
Missing function doc comment Open
Open
public function setTemplate(bool $template): self
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ApiResource(
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'filetype', type: 'string', length: 15, nullable: false)]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Groups(['document:read', 'document:write'])]
- Exclude checks
Missing function doc comment Open
Open
public function getReadonly(): bool
- Exclude checks
Missing function doc comment Open
Open
public function getIid(): ?int
- Exclude checks
Missing function doc comment Open
Open
public function getResourceName(): string
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ApiFilter(filterClass: CidFilter::class)]
- Exclude checks
You must use "/**" style comments for a class comment Open
Open
class CDocument extends AbstractResource implements ResourceInterface, ResourceShowCourseResourcesInSessionInterface, Stringable
- Exclude checks
Missing function doc comment Open
Open
public function __construct()
- Exclude checks
Scope keyword "static" must be followed by a single space Open
Open
public function addGradebookCategory(GradebookCategory $gradebookCategory): static
- Exclude checks
Missing function doc comment Open
Open
public function getComment(): ?string
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Assert\Choice(['folder', 'file', 'certificate'], message: 'Choose a valid filetype.')]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'template', type: 'boolean', nullable: false)]
- Exclude checks
Missing function doc comment Open
Open
public function addGradebookCategory(GradebookCategory $gradebookCategory): static
- Exclude checks
Missing function doc comment Open
Open
public function getTitle(): string
- Exclude checks
Missing function doc comment Open
Open
public function setReadonly(bool $readonly): self
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\OneToMany(mappedBy: 'document', targetEntity: GradebookCategory::class)]
- Exclude checks
Missing function doc comment Open
Open
public function isTemplate(): bool
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Groups(['document:read', 'document:fullPath'])]
- Exclude checks
Missing function doc comment Open
Open
public function setFiletype(string $filetype): self
- Exclude checks
Missing function doc comment Open
Open
public function getResourceIdentifier(): int|Uuid
- Exclude checks
Missing function doc comment Open
Open
public function removeGradebookCategory(GradebookCategory $gradebookCategory): static
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Groups(['document:read'])]
- Exclude checks
Missing function doc comment Open
Open
public function setTitle(string $title): self
- Exclude checks
Scope keyword "static" must be followed by a single space Open
Open
public function removeGradebookCategory(GradebookCategory $gradebookCategory): static
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'readonly', type: 'boolean', nullable: false)]
- Exclude checks
Missing function doc comment Open
Open
public function setComment(?string $comment): self
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Groups(['document:read', 'document:write'])]
- Exclude checks
Missing function doc comment Open
Open
public function getFiletype(): string
- Exclude checks
Missing function doc comment Open
Open
public function __toString(): string
- Exclude checks
Missing function doc comment Open
Open
public function setResourceName(string $name): self
- Exclude checks
You must use "/**" style comments for a function comment Open
Open
public function getFullPath(): string
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
Open
{
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
Open
)]
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
Open
class CDocument extends AbstractResource implements ResourceInterface, ResourceShowCourseResourcesInSessionInterface, Stringable
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
protected string $title;
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
protected ?int $iid = null;
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
return $this->getTitle();
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
{
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
return $this->gradebookCategories;
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 16 Open
Open
$gradebookCategory->setDocument(null);
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
Open
)]
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
public function __construct()
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
$this->filetype = 'folder';
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
{
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
return $this;
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 12 Open
Open
$parent = $parent->getParent();
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 12 Open
Open
if ($gradebookCategory->getDocument() === $this) {
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
return $this;
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
public function setTemplate(bool $template): self
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
public function getReadonly(): bool
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
return $this->readonly;
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
return $this;
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
{
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 8 Open
Open
if ($this->gradebookCategories->removeElement($gradebookCategory)) {
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
$this->template = false;
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
public function getComment(): ?string
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
public function getResourceName(): string
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
public function addGradebookCategory(GradebookCategory $gradebookCategory): static
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
$parent = $this->getParent();
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
protected ?string $comment;
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
$this->comment = '';
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
$this->comment = $comment;
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
$this->readonly = $readonly;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
{
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 8 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
protected bool $template;
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
$this->readonly = false;
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
$this->title = $title;
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
return $this->template;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
{
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
return $this->comment;
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
return $this->filetype;
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
return $this->iid;
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
public function getGradebookCategories(): Collection
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 12 Open
Open
$gradebookCategory->setDocument($this);
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 8 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
public function removeGradebookCategory(GradebookCategory $gradebookCategory): static
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
public function __toString(): string
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
{
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
{
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
public function setResourceName(string $name): self
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
protected string $filetype;
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
return $this;
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
public function getFiletype(): string
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
$this->filetype = $filetype;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
{
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 12 Open
Open
}
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
$pathParts = [$this->getTitle()];
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 8 Open
Open
while ($parent instanceof ResourceNode) {
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 12 Open
Open
array_unshift($pathParts, $parent->getTitle());
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
{
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
public function getResourceIdentifier(): int|Uuid
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
protected bool $readonly;
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
private Collection $gradebookCategories;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
{
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
return $this;
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
public function setReadonly(bool $readonly): self
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
{
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
{
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 8 Open
Open
if (!$this->gradebookCategories->contains($gradebookCategory)) {
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 12 Open
Open
$this->gradebookCategories->add($gradebookCategory);
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
{
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
return $this->title;
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
public function setTitle(string $title): self
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
public function isTemplate(): bool
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
public function setFiletype(string $filetype): self
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
public function getIid(): ?int
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
{
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
{
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
return implode('/', $pathParts);
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
public function getTitle(): string
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
{
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
$this->template = $template;
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
{
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
{
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
return $this->setTitle($name);
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
$this->gradebookCategories = new ArrayCollection();
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
return $this->getTitle();
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
public function setComment(?string $comment): self
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
{
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
{
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
return $this;
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
return $this->getIid();
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
Open
return $this;
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 8 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
public function getFullPath(): string
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
Open
}
- Exclude checks