Skip to content

Commit a03de67

Browse files
authored
Uncapitalize objects's property (#925)
* Uncapitalize objects's property * Add changelog * Improve lowercase naming * Rename sseKms to sseKms * Normalize Methods and Classes
1 parent 9c41656 commit a03de67

File tree

70 files changed

+1178
-1177
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1178
-1177
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Added
66

7+
- Changed case of object's properties to camelCase.
78
- Added documentation in class's headers.
89

910
## 1.0.1

src/Input/BatchGetItemInput.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ final class BatchGetItemInput extends Input
2222
*
2323
* @var array<string, KeysAndAttributes>|null
2424
*/
25-
private $RequestItems;
25+
private $requestItems;
2626

2727
/**
2828
* @var null|ReturnConsumedCapacity::*
2929
*/
30-
private $ReturnConsumedCapacity;
30+
private $returnConsumedCapacity;
3131

3232
/**
3333
* @param array{
@@ -39,12 +39,12 @@ final class BatchGetItemInput extends Input
3939
public function __construct(array $input = [])
4040
{
4141
if (isset($input['RequestItems'])) {
42-
$this->RequestItems = [];
42+
$this->requestItems = [];
4343
foreach ($input['RequestItems'] as $key => $item) {
44-
$this->RequestItems[$key] = KeysAndAttributes::create($item);
44+
$this->requestItems[$key] = KeysAndAttributes::create($item);
4545
}
4646
}
47-
$this->ReturnConsumedCapacity = $input['ReturnConsumedCapacity'] ?? null;
47+
$this->returnConsumedCapacity = $input['ReturnConsumedCapacity'] ?? null;
4848
parent::__construct($input);
4949
}
5050

@@ -58,15 +58,15 @@ public static function create($input): self
5858
*/
5959
public function getRequestItems(): array
6060
{
61-
return $this->RequestItems ?? [];
61+
return $this->requestItems ?? [];
6262
}
6363

6464
/**
6565
* @return ReturnConsumedCapacity::*|null
6666
*/
6767
public function getReturnConsumedCapacity(): ?string
6868
{
69-
return $this->ReturnConsumedCapacity;
69+
return $this->returnConsumedCapacity;
7070
}
7171

7272
/**
@@ -99,7 +99,7 @@ public function request(): Request
9999
*/
100100
public function setRequestItems(array $value): self
101101
{
102-
$this->RequestItems = $value;
102+
$this->requestItems = $value;
103103

104104
return $this;
105105
}
@@ -109,15 +109,15 @@ public function setRequestItems(array $value): self
109109
*/
110110
public function setReturnConsumedCapacity(?string $value): self
111111
{
112-
$this->ReturnConsumedCapacity = $value;
112+
$this->returnConsumedCapacity = $value;
113113

114114
return $this;
115115
}
116116

117117
private function requestBody(): array
118118
{
119119
$payload = [];
120-
if (null === $v = $this->RequestItems) {
120+
if (null === $v = $this->requestItems) {
121121
throw new InvalidArgument(sprintf('Missing parameter "RequestItems" for "%s". The value cannot be null.', __CLASS__));
122122
}
123123

@@ -129,7 +129,7 @@ private function requestBody(): array
129129
$payload['RequestItems'][$name] = $mv->requestBody();
130130
}
131131
}
132-
if (null !== $v = $this->ReturnConsumedCapacity) {
132+
if (null !== $v = $this->returnConsumedCapacity) {
133133
if (!ReturnConsumedCapacity::exists($v)) {
134134
throw new InvalidArgument(sprintf('Invalid parameter "ReturnConsumedCapacity" for "%s". The value "%s" is not a valid "ReturnConsumedCapacity".', __CLASS__, $v));
135135
}

src/Input/BatchWriteItemInput.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ final class BatchWriteItemInput extends Input
2323
*
2424
* @var array<string, WriteRequest[]>|null
2525
*/
26-
private $RequestItems;
26+
private $requestItems;
2727

2828
/**
2929
* @var null|ReturnConsumedCapacity::*
3030
*/
31-
private $ReturnConsumedCapacity;
31+
private $returnConsumedCapacity;
3232

3333
/**
3434
* Determines whether item collection metrics are returned. If set to `SIZE`, the response includes statistics about
@@ -37,7 +37,7 @@ final class BatchWriteItemInput extends Input
3737
*
3838
* @var null|ReturnItemCollectionMetrics::*
3939
*/
40-
private $ReturnItemCollectionMetrics;
40+
private $returnItemCollectionMetrics;
4141

4242
/**
4343
* @param array{
@@ -50,13 +50,13 @@ final class BatchWriteItemInput extends Input
5050
public function __construct(array $input = [])
5151
{
5252
if (isset($input['RequestItems'])) {
53-
$this->RequestItems = [];
53+
$this->requestItems = [];
5454
foreach ($input['RequestItems'] ?? [] as $key => $item) {
55-
$this->RequestItems[$key] = array_map([WriteRequest::class, 'create'], $item);
55+
$this->requestItems[$key] = array_map([WriteRequest::class, 'create'], $item);
5656
}
5757
}
58-
$this->ReturnConsumedCapacity = $input['ReturnConsumedCapacity'] ?? null;
59-
$this->ReturnItemCollectionMetrics = $input['ReturnItemCollectionMetrics'] ?? null;
58+
$this->returnConsumedCapacity = $input['ReturnConsumedCapacity'] ?? null;
59+
$this->returnItemCollectionMetrics = $input['ReturnItemCollectionMetrics'] ?? null;
6060
parent::__construct($input);
6161
}
6262

@@ -70,23 +70,23 @@ public static function create($input): self
7070
*/
7171
public function getRequestItems(): array
7272
{
73-
return $this->RequestItems ?? [];
73+
return $this->requestItems ?? [];
7474
}
7575

7676
/**
7777
* @return ReturnConsumedCapacity::*|null
7878
*/
7979
public function getReturnConsumedCapacity(): ?string
8080
{
81-
return $this->ReturnConsumedCapacity;
81+
return $this->returnConsumedCapacity;
8282
}
8383

8484
/**
8585
* @return ReturnItemCollectionMetrics::*|null
8686
*/
8787
public function getReturnItemCollectionMetrics(): ?string
8888
{
89-
return $this->ReturnItemCollectionMetrics;
89+
return $this->returnItemCollectionMetrics;
9090
}
9191

9292
/**
@@ -119,7 +119,7 @@ public function request(): Request
119119
*/
120120
public function setRequestItems(array $value): self
121121
{
122-
$this->RequestItems = $value;
122+
$this->requestItems = $value;
123123

124124
return $this;
125125
}
@@ -129,7 +129,7 @@ public function setRequestItems(array $value): self
129129
*/
130130
public function setReturnConsumedCapacity(?string $value): self
131131
{
132-
$this->ReturnConsumedCapacity = $value;
132+
$this->returnConsumedCapacity = $value;
133133

134134
return $this;
135135
}
@@ -139,15 +139,15 @@ public function setReturnConsumedCapacity(?string $value): self
139139
*/
140140
public function setReturnItemCollectionMetrics(?string $value): self
141141
{
142-
$this->ReturnItemCollectionMetrics = $value;
142+
$this->returnItemCollectionMetrics = $value;
143143

144144
return $this;
145145
}
146146

147147
private function requestBody(): array
148148
{
149149
$payload = [];
150-
if (null === $v = $this->RequestItems) {
150+
if (null === $v = $this->requestItems) {
151151
throw new InvalidArgument(sprintf('Missing parameter "RequestItems" for "%s". The value cannot be null.', __CLASS__));
152152
}
153153

@@ -164,13 +164,13 @@ private function requestBody(): array
164164
}
165165
}
166166
}
167-
if (null !== $v = $this->ReturnConsumedCapacity) {
167+
if (null !== $v = $this->returnConsumedCapacity) {
168168
if (!ReturnConsumedCapacity::exists($v)) {
169169
throw new InvalidArgument(sprintf('Invalid parameter "ReturnConsumedCapacity" for "%s". The value "%s" is not a valid "ReturnConsumedCapacity".', __CLASS__, $v));
170170
}
171171
$payload['ReturnConsumedCapacity'] = $v;
172172
}
173-
if (null !== $v = $this->ReturnItemCollectionMetrics) {
173+
if (null !== $v = $this->returnItemCollectionMetrics) {
174174
if (!ReturnItemCollectionMetrics::exists($v)) {
175175
throw new InvalidArgument(sprintf('Invalid parameter "ReturnItemCollectionMetrics" for "%s". The value "%s" is not a valid "ReturnItemCollectionMetrics".', __CLASS__, $v));
176176
}

0 commit comments

Comments
 (0)