diff --git a/Examples/using-links-php81/PullRequest.php b/Examples/using-links-php81/PullRequest.php index aca919c2..8e80bdbd 100644 --- a/Examples/using-links-php81/PullRequest.php +++ b/Examples/using-links-php81/PullRequest.php @@ -8,7 +8,8 @@ class PullRequest { public function __construct( - #[OAT\Property()] public State $state + #[OAT\Property()] + public State $state ) { } diff --git a/Examples/using-links-php81/RepositoriesController.php b/Examples/using-links-php81/RepositoriesController.php index d959acb8..af912f21 100644 --- a/Examples/using-links-php81/RepositoriesController.php +++ b/Examples/using-links-php81/RepositoriesController.php @@ -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 ) { } diff --git a/src/Analysis.php b/src/Analysis.php index dc78b8f3..b3de6b7f 100644 --- a/src/Analysis.php +++ b/src/Analysis.php @@ -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() { diff --git a/tests/Fixtures/Apis/Attributes/basic.php b/tests/Fixtures/Apis/Attributes/basic.php index a94d4320..bd87d777 100644 --- a/tests/Fixtures/Apis/Attributes/basic.php +++ b/tests/Fixtures/Apis/Attributes/basic.php @@ -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, ) { } } @@ -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 ) { }