thomas-claireau/PHP-P6-Openclassrooms

View on GitHub
src/Controller/FigureController.php

Summary

Maintainability
A
2 hrs
Test Coverage

Method show has 39 lines of code (exceeds 25 allowed). Consider refactoring.
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);
Severity: Minor
Found in src/Controller/FigureController.php - About 1 hr to fix

    Method ajaxLoadItems has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function ajaxLoadItems(Request $request)
        {
            $params = $request->attributes->get('_route_params');
            $index = (int) $params['index'];
            $idFigure = $params['id'];
    Severity: Minor
    Found in src/Controller/FigureController.php - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status