chamilo/chamilo-lms

View on GitHub
src/CoreBundle/Controller/Api/CLinkImageController.php

Summary

Maintainability
A
0 mins
Test Coverage

Showing 13 of 13 total issues

Missing class import via use statement (line '85', column '23').
Open

throw new \RuntimeException('Invalid image file');

Remove error control operator '@' on line 61.
Open

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 '99', column '27').
Open

throw new \RuntimeException('Unsupported image type');

Missing blank line before return statement
Open

return new Response('Error creating cropped image', Response::HTTP_INTERNAL_SERVER_ERROR);

Blank line found at end of control structure
Open

 
 

Missing class doc comment
Open

class CLinkImageController

Missing function doc comment
Open

public function __construct(EntityManagerInterface $entityManager)

Add a single space around assignment operators
Open

declare(strict_types=1);

Missing function doc comment
Open

public function __invoke(CLink $link, Request $request): Response

Only one argument is allowed per line in a multi-line function call
Open

120, 120

Only one argument is allowed per line in a multi-line function call
Open

$cropWidth, $cropHeight,

Only one argument is allowed per line in a multi-line function call
Open

$srcX, $srcY,

Only one argument is allowed per line in a multi-line function call
Open

0, 0,
Category
Status