mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 11:33:49 +00:00
DX: apply rector rulesset up to PHP72
This commit is contained in:
@@ -32,7 +32,7 @@ class ActivityReasonCategoryType extends AbstractType
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => 'Chill\ActivityBundle\Entity\ActivityReasonCategory',
|
||||
'data_class' => \Chill\ActivityBundle\Entity\ActivityReasonCategory::class,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@@ -400,9 +400,7 @@ class ActivityType extends AbstractType
|
||||
// the datetimetransformer will then handle timezone as GMT
|
||||
$timezoneUTC = new DateTimeZone('GMT');
|
||||
/** @var DateTime $data */
|
||||
$data = $formEvent->getData() === null ?
|
||||
DateTime::createFromFormat('U', '300') :
|
||||
$formEvent->getData();
|
||||
$data = $formEvent->getData() ?? DateTime::createFromFormat('U', '300');
|
||||
$seconds = $data->getTimezone()->getOffset($data);
|
||||
$data->setTimeZone($timezoneUTC);
|
||||
$data->add(new DateInterval('PT' . $seconds . 'S'));
|
||||
|
Reference in New Issue
Block a user