src/CourseBundle/Entity/CToolIntro.php
Avoid unused parameters such as '$name'. Open
Open
public function setResourceName(string $name): self
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Groups(['c_tool_intro:read', 'c_tool_intro:write'])]
- Exclude checks
Missing function doc comment Open
Open
public function getIid(): ?int
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ApiFilter(filterClass: SearchFilter::class, properties: ['courseTool' => 'exact'])]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Table(name: 'c_tool_intro')]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\ManyToOne(targetEntity: CTool::class)]
- Exclude checks
Missing function doc comment Open
Open
public function getResourceIdentifier(): int|Uuid
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Groups(['c_tool_intro:read'])]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Assert\NotNull]
- Exclude checks
Missing function doc comment Open
Open
public function __toString(): string
- Exclude checks
Missing function doc comment Open
Open
public function getCourseTool(): CTool
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Groups(['c_tool_intro:read', 'c_tool_intro:write'])]
- Exclude checks
Missing function doc comment Open
Open
public function getIntroText(): string
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Assert\NotNull]
- Exclude checks
Missing function doc comment Open
Open
public function setIntroText(string $introText): self
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'iid', type: 'integer')]
- Exclude checks
Add a single space around assignment operators Open
Open
declare(strict_types=1);
- Exclude checks
You must use "/**" style comments for a class comment Open
Open
class CToolIntro extends AbstractResource implements ResourceInterface, ResourceShowCourseResourcesInSessionInterface, Stringable
- 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: 'intro_text', type: 'text', nullable: false)]
- Exclude checks
Missing function doc comment Open
Open
public function getResourceName(): string
- Exclude checks
Missing function doc comment Open
Open
public function setResourceName(string $name): self
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ApiFilter(filterClass: CidFilter::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\Id]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\JoinColumn(name: 'c_tool_id', referencedColumnName: 'iid', nullable: false, onDelete: 'CASCADE')]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ApiResource(operations: [new Get(security: 'is_granted(\'VIEW\', object)'), new Put(security: 'is_granted(\'EDIT\', object)'), new Delete(security: 'is_granted(\'DELETE\', object)'), new GetCollection(security: 'is_granted(\'ROLE_USER\')'), new Post(securityPostDenormalize: 'is_granted(\'CREATE\', object)')], security: 'is_granted(\'ROLE_ADMIN\') or is_granted(\'ROLE_CURRENT_COURSE_TEACHER\')', denormalizationContext: ['groups' => ['c_tool_intro:write']], normalizationContext: ['groups' => ['c_tool_intro:read']])]
- Exclude checks
Missing function doc comment Open
Open
public function setCourseTool(CTool $courseTool): self
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Entity(repositoryClass: CToolIntroRepository::class)]
- Exclude checks