apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -12,7 +12,6 @@ declare(strict_types=1);
namespace Chill\CalendarBundle\Form;
use Chill\CalendarBundle\Entity\CalendarDoc\CalendarDocEditDTO;
use Chill\DocStoreBundle\Form\StoredObjectType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;

View File

@@ -21,7 +21,6 @@ use Chill\MainBundle\Form\Type\CommentType;
use Chill\MainBundle\Form\Type\PrivateCommentType;
use Chill\PersonBundle\Form\DataTransformer\PersonsToIdDataTransformer;
use Chill\ThirdPartyBundle\Form\DataTransformer\ThirdPartiesToIdDataTransformer;
use DateTimeImmutable;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\CallbackTransformer;
@@ -72,42 +71,42 @@ class CalendarType extends AbstractType
$builder->add('startDate', HiddenType::class);
$builder->get('startDate')
->addModelTransformer(new CallbackTransformer(
static function (?DateTimeImmutable $dateTimeImmutable): string {
static function (?\DateTimeImmutable $dateTimeImmutable): string {
if (null !== $dateTimeImmutable) {
$res = date_format($dateTimeImmutable, DateTimeImmutable::ATOM);
$res = date_format($dateTimeImmutable, \DateTimeImmutable::ATOM);
} else {
$res = '';
}
return $res;
},
static function (?string $dateAsString): ?DateTimeImmutable {
static function (?string $dateAsString): ?\DateTimeImmutable {
if ('' === $dateAsString || null === $dateAsString) {
return null;
}
return DateTimeImmutable::createFromFormat(DateTimeImmutable::ATOM, $dateAsString);
return \DateTimeImmutable::createFromFormat(\DateTimeImmutable::ATOM, $dateAsString);
}
));
$builder->add('endDate', HiddenType::class);
$builder->get('endDate')
->addModelTransformer(new CallbackTransformer(
static function (?DateTimeImmutable $dateTimeImmutable): string {
static function (?\DateTimeImmutable $dateTimeImmutable): string {
if (null !== $dateTimeImmutable) {
$res = date_format($dateTimeImmutable, DateTimeImmutable::ATOM);
$res = date_format($dateTimeImmutable, \DateTimeImmutable::ATOM);
} else {
$res = '';
}
return $res;
},
static function (?string $dateAsString): ?DateTimeImmutable {
static function (?string $dateAsString): ?\DateTimeImmutable {
if ('' === $dateAsString || null === $dateAsString) {
return null;
}
return DateTimeImmutable::createFromFormat(DateTimeImmutable::ATOM, $dateAsString);
return \DateTimeImmutable::createFromFormat(\DateTimeImmutable::ATOM, $dateAsString);
}
));