Skip to content

Commit 69435bc

Browse files
authored
Use DateTimeImmutable instead of DateTimeInterface (#365)
* Use DateTimeImmutable instead of DateTimeInterface * Short syntax
1 parent eb6ded6 commit 69435bc

6 files changed

+14
-14
lines changed

src/ValueObject/ArchivalSummary.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ArchivalSummary
2222

2323
/**
2424
* @param array{
25-
* ArchivalDateTime?: null|\DateTimeInterface,
25+
* ArchivalDateTime?: null|\DateTimeImmutable,
2626
* ArchivalReason?: null|string,
2727
* ArchivalBackupArn?: null|string,
2828
* } $input
@@ -44,7 +44,7 @@ public function getArchivalBackupArn(): ?string
4444
return $this->ArchivalBackupArn;
4545
}
4646

47-
public function getArchivalDateTime(): ?\DateTimeInterface
47+
public function getArchivalDateTime(): ?\DateTimeImmutable
4848
{
4949
return $this->ArchivalDateTime;
5050
}

src/ValueObject/BillingModeSummary.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class BillingModeSummary
2020
/**
2121
* @param array{
2222
* BillingMode?: null|\AsyncAws\DynamoDb\Enum\BillingMode::*,
23-
* LastUpdateToPayPerRequestDateTime?: null|\DateTimeInterface,
23+
* LastUpdateToPayPerRequestDateTime?: null|\DateTimeImmutable,
2424
* } $input
2525
*/
2626
public function __construct(array $input)
@@ -42,7 +42,7 @@ public function getBillingMode(): ?string
4242
return $this->BillingMode;
4343
}
4444

45-
public function getLastUpdateToPayPerRequestDateTime(): ?\DateTimeInterface
45+
public function getLastUpdateToPayPerRequestDateTime(): ?\DateTimeImmutable
4646
{
4747
return $this->LastUpdateToPayPerRequestDateTime;
4848
}

src/ValueObject/ProvisionedThroughputDescription.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ class ProvisionedThroughputDescription
3636

3737
/**
3838
* @param array{
39-
* LastIncreaseDateTime?: null|\DateTimeInterface,
40-
* LastDecreaseDateTime?: null|\DateTimeInterface,
39+
* LastIncreaseDateTime?: null|\DateTimeImmutable,
40+
* LastDecreaseDateTime?: null|\DateTimeImmutable,
4141
* NumberOfDecreasesToday?: null|string,
4242
* ReadCapacityUnits?: null|string,
4343
* WriteCapacityUnits?: null|string,
@@ -57,12 +57,12 @@ public static function create($input): self
5757
return $input instanceof self ? $input : new self($input);
5858
}
5959

60-
public function getLastDecreaseDateTime(): ?\DateTimeInterface
60+
public function getLastDecreaseDateTime(): ?\DateTimeImmutable
6161
{
6262
return $this->LastDecreaseDateTime;
6363
}
6464

65-
public function getLastIncreaseDateTime(): ?\DateTimeInterface
65+
public function getLastIncreaseDateTime(): ?\DateTimeImmutable
6666
{
6767
return $this->LastIncreaseDateTime;
6868
}

src/ValueObject/RestoreSummary.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class RestoreSummary
2828
* @param array{
2929
* SourceBackupArn?: null|string,
3030
* SourceTableArn?: null|string,
31-
* RestoreDateTime: \DateTimeInterface,
31+
* RestoreDateTime: \DateTimeImmutable,
3232
* RestoreInProgress: bool,
3333
* } $input
3434
*/
@@ -45,7 +45,7 @@ public static function create($input): self
4545
return $input instanceof self ? $input : new self($input);
4646
}
4747

48-
public function getRestoreDateTime(): \DateTimeInterface
48+
public function getRestoreDateTime(): \DateTimeImmutable
4949
{
5050
return $this->RestoreDateTime;
5151
}

src/ValueObject/SSEDescription.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class SSEDescription
3535
* Status?: null|\AsyncAws\DynamoDb\Enum\SSEStatus::*,
3636
* SSEType?: null|\AsyncAws\DynamoDb\Enum\SSEType::*,
3737
* KMSMasterKeyArn?: null|string,
38-
* InaccessibleEncryptionDateTime?: null|\DateTimeInterface,
38+
* InaccessibleEncryptionDateTime?: null|\DateTimeImmutable,
3939
* } $input
4040
*/
4141
public function __construct(array $input)
@@ -51,7 +51,7 @@ public static function create($input): self
5151
return $input instanceof self ? $input : new self($input);
5252
}
5353

54-
public function getInaccessibleEncryptionDateTime(): ?\DateTimeInterface
54+
public function getInaccessibleEncryptionDateTime(): ?\DateTimeImmutable
5555
{
5656
return $this->InaccessibleEncryptionDateTime;
5757
}

src/ValueObject/TableDescription.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class TableDescription
128128
* TableName?: null|string,
129129
* KeySchema?: null|\AsyncAws\DynamoDb\ValueObject\KeySchemaElement[],
130130
* TableStatus?: null|\AsyncAws\DynamoDb\Enum\TableStatus::*,
131-
* CreationDateTime?: null|\DateTimeInterface,
131+
* CreationDateTime?: null|\DateTimeImmutable,
132132
* ProvisionedThroughput?: null|\AsyncAws\DynamoDb\ValueObject\ProvisionedThroughputDescription|array,
133133
* TableSizeBytes?: null|string,
134134
* ItemCount?: null|string,
@@ -195,7 +195,7 @@ public function getBillingModeSummary(): ?BillingModeSummary
195195
return $this->BillingModeSummary;
196196
}
197197

198-
public function getCreationDateTime(): ?\DateTimeInterface
198+
public function getCreationDateTime(): ?\DateTimeImmutable
199199
{
200200
return $this->CreationDateTime;
201201
}

0 commit comments

Comments
 (0)