update php-cs-fixer and rector + fix rules

This commit is contained in:
2024-01-09 13:50:45 +01:00
parent a63b40fb6c
commit 825cd127d1
79 changed files with 220 additions and 229 deletions

View File

@@ -121,7 +121,7 @@ class CustomFieldController extends AbstractController
{
$em = $this->managerRegistry->getManager();
$entity = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomField::class)->find($id);
$entity = $em->getRepository(CustomField::class)->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find CustomField entity.');

View File

@@ -37,7 +37,10 @@ class CustomFieldsGroupController extends AbstractController
* CustomFieldsGroupController constructor.
*/
public function __construct(
private readonly CustomFieldProvider $customFieldProvider, private readonly TranslatorInterface $translator, private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
private readonly CustomFieldProvider $customFieldProvider,
private readonly TranslatorInterface $translator,
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry
) {}
/**
* Creates a new CustomFieldsGroup entity.
@@ -79,7 +82,7 @@ class CustomFieldsGroupController extends AbstractController
{
$em = $this->managerRegistry->getManager();
$entity = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->find($id);
$entity = $em->getRepository(CustomFieldsGroup::class)->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find CustomFieldsGroup entity.');
@@ -102,7 +105,7 @@ class CustomFieldsGroupController extends AbstractController
{
$em = $this->managerRegistry->getManager();
$cfGroups = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->findAll();
$cfGroups = $em->getRepository(CustomFieldsGroup::class)->findAll();
$defaultGroups = $this->getDefaultGroupsId();
$makeDefaultFormViews = [];
@@ -134,13 +137,13 @@ class CustomFieldsGroupController extends AbstractController
$em = $this->managerRegistry->getManager();
$cFGroup = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->findOneById($cFGroupId);
$cFGroup = $em->getRepository(CustomFieldsGroup::class)->findOneById($cFGroupId);
if (!$cFGroup) {
throw $this->createNotFoundException('customFieldsGroup not found with '."id {$cFGroupId}");
}
$cFDefaultGroup = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsDefaultGroup::class)
$cFDefaultGroup = $em->getRepository(CustomFieldsDefaultGroup::class)
->findOneByEntity($cFGroup->getEntity());
if ($cFDefaultGroup) {
@@ -195,7 +198,7 @@ class CustomFieldsGroupController extends AbstractController
{
$em = $this->managerRegistry->getManager();
$entity = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->find($id);
$entity = $em->getRepository(CustomFieldsGroup::class)->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find CustomFieldsGroups entity.');
@@ -239,7 +242,7 @@ class CustomFieldsGroupController extends AbstractController
{
$em = $this->managerRegistry->getManager();
$entity = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->find($id);
$entity = $em->getRepository(CustomFieldsGroup::class)->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find CustomFieldsGroup entity.');
@@ -263,7 +266,7 @@ class CustomFieldsGroupController extends AbstractController
{
$em = $this->managerRegistry->getManager();
$entity = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->find($id);
$entity = $em->getRepository(CustomFieldsGroup::class)->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find CustomFieldsGroup entity.');