Skip to content

Commit 29b3644

Browse files
authored
Fix the generated param types for maps and lists (#1466)
The constructor are not enforcing the usage of value objects. They also support passing an array accepted by the create method.
1 parent ad15db2 commit 29b3644

File tree

6 files changed

+30
-30
lines changed

6 files changed

+30
-30
lines changed

src/CodeBuildClient.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ public function batchGetBuilds($input): BatchGetBuildsOutput
6464
*
6565
* @param array{
6666
* projectName: string,
67-
* secondarySourcesOverride?: ProjectSource[],
68-
* secondarySourcesVersionOverride?: ProjectSourceVersion[],
67+
* secondarySourcesOverride?: array<ProjectSource|array>,
68+
* secondarySourcesVersionOverride?: array<ProjectSourceVersion|array>,
6969
* sourceVersion?: string,
7070
* artifactsOverride?: ProjectArtifacts|array,
71-
* secondaryArtifactsOverride?: ProjectArtifacts[],
72-
* environmentVariablesOverride?: EnvironmentVariable[],
71+
* secondaryArtifactsOverride?: array<ProjectArtifacts|array>,
72+
* environmentVariablesOverride?: array<EnvironmentVariable|array>,
7373
* sourceTypeOverride?: SourceType::*,
7474
* sourceLocationOverride?: string,
7575
* sourceAuthOverride?: SourceAuth|array,

src/Input/StartBuildInput.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -322,12 +322,12 @@ final class StartBuildInput extends Input
322322
/**
323323
* @param array{
324324
* projectName?: string,
325-
* secondarySourcesOverride?: ProjectSource[],
326-
* secondarySourcesVersionOverride?: ProjectSourceVersion[],
325+
* secondarySourcesOverride?: array<ProjectSource|array>,
326+
* secondarySourcesVersionOverride?: array<ProjectSourceVersion|array>,
327327
* sourceVersion?: string,
328328
* artifactsOverride?: ProjectArtifacts|array,
329-
* secondaryArtifactsOverride?: ProjectArtifacts[],
330-
* environmentVariablesOverride?: EnvironmentVariable[],
329+
* secondaryArtifactsOverride?: array<ProjectArtifacts|array>,
330+
* environmentVariablesOverride?: array<EnvironmentVariable|array>,
331331
* sourceTypeOverride?: SourceType::*,
332332
* sourceLocationOverride?: string,
333333
* sourceAuthOverride?: SourceAuth|array,
@@ -394,12 +394,12 @@ public function __construct(array $input = [])
394394
/**
395395
* @param array{
396396
* projectName?: string,
397-
* secondarySourcesOverride?: ProjectSource[],
398-
* secondarySourcesVersionOverride?: ProjectSourceVersion[],
397+
* secondarySourcesOverride?: array<ProjectSource|array>,
398+
* secondarySourcesVersionOverride?: array<ProjectSourceVersion|array>,
399399
* sourceVersion?: string,
400400
* artifactsOverride?: ProjectArtifacts|array,
401-
* secondaryArtifactsOverride?: ProjectArtifacts[],
402-
* environmentVariablesOverride?: EnvironmentVariable[],
401+
* secondaryArtifactsOverride?: array<ProjectArtifacts|array>,
402+
* environmentVariablesOverride?: array<EnvironmentVariable|array>,
403403
* sourceTypeOverride?: SourceType::*,
404404
* sourceLocationOverride?: string,
405405
* sourceAuthOverride?: SourceAuth|array,

src/ValueObject/Build.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,12 @@ final class Build
229229
* sourceVersion?: null|string,
230230
* resolvedSourceVersion?: null|string,
231231
* projectName?: null|string,
232-
* phases?: null|BuildPhase[],
232+
* phases?: null|array<BuildPhase|array>,
233233
* source?: null|ProjectSource|array,
234-
* secondarySources?: null|ProjectSource[],
235-
* secondarySourceVersions?: null|ProjectSourceVersion[],
234+
* secondarySources?: null|array<ProjectSource|array>,
235+
* secondarySourceVersions?: null|array<ProjectSourceVersion|array>,
236236
* artifacts?: null|BuildArtifacts|array,
237-
* secondaryArtifacts?: null|BuildArtifacts[],
237+
* secondaryArtifacts?: null|array<BuildArtifacts|array>,
238238
* cache?: null|ProjectCache|array,
239239
* environment?: null|ProjectEnvironment|array,
240240
* serviceRole?: null|string,
@@ -246,9 +246,9 @@ final class Build
246246
* vpcConfig?: null|VpcConfig|array,
247247
* networkInterface?: null|NetworkInterface|array,
248248
* encryptionKey?: null|string,
249-
* exportedEnvironmentVariables?: null|ExportedEnvironmentVariable[],
249+
* exportedEnvironmentVariables?: null|array<ExportedEnvironmentVariable|array>,
250250
* reportArns?: null|string[],
251-
* fileSystemLocations?: null|ProjectFileSystemLocation[],
251+
* fileSystemLocations?: null|array<ProjectFileSystemLocation|array>,
252252
* debugSession?: null|DebugSession|array,
253253
* buildBatchArn?: null|string,
254254
* } $input
@@ -301,12 +301,12 @@ public function __construct(array $input)
301301
* sourceVersion?: null|string,
302302
* resolvedSourceVersion?: null|string,
303303
* projectName?: null|string,
304-
* phases?: null|BuildPhase[],
304+
* phases?: null|array<BuildPhase|array>,
305305
* source?: null|ProjectSource|array,
306-
* secondarySources?: null|ProjectSource[],
307-
* secondarySourceVersions?: null|ProjectSourceVersion[],
306+
* secondarySources?: null|array<ProjectSource|array>,
307+
* secondarySourceVersions?: null|array<ProjectSourceVersion|array>,
308308
* artifacts?: null|BuildArtifacts|array,
309-
* secondaryArtifacts?: null|BuildArtifacts[],
309+
* secondaryArtifacts?: null|array<BuildArtifacts|array>,
310310
* cache?: null|ProjectCache|array,
311311
* environment?: null|ProjectEnvironment|array,
312312
* serviceRole?: null|string,
@@ -318,9 +318,9 @@ public function __construct(array $input)
318318
* vpcConfig?: null|VpcConfig|array,
319319
* networkInterface?: null|NetworkInterface|array,
320320
* encryptionKey?: null|string,
321-
* exportedEnvironmentVariables?: null|ExportedEnvironmentVariable[],
321+
* exportedEnvironmentVariables?: null|array<ExportedEnvironmentVariable|array>,
322322
* reportArns?: null|string[],
323-
* fileSystemLocations?: null|ProjectFileSystemLocation[],
323+
* fileSystemLocations?: null|array<ProjectFileSystemLocation|array>,
324324
* debugSession?: null|DebugSession|array,
325325
* buildBatchArn?: null|string,
326326
* }|Build $input

src/ValueObject/BuildPhase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ final class BuildPhase
100100
* startTime?: null|\DateTimeImmutable,
101101
* endTime?: null|\DateTimeImmutable,
102102
* durationInSeconds?: null|string,
103-
* contexts?: null|PhaseContext[],
103+
* contexts?: null|array<PhaseContext|array>,
104104
* } $input
105105
*/
106106
public function __construct(array $input)
@@ -120,7 +120,7 @@ public function __construct(array $input)
120120
* startTime?: null|\DateTimeImmutable,
121121
* endTime?: null|\DateTimeImmutable,
122122
* durationInSeconds?: null|string,
123-
* contexts?: null|PhaseContext[],
123+
* contexts?: null|array<PhaseContext|array>,
124124
* }|BuildPhase $input
125125
*/
126126
public static function create($input): self

src/ValueObject/ProjectCache.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ final class ProjectCache
6666
* @param array{
6767
* type: CacheType::*,
6868
* location?: null|string,
69-
* modes?: null|list<CacheMode::*>,
69+
* modes?: null|array<CacheMode::*>,
7070
* } $input
7171
*/
7272
public function __construct(array $input)
@@ -80,7 +80,7 @@ public function __construct(array $input)
8080
* @param array{
8181
* type: CacheType::*,
8282
* location?: null|string,
83-
* modes?: null|list<CacheMode::*>,
83+
* modes?: null|array<CacheMode::*>,
8484
* }|ProjectCache $input
8585
*/
8686
public static function create($input): self

src/ValueObject/ProjectEnvironment.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ final class ProjectEnvironment
132132
* type: EnvironmentType::*,
133133
* image: string,
134134
* computeType: ComputeType::*,
135-
* environmentVariables?: null|EnvironmentVariable[],
135+
* environmentVariables?: null|array<EnvironmentVariable|array>,
136136
* privilegedMode?: null|bool,
137137
* certificate?: null|string,
138138
* registryCredential?: null|RegistryCredential|array,
@@ -156,7 +156,7 @@ public function __construct(array $input)
156156
* type: EnvironmentType::*,
157157
* image: string,
158158
* computeType: ComputeType::*,
159-
* environmentVariables?: null|EnvironmentVariable[],
159+
* environmentVariables?: null|array<EnvironmentVariable|array>,
160160
* privilegedMode?: null|bool,
161161
* certificate?: null|string,
162162
* registryCredential?: null|RegistryCredential|array,

0 commit comments

Comments
 (0)