Skip to content

Commit f74a4a3

Browse files
authored
Split generators and refactor namespace generation (#168)
* Avoid building the sames classes twice * Split generators * Refactor Helper
1 parent fcfc785 commit f74a4a3

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Result/ListLayerVersionsResponse.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@ protected function populateResult(ResponseInterface $response, HttpClientInterfa
138138
'CompatibleRuntimes' => (function (\SimpleXMLElement $xml): array {
139139
$items = [];
140140
foreach ($xml as $item) {
141-
$items[] = ($v = $item) ? (string) $v : null;
141+
$a = ($v = $item) ? (string) $v : null;
142+
if (null !== $a) {
143+
$items[] = $a;
144+
}
142145
}
143146

144147
return $items;

Result/PublishLayerVersionResponse.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ protected function populateResult(ResponseInterface $response, HttpClientInterfa
133133
$this->CompatibleRuntimes = (function (\SimpleXMLElement $xml): array {
134134
$items = [];
135135
foreach ($xml as $item) {
136-
$items[] = ($v = $item) ? (string) $v : null;
136+
$a = ($v = $item) ? (string) $v : null;
137+
if (null !== $a) {
138+
$items[] = $a;
139+
}
137140
}
138141

139142
return $items;

0 commit comments

Comments
 (0)