Skip to content

Commit

Permalink
DateTime - Rename defaultFormat to defaultSerializationFormat
Browse files Browse the repository at this point in the history
  • Loading branch information
iksss-invia committed Oct 12, 2024
1 parent 1b5c27f commit 206d352
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Handler/DateHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class DateHandler implements SubscribingHandlerInterface
/**
* @var string
*/
private $defaultFormat;
private $defaultSerializationFormat;

/**
* @var array<string>
Expand Down Expand Up @@ -83,7 +83,7 @@ public function __construct(
bool $xmlCData = true,
array $defaultDeserializationFormats = []
) {
$this->defaultFormat = $defaultFormat;
$this->defaultSerializationFormat = $defaultFormat;
$this->defaultDeserializationFormats = [] === $defaultDeserializationFormats ? [$defaultFormat] : $defaultDeserializationFormats;
$this->defaultTimezone = new \DateTimeZone($defaultTimezone);
$this->xmlCData = $xmlCData;
Expand Down Expand Up @@ -307,7 +307,7 @@ private function getDeserializationFormats(array $type): array

private function getSerializationFormat(array $type): string
{
return $type['params'][0] ?? $this->defaultFormat;
return $type['params'][0] ?? $this->defaultSerializationFormat;
}

public function format(\DateInterval $dateInterval): string
Expand Down

0 comments on commit 206d352

Please sign in to comment.