Skip to content

Commit

Permalink
CS
Browse files Browse the repository at this point in the history
  • Loading branch information
DerManoMann committed Aug 30, 2023
1 parent e6ae89d commit 3da8768
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
3 changes: 2 additions & 1 deletion Examples/using-links-php81/PullRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
class PullRequest
{
public function __construct(
#[OAT\Property()] public State $state
#[OAT\Property()]
public State $state
) {
}

Expand Down
12 changes: 8 additions & 4 deletions Examples/using-links-php81/RepositoriesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,14 @@ public function getRepository()
]
#[OAT\Link(link: 'RepositoryPullRequests', operationId: 'getPullRequestsByRepository', parameters: ['username' => '$response.body#/owner/username', 'slug' => '$response.body#/slug'])]
public function getPullRequestsByRepository(
#[OAT\PathParameter()] string $username,
#[OAT\PathParameter()] string $slug,
#[OAT\PathParameter()] State $state,
#[OAT\QueryParameter()] ?string $label
#[OAT\PathParameter()]
string $username,
#[OAT\PathParameter()]
string $slug,
#[OAT\PathParameter()]
State $state,
#[OAT\QueryParameter()]
?string $label
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/Analysis.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ public function unmerged(): Analysis
* Split the annotation into two analysis.
* One with annotations that are merged and one with annotations that are not merged.
*
* @return object {merged: Analysis, unmerged: Analysis}
* @return \stdClass {merged: Analysis, unmerged: Analysis}
*/
public function split()
{
Expand Down
15 changes: 10 additions & 5 deletions tests/Fixtures/Apis/Attributes/basic.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,14 @@ class Product implements ProductInterface
public $id;

public function __construct(
#[OAT\Property()] public int $quantity,
#[OAT\Property(default: null, example: null)] public ?string $brand,
#[OAT\Property()] public Colour $colour,
#[OAT\Property(type: 'string')] public \DateTimeInterface $releasedAt,
#[OAT\Property()]
public int $quantity,
#[OAT\Property(default: null, example: null)]
public ?string $brand,
#[OAT\Property()]
public Colour $colour,
#[OAT\Property(type: 'string')]
public \DateTimeInterface $releasedAt,
) {
}
}
Expand All @@ -118,7 +122,8 @@ class ProductController
#[OAT\Response(response: 401, description: 'oops')]
#[OAF\CustomAttachable(value: 'operation')]
public function getProduct(
#[OAT\PathParameter] ?int $product_id
#[OAT\PathParameter]
?int $product_id
) {
}

Expand Down

0 comments on commit 3da8768

Please sign in to comment.