cs: Fix code-style (using PHPCSFixer and PHPCS).

This commit is contained in:
Pol Dellaiera
2021-12-21 10:59:23 +01:00
parent b7360955f7
commit 8401ce2656
280 changed files with 742 additions and 319 deletions

View File

@@ -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;