-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,6 +123,20 @@ final class TypeMeta | |
*/ | ||
private $isQualified; | ||
|
||
/** | ||
* The soap-enc array-type information | ||
* | ||
* @var array{type: non-empty-string, itemType: non-empty-string, namespace: non-empty-string}|null | ||
*/ | ||
private $arrayType; | ||
|
||
/** | ||
* The name of the internal array nodes for soap-enc arrays | ||
* | ||
* @var string|null | ||
*/ | ||
private $arrayNodeName; | ||
|
||
/** | ||
* @return Option<bool> | ||
*/ | ||
|
@@ -484,4 +498,42 @@ public function withIsQualified(?bool $qualified): self | |
|
||
return $new; | ||
} | ||
|
||
/** | ||
* @return Option<array{type: non-empty-string, itemType: non-empty-string, namespace: non-empty-string}> | ||
*/ | ||
public function arrayType(): Option | ||
{ | ||
return from_nullable($this->arrayType); | ||
} | ||
|
||
public function withArrayType(?array $arrayType): self | ||
{ | ||
$new = clone $this; | ||
$new->arrayType = optional( | ||
shape([ | ||
'type' => non_empty_string(), | ||
'itemType' => non_empty_string(), | ||
'namespace' => non_empty_string(), | ||
], true) | ||
)->coerce($arrayType); | ||
Check failure on line 519 in src/Metadata/Model/TypeMeta.php GitHub Actions / PHP 8.1 @ ubuntu-latestMissingThrowsDocblock
Check failure on line 519 in src/Metadata/Model/TypeMeta.php GitHub Actions / PHP 8.2 @ ubuntu-latestMissingThrowsDocblock
Check failure on line 519 in src/Metadata/Model/TypeMeta.php GitHub Actions / PHP 8.3 @ ubuntu-latestMissingThrowsDocblock
|
||
|
||
return $new; | ||
} | ||
|
||
/** | ||
* @return Option<string> | ||
*/ | ||
public function arrayNodeName(): Option | ||
{ | ||
return from_nullable($this->arrayNodeName); | ||
} | ||
|
||
public function withArrayNodeName(?string $arrayNodeName): self | ||
{ | ||
$new = clone $this; | ||
$new->arrayNodeName = $arrayNodeName; | ||
|
||
return $new; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters