Skip to content

Commit a61c521

Browse files
committed
Fixed BIGINT property types
1 parent 169e13c commit a61c521

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Entity/DateDimension.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ class DateDimension implements EntityInterface
188188
'DateDimension',
189189
'DateDimension.unixTime',
190190
])]
191-
private int $unixTime;
191+
private string $unixTime;
192192

193193
public function __construct(
194194
#[ORM\Column(
@@ -199,7 +199,7 @@ public function __construct(
199199
'DateDimension',
200200
'DateDimension.date',
201201
])]
202-
private DateTimeImmutable $date
202+
private readonly DateTimeImmutable $date
203203
) {
204204
$this->id = $this->createUuid();
205205

@@ -212,7 +212,7 @@ public function __construct(
212212
$this->dayNumberOfYear = (int)$date->format('z');
213213
$this->leapYear = (bool)$date->format('L');
214214
$this->weekNumberingYear = (int)$date->format('o');
215-
$this->unixTime = (int)$date->format('U');
215+
$this->unixTime = $date->format('U');
216216
}
217217

218218
public function getId(): string
@@ -270,7 +270,7 @@ public function getWeekNumberingYear(): int
270270
return $this->weekNumberingYear;
271271
}
272272

273-
public function getUnixTime(): int
273+
public function getUnixTime(): string
274274
{
275275
return $this->unixTime;
276276
}
@@ -280,7 +280,7 @@ public function getUnixTime(): int
280280
*/
281281
public function getCreatedAt(): DateTimeImmutable
282282
{
283-
$output = DateTimeImmutable::createFromFormat('U', (string)$this->getUnixTime(), new DateTimeZone('UTC'));
283+
$output = DateTimeImmutable::createFromFormat('U', $this->getUnixTime(), new DateTimeZone('UTC'));
284284

285285
return $output === false ? new DateTimeImmutable(timezone: new DateTimeZone('UTC')) : $output;
286286
}

0 commit comments

Comments
 (0)