mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
cs: Fix code-style (using PHPCSFixer and PHPCS).
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Controller;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
@@ -12,10 +21,10 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
use function array_key_exists;
|
||||
|
||||
class AccompanyingCourseCommentController extends Controller
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* Comments page of Accompanying Course section.
|
||||
*
|
||||
@@ -37,6 +46,7 @@ class AccompanyingCourseCommentController extends Controller
|
||||
}
|
||||
}
|
||||
$pinnedComment = $accompanyingCourse->getPinnedComment();
|
||||
|
||||
if ($pinnedComment->getId() === $request->query->getInt('edit')) {
|
||||
$editForm = $this->createCommentForm($pinnedComment, 'edit');
|
||||
$commentEditId = $pinnedComment->getId();
|
||||
@@ -54,6 +64,7 @@ class AccompanyingCourseCommentController extends Controller
|
||||
|
||||
if ($currentForm->isSubmitted() && $currentForm->isValid()) {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
if ($isEditingNew) {
|
||||
$em->persist($newComment);
|
||||
}
|
||||
@@ -61,7 +72,7 @@ class AccompanyingCourseCommentController extends Controller
|
||||
}
|
||||
|
||||
return $this->redirectToRoute('chill_person_accompanying_period_comment_list', [
|
||||
'accompanying_period_id' => $accompanyingCourse->getId()
|
||||
'accompanying_period_id' => $accompanyingCourse->getId(),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -78,7 +89,7 @@ class AccompanyingCourseCommentController extends Controller
|
||||
$form = $this->createForm(AccompanyingCourseCommentType::class, $comment);
|
||||
|
||||
if ('edit' === $step) {
|
||||
$form->add('edit', HiddenType::class, ['mapped' => false ]);
|
||||
$form->add('edit', HiddenType::class, ['mapped' => false]);
|
||||
}
|
||||
|
||||
return $form;
|
||||
|
Reference in New Issue
Block a user