src/CoreBundle/Entity/ExtraField.php
Avoid unused parameters such as '$key'. Open
Open
return $this->tags->exists(fn ($key, Tag $tag) => $tagName === $tag->getTag());
- 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(['extra_field:read', 'extra_field:write'])]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\OneToMany(targetEntity: ExtraFieldOptions::class, mappedBy: 'field')]
- Exclude checks
Missing function doc comment Open
Open
public function getAutoRemove(): bool
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Entity]
- Exclude checks
Missing function doc comment Open
Open
public function __construct()
- Exclude checks
Missing function doc comment Open
Open
public function isVisibleToSelf(): bool
- Exclude checks
Missing function doc comment Open
Open
public function getDescription(): ?string
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'id', type: 'integer')]
- Exclude checks
Missing function doc comment Open
Open
public function isChangeable(): ?bool
- Exclude checks
Missing function doc comment Open
Open
public function hasTag(string $tagName): bool
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Groups(['extra_field:read', 'extra_field:write'])]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'description', type: 'text', nullable: true)]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'display_text', type: 'string', length: 255, nullable: true, unique: false)]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Groups(['extra_field:read'])]
- Exclude checks
Missing function doc comment Open
Open
public function getVariable(): string
- Exclude checks
Missing function doc comment Open
Open
public function getDisplayText(): ?string
- Exclude checks
Space before opening parenthesis of function call prohibited Open
Open
return $this->tags->exists(fn ($key, Tag $tag) => $tagName === $tag->getTag());
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ApiFilter(filterClass: SearchFilter::class, properties: ['variable'])]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'item_type', 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
#[ORM\Column(name: 'visible_to_self', type: 'boolean', nullable: true, unique: false)]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Gedmo\Timestampable(on: 'create')]
- Exclude checks
Missing function doc comment Open
Open
public function setTags(Collection $tags): self
- Exclude checks
Missing function doc comment Open
Open
public function getLocale(): string
- Exclude checks
Missing function doc comment Open
Open
public function setLocale(string $locale): self
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ApiResource(operations: [new Get(security: 'is_granted(\'ROLE_ADMIN\')'), new Put(security: 'is_granted(\'ROLE_ADMIN\')'), new GetCollection(security: 'is_granted(\'ROLE_ADMIN\')'), new Post(security: 'is_granted(\'ROLE_ADMIN\')')], security: 'is_granted(\'ROLE_ADMIN\')', denormalizationContext: ['groups' => ['extra_field:write']], normalizationContext: ['groups' => ['extra_field:read']])]
- 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
#[ORM\Column(name: 'helper_text', type: 'text', nullable: true, unique: false)]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'field_order', type: 'integer', nullable: true, unique: false)]
- Exclude checks
Missing function doc comment Open
Open
public function setItemType(int $itemType): self
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Groups(['extra_field:read', 'extra_field:write'])]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'filter', type: 'boolean', nullable: true, unique: false)]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\OneToMany(targetEntity: Tag::class, mappedBy: 'field')]
- Exclude checks
Missing function doc comment Open
Open
public function setValueType(int $valueType): self
- Exclude checks
Missing function doc comment Open
Open
public function isVisibleToOthers(): bool
- Exclude checks
Space before opening parenthesis of function call prohibited Open
Open
return match ($this->getItemType()) {
- Exclude checks
Missing function doc comment Open
Open
public function setHelperText(string $helperText): self
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Groups(['extra_field:read'])]
- 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
#[Groups(['extra_field:read', 'extra_field:write'])]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'auto_remove', type: 'boolean', options: ['default' => false])]
- Exclude checks
Missing function doc comment Open
Open
public function setDefaultValue(string $defaultValue): self
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\MappedSuperclass]
- 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: 'variable', type: 'string', length: 255)]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Table(name: 'extra_field')]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'value_type', type: 'integer')]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'created_at', type: 'datetime')]
- Exclude checks
Missing function doc comment Open
Open
public function setFieldOrder(int $fieldOrder): self
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'visible_to_others', type: 'boolean', nullable: true, unique: false)]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'changeable', type: 'boolean', nullable: true, unique: false)]
- Exclude checks
Missing function doc comment Open
Open
public function getId(): ?int
- Exclude checks
Missing function doc comment Open
Open
public function setVisibleToOthers(bool $visibleToOthers): self
- Exclude checks
Missing function doc comment Open
Open
public function setDescription(string $description): self
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Gedmo\Translatable]
- Exclude checks
Missing function doc comment Open
Open
public function setVariable(string $variable): self
- Exclude checks
Missing function doc comment Open
Open
public function setChangeable(bool $changeable): self
- Exclude checks
Missing function doc comment Open
Open
public function setFilter(bool $filter): self
- Exclude checks
Missing function doc comment Open
Open
public function setVisibleToSelf(bool $visibleToSelf): self
- Exclude checks
Missing function doc comment Open
Open
public function getTypeToString(): string
- Exclude checks
Missing function doc comment Open
Open
public function getItemType(): int
- Exclude checks
Missing function doc comment Open
Open
public function setDisplayText(string $displayText): self
- Exclude checks
Missing function doc comment Open
Open
public function getDefaultValue(): ?string
- Exclude checks
Missing function doc comment Open
Open
public function getHelperText(): string
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Groups(['extra_field:read', 'extra_field:write'])]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Groups(['extra_field:read'])]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[Gedmo\Locale]
- Exclude checks
Missing function doc comment Open
Open
public function setOptions(Collection $options): self
- 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 ExtraField
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'default_value', type: 'text', nullable: true, unique: false)]
- Exclude checks
Missing function doc comment Open
Open
public function getValueType(): int
- Exclude checks
Missing function doc comment Open
Open
public function getFieldOrder(): ?int
- Exclude checks
Missing function doc comment Open
Open
public function isFilter(): bool
- Exclude checks
Missing function doc comment Open
Open
public function setAutoRemove(bool $autoRemove): self
- Exclude checks
Space before opening parenthesis of function call prohibited Open
Open
return $this->tags->exists(fn ($key, Tag $tag) => $tagName === $tag->getTag());
- Exclude checks
Space before opening parenthesis of function call prohibited Open
Open
return match ($this->getItemType()) {
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 12 Open
Open
default => 'text',
- Exclude checks