Skip to content

Commit

Permalink
Generate the phpdoc for the static create method of objects (#1464)
Browse files Browse the repository at this point in the history
  • Loading branch information
stof committed Jun 24, 2023
1 parent 799506e commit c623fa5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Input/PutTraceSegmentsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ public function __construct(array $input = [])
parent::__construct($input);
}

/**
* @param array{
* TraceSegmentDocuments?: string[],
* '@region'?: string|null,
* }|PutTraceSegmentsRequest $input
*/
public static function create($input): self
{
return $input instanceof self ? $input : new self($input);
Expand Down
7 changes: 7 additions & 0 deletions src/ValueObject/UnprocessedTraceSegment.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ public function __construct(array $input)
$this->message = $input['Message'] ?? null;
}

/**
* @param array{
* Id?: null|string,
* ErrorCode?: null|string,
* Message?: null|string,
* }|UnprocessedTraceSegment $input
*/
public static function create($input): self
{
return $input instanceof self ? $input : new self($input);
Expand Down

0 comments on commit c623fa5

Please sign in to comment.