Showing 8 of 11 total issues
Method show
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function show(Figures $figure, string $slug, Request $request): Response
{
$user = $this->getUser();
$comments = $this->commentRepository->findItems(1, $figure->getId());
$nbGroups = round($this->commentRepository->countAll($figure->getId()) / 10);
Method forgotPassword
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function forgotPassword(Request $request)
{
$user = new User();
$form = $this->createForm(ForgotPasswordUserType::class, $user);
$form->handleRequest($request);
Method ajaxLoadItems
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function ajaxLoadItems(Request $request)
{
$params = $request->attributes->get('_route_params');
$index = (int) $params['index'];
$nbGroups = round($this->figuresRepository->countAll() / 15);
Method ajaxLoadItems
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function ajaxLoadItems(Request $request)
{
$params = $request->attributes->get('_route_params');
$index = (int) $params['index'];
$idFigure = $params['id'];
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct(CategoryRepository $categoryRepository, PictureRepository $pictureRepository, VideoRepository $videoRepository, CommentRepository $commentRepository, FiguresRepository $figuresRepository, UserRepository $userRepository, UserPasswordEncoderInterface $encoder)
Avoid deeply nested control flow statements. Open
Open
if (allVideos && allVideos.length == 0) {
containerVideos.remove();
}
Avoid deeply nested control flow statements. Open
Open
if (allPictures && allPictures.length == 0) {
containerPictures.remove();
}
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct(UserRepository $repository, ObjectManager $em, UserPasswordEncoderInterface $encoder, \Swift_Mailer $mailer, Environment $renderer)