mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 13:03:50 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -16,7 +16,6 @@ use Chill\PersonBundle\Form\AccompanyingCourseCommentType;
|
||||
use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodCommentVoter;
|
||||
use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use LogicException;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\Form\Extension\Core\Type\FormType;
|
||||
@@ -26,7 +25,6 @@ use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
@@ -38,6 +36,7 @@ class AccompanyingCourseCommentController extends AbstractController
|
||||
* Page of comments in Accompanying Course section.
|
||||
*
|
||||
* @Route("/{_locale}/parcours/{accompanying_period_id}/comments", name="chill_person_accompanying_period_comment_list")
|
||||
*
|
||||
* @ParamConverter("accompanyingCourse", options={"id": "accompanying_period_id"})
|
||||
*/
|
||||
public function commentAction(AccompanyingPeriod $accompanyingCourse, Request $request): Response
|
||||
@@ -66,13 +65,13 @@ class AccompanyingCourseCommentController extends AbstractController
|
||||
}
|
||||
|
||||
if (!isset($editForm)) {
|
||||
throw new NotFoundHttpException('comment with id ' . $request->query->getInt('edit') . ' is not found');
|
||||
throw new NotFoundHttpException('comment with id '.$request->query->getInt('edit').' is not found');
|
||||
}
|
||||
|
||||
if (isset($commentEdited)) {
|
||||
$this->denyAccessUnlessGranted(AccompanyingPeriodCommentVoter::EDIT, $commentEdited);
|
||||
} else {
|
||||
throw new LogicException('at this step, commentEdited should be set');
|
||||
throw new \LogicException('at this step, commentEdited should be set');
|
||||
}
|
||||
|
||||
$editForm->handleRequest($request);
|
||||
|
Reference in New Issue
Block a user