mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-01-01 23:11:24 +00:00
phpstan boolean corrections
This commit is contained in:
@@ -16,6 +16,8 @@ use Chill\ActivityBundle\Form\ActivityReasonType;
|
||||
use Chill\ActivityBundle\Repository\ActivityReasonRepository;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\Form\Form;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
@@ -89,7 +91,7 @@ class ActivityReasonController extends AbstractController
|
||||
|
||||
$entity = $em->getRepository(ActivityReason::class)->find($id);
|
||||
|
||||
if (!$entity) {
|
||||
if (null === $entity) {
|
||||
throw $this->createNotFoundException('Unable to find ActivityReason entity.');
|
||||
}
|
||||
|
||||
@@ -112,10 +114,8 @@ class ActivityReasonController extends AbstractController
|
||||
* Creates a form to create a ActivityReason entity.
|
||||
*
|
||||
* @param ActivityReason $entity The entity
|
||||
*
|
||||
* @return \Symfony\Component\Form\Form The form
|
||||
*/
|
||||
private function createCreateForm(ActivityReason $entity)
|
||||
private function createCreateForm(ActivityReason $entity): FormInterface
|
||||
{
|
||||
$form = $this->createForm(ActivityReasonType::class, $entity, [
|
||||
'action' => $this->generateUrl('chill_activity_activityreason_create'),
|
||||
@@ -131,10 +131,8 @@ class ActivityReasonController extends AbstractController
|
||||
* Creates a form to edit a ActivityReason entity.
|
||||
*
|
||||
* @param ActivityReason $entity The entity
|
||||
*
|
||||
* @return \Symfony\Component\Form\Form The form
|
||||
*/
|
||||
private function createEditForm(ActivityReason $entity)
|
||||
private function createEditForm(ActivityReason $entity): FormInterface
|
||||
{
|
||||
$form = $this->createForm(ActivityReasonType::class, $entity, [
|
||||
'action' => $this->generateUrl('chill_activity_activityreason_update', ['id' => $entity->getId()]),
|
||||
|
||||
Reference in New Issue
Block a user