phpstan boolean corrections

This commit is contained in:
2025-10-09 13:57:30 +02:00
parent 03fa79c93b
commit b132956ddc
37 changed files with 149 additions and 623 deletions

View File

@@ -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()]),