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

@@ -86,7 +86,7 @@ class CreateFieldsOnGroupCommand extends Command
$em = $this->entityManager;
$customFieldsGroups = $em
->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)
->getRepository(CustomFieldsGroup::class)
->findAll();
if (0 === \count($customFieldsGroups)) {

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.');

View File

@@ -29,7 +29,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
final class CustomFieldsChoiceTest extends KernelTestCase
{
/**
* @var \Chill\CustomFieldsBundle\CustomFields\CustomFieldChoice
* @var CustomFieldChoice
*/
private $cfChoice;

View File

@@ -43,7 +43,7 @@ final class CustomFieldsTextTest extends WebTestCase
$customField
);
$this->assertInstanceOf(
\Chill\CustomFieldsBundle\CustomFields\CustomFieldText::class,
CustomFieldText::class,
$customField
);
}