Missing function doc comment
public function __invoke(CLink $link, CShortcutRepository $shortcutRepository, AssetRepository $assetRepository): Response
Add a single space around assignment operators
declare(strict_types=1);
Missing class doc comment
class CLinkImageController
Missing function doc comment
public function __construct(EntityManagerInterface $entityManager)
Missing function doc comment
public function __invoke(CLink $link, Request $request): Response
Missing blank line before return statement
return new Response('Error creating cropped image', Response::HTTP_INTERNAL_SERVER_ERROR);
Blank line found at end of control structure
Only one argument is allowed per line in a multi-line function call
0, 0,
Only one argument is allowed per line in a multi-line function call
$srcX, $srcY,
Only one argument is allowed per line in a multi-line function call
$cropWidth, $cropHeight,
Only one argument is allowed per line in a multi-line function call
120, 120
Add a single space around assignment operators
declare(strict_types=1);
Missing class doc comment
final class Version20250118000100 extends AbstractMigrationChamilo
Missing function doc comment
public function getDescription(): string
Missing function doc comment
public function up(Schema $schema): void
Missing function doc comment
public function down(Schema $schema): void
Missing function doc comment
public function getCustomImageUrl(): ?string
Missing function doc comment
public function setCustomImageUrl(?string $customImageUrl): self
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
#[Groups(['cshortcut:read'])]
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
#[ORM\ManyToOne(targetEntity: Asset::class, cascade: ['remove'])]
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
#[ORM\JoinColumn(name: 'custom_image_id', referencedColumnName: 'id', onDelete: 'SET NULL')]
Line indented incorrectly; expected 8 spaces, found 4
private ?Asset $customImage = null;
Line indented incorrectly; expected 8 spaces, found 4
public function getCustomImage(): ?Asset
Missing function doc comment
public function getCustomImage(): ?Asset
Line indented incorrectly; expected at least 12 spaces, found 8
return $this->customImage;
Line indented incorrectly; expected 8 spaces, found 4
public function setCustomImage(?Asset $customImage): self
Missing function doc comment
public function setCustomImage(?Asset $customImage): self
Line indented incorrectly; expected at least 12 spaces, found 8
$this->customImage = $customImage;
Missing blank line before return statement
return $this;
The method __invoke uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
} else {
$details['customImageUrl'] = null;
}
Remove error control operator '@' on line 61.
public function __invoke(CLink $link, Request $request): Response
{
$removeImage = $request->request->getBoolean('removeImage', false);
$file = $request->files->get('customImage');
Missing class import via use statement (line '85', column '23').
throw new \RuntimeException('Invalid image file');
Missing class import via use statement (line '99', column '27').
throw new \RuntimeException('Unsupported image type');
The method indexJson uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
} else {
$shortcut->setCustomImageUrl(null);
}
Avoid unused parameters such as '$schema'.
public function up(Schema $schema): void
Avoid unused parameters such as '$schema'.
public function down(Schema $schema): void
Missing function doc comment
Fixed
There are no issues that match your filters.