Skip to content

Commit 4b680eb

Browse files
committed
[php-nextgen]: Use absolute types in phpdocs
1 parent b7f8a44 commit 4b680eb

32 files changed

Lines changed: 1155 additions & 1155 deletions

modules/openapi-generator/src/main/resources/php-nextgen/ApiException.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class ApiException extends Exception
3333
/**
3434
* The HTTP body of the server response either as Json or string.
3535
*
36-
* @var stdClass|string|null
36+
* @var \stdClass|string|null
3737
*/
3838
protected stdClass|string|null $responseBody;
3939

modules/openapi-generator/src/main/resources/php-nextgen/Configuration.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ class Configuration
295295
*
296296
* @param string $userAgent the user agent of the api client
297297
*
298-
* @throws InvalidArgumentException
298+
* @throws \InvalidArgumentException
299299
* @return $this
300300
*/
301301
public function setUserAgent(string $userAgent): static

modules/openapi-generator/src/main/resources/php-nextgen/ObjectSerializer.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ class ObjectSerializer
330330
* If it's a datetime object, format it in ISO8601
331331
* If it's a boolean, convert it to "true" or "false".
332332
*
333-
* @param string|bool|DateTime $value the value of the parameter
333+
* @param string|bool|\DateTime $value the value of the parameter
334334
*
335335
* @return string the header string
336336
*/
@@ -505,7 +505,7 @@ class ObjectSerializer
505505
}
506506
}
507507

508-
/** @var ModelInterface $instance */
508+
/** @var \{{modelPackage}}\ModelInterface $instance */
509509
$instance = new $class();
510510
foreach ($instance::openAPITypes() as $property => $type) {
511511
$propertySetter = $instance::setters()[$property];

modules/openapi-generator/src/main/resources/php-nextgen/api.mustache

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@ use {{invokerPackage}}\ObjectSerializer;
4545
{{#operations}}class {{classname}}
4646
{
4747
/**
48-
* @var ClientInterface
48+
* @var \GuzzleHttp\ClientInterface
4949
*/
5050
protected ClientInterface $client;
5151
5252
/**
53-
* @var Configuration
53+
* @var \{{invokerPackage}}\Configuration
5454
*/
5555
protected Configuration $config;
5656

5757
/**
58-
* @var HeaderSelector
58+
* @var \{{invokerPackage}}\HeaderSelector
5959
*/
6060
protected HeaderSelector $headerSelector;
6161

@@ -74,9 +74,9 @@ use {{invokerPackage}}\ObjectSerializer;
7474
];
7575

7676
/**
77-
* @param ClientInterface|null $client
78-
* @param Configuration|null $config
79-
* @param HeaderSelector|null $selector
77+
* @param \GuzzleHttp\ClientInterface|null $client
78+
* @param \{{invokerPackage}}\Configuration|null $config
79+
* @param \{{invokerPackage}}\HeaderSelector|null $selector
8080
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
8181
*/
8282
public function __construct(
@@ -112,7 +112,7 @@ use {{invokerPackage}}\ObjectSerializer;
112112
}
113113

114114
/**
115-
* @return Configuration
115+
* @return \{{invokerPackage}}\Configuration
116116
*/
117117
public function getConfig(): Configuration
118118
{
@@ -166,8 +166,8 @@ use {{invokerPackage}}\ObjectSerializer;
166166
{{/servers}}
167167
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['{{{operationId}}}'] to see the possible values for this operation
168168
*
169-
* @throws ApiException on non-2xx response or if the response body is not in the expected format
170-
* @throws InvalidArgumentException
169+
* @throws \{{invokerPackage}}\ApiException on non-2xx response or if the response body is not in the expected format
170+
* @throws \InvalidArgumentException
171171
* @return {{{exts.x-php-doc-return-type}}}
172172
{{#isDeprecated}}
173173
* @deprecated
@@ -241,8 +241,8 @@ use {{invokerPackage}}\ObjectSerializer;
241241
{{/servers}}
242242
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['{{{operationId}}}'] to see the possible values for this operation
243243
*
244-
* @throws ApiException on non-2xx response or if the response body is not in the expected format
245-
* @throws InvalidArgumentException
244+
* @throws \{{invokerPackage}}\ApiException on non-2xx response or if the response body is not in the expected format
245+
* @throws \InvalidArgumentException
246246
* @return array of {{#returnType}}{{#responses}}{{#dataType}}{{^-first}}|{{/-first}}{{/dataType}}{{{dataType}}}{{/responses}}{{/returnType}}{{^returnType}}null{{/returnType}}, HTTP status code, HTTP response headers (array of strings)
247247
{{#isDeprecated}}
248248
* @deprecated
@@ -421,8 +421,8 @@ use {{invokerPackage}}\ObjectSerializer;
421421
{{/servers}}
422422
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['{{{operationId}}}'] to see the possible values for this operation
423423
*
424-
* @throws InvalidArgumentException
425-
* @return PromiseInterface
424+
* @throws \InvalidArgumentException
425+
* @return \GuzzleHttp\Promise\PromiseInterface
426426
{{#isDeprecated}}
427427
* @deprecated
428428
{{/isDeprecated}}
@@ -499,8 +499,8 @@ use {{invokerPackage}}\ObjectSerializer;
499499
{{/servers}}
500500
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['{{{operationId}}}'] to see the possible values for this operation
501501
*
502-
* @throws InvalidArgumentException
503-
* @return PromiseInterface
502+
* @throws \InvalidArgumentException
503+
* @return \GuzzleHttp\Promise\PromiseInterface
504504
{{#isDeprecated}}
505505
* @deprecated
506506
{{/isDeprecated}}
@@ -605,7 +605,7 @@ use {{invokerPackage}}\ObjectSerializer;
605605
{{/servers}}
606606
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['{{{operationId}}}'] to see the possible values for this operation
607607
*
608-
* @throws InvalidArgumentException
608+
* @throws \InvalidArgumentException
609609
* @return \GuzzleHttp\Psr7\Request
610610
{{#isDeprecated}}
611611
* @deprecated

samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,17 @@
5454
class AuthApi
5555
{
5656
/**
57-
* @var ClientInterface
57+
* @var \GuzzleHttp\ClientInterface
5858
*/
5959
protected ClientInterface $client;
6060

6161
/**
62-
* @var Configuration
62+
* @var \OpenAPI\Client\Configuration
6363
*/
6464
protected Configuration $config;
6565

6666
/**
67-
* @var HeaderSelector
67+
* @var \OpenAPI\Client\HeaderSelector
6868
*/
6969
protected HeaderSelector $headerSelector;
7070

@@ -84,9 +84,9 @@ class AuthApi
8484
];
8585

8686
/**
87-
* @param ClientInterface|null $client
88-
* @param Configuration|null $config
89-
* @param HeaderSelector|null $selector
87+
* @param \GuzzleHttp\ClientInterface|null $client
88+
* @param \OpenAPI\Client\Configuration|null $config
89+
* @param \OpenAPI\Client\HeaderSelector|null $selector
9090
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
9191
*/
9292
public function __construct(
@@ -122,7 +122,7 @@ public function getHostIndex(): int
122122
}
123123

124124
/**
125-
* @return Configuration
125+
* @return \OpenAPI\Client\Configuration
126126
*/
127127
public function getConfig(): Configuration
128128
{
@@ -136,8 +136,8 @@ public function getConfig(): Configuration
136136
*
137137
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testAuthHttpBasic'] to see the possible values for this operation
138138
*
139-
* @throws ApiException on non-2xx response or if the response body is not in the expected format
140-
* @throws InvalidArgumentException
139+
* @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format
140+
* @throws \InvalidArgumentException
141141
* @return string
142142
*/
143143
public function testAuthHttpBasic(
@@ -155,8 +155,8 @@ public function testAuthHttpBasic(
155155
*
156156
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testAuthHttpBasic'] to see the possible values for this operation
157157
*
158-
* @throws ApiException on non-2xx response or if the response body is not in the expected format
159-
* @throws InvalidArgumentException
158+
* @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format
159+
* @throws \InvalidArgumentException
160160
* @return array of string, HTTP status code, HTTP response headers (array of strings)
161161
*/
162162
public function testAuthHttpBasicWithHttpInfo(
@@ -237,8 +237,8 @@ public function testAuthHttpBasicWithHttpInfo(
237237
*
238238
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testAuthHttpBasic'] to see the possible values for this operation
239239
*
240-
* @throws InvalidArgumentException
241-
* @return PromiseInterface
240+
* @throws \InvalidArgumentException
241+
* @return \GuzzleHttp\Promise\PromiseInterface
242242
*/
243243
public function testAuthHttpBasicAsync(
244244
string $contentType = self::contentTypes['testAuthHttpBasic'][0]
@@ -259,8 +259,8 @@ function ($response) {
259259
*
260260
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testAuthHttpBasic'] to see the possible values for this operation
261261
*
262-
* @throws InvalidArgumentException
263-
* @return PromiseInterface
262+
* @throws \InvalidArgumentException
263+
* @return \GuzzleHttp\Promise\PromiseInterface
264264
*/
265265
public function testAuthHttpBasicAsyncWithHttpInfo(
266266
string $contentType = self::contentTypes['testAuthHttpBasic'][0]
@@ -310,7 +310,7 @@ function ($exception) {
310310
*
311311
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testAuthHttpBasic'] to see the possible values for this operation
312312
*
313-
* @throws InvalidArgumentException
313+
* @throws \InvalidArgumentException
314314
* @return \GuzzleHttp\Psr7\Request
315315
*/
316316
public function testAuthHttpBasicRequest(
@@ -394,8 +394,8 @@ public function testAuthHttpBasicRequest(
394394
*
395395
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testAuthHttpBearer'] to see the possible values for this operation
396396
*
397-
* @throws ApiException on non-2xx response or if the response body is not in the expected format
398-
* @throws InvalidArgumentException
397+
* @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format
398+
* @throws \InvalidArgumentException
399399
* @return string
400400
*/
401401
public function testAuthHttpBearer(
@@ -413,8 +413,8 @@ public function testAuthHttpBearer(
413413
*
414414
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testAuthHttpBearer'] to see the possible values for this operation
415415
*
416-
* @throws ApiException on non-2xx response or if the response body is not in the expected format
417-
* @throws InvalidArgumentException
416+
* @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format
417+
* @throws \InvalidArgumentException
418418
* @return array of string, HTTP status code, HTTP response headers (array of strings)
419419
*/
420420
public function testAuthHttpBearerWithHttpInfo(
@@ -495,8 +495,8 @@ public function testAuthHttpBearerWithHttpInfo(
495495
*
496496
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testAuthHttpBearer'] to see the possible values for this operation
497497
*
498-
* @throws InvalidArgumentException
499-
* @return PromiseInterface
498+
* @throws \InvalidArgumentException
499+
* @return \GuzzleHttp\Promise\PromiseInterface
500500
*/
501501
public function testAuthHttpBearerAsync(
502502
string $contentType = self::contentTypes['testAuthHttpBearer'][0]
@@ -517,8 +517,8 @@ function ($response) {
517517
*
518518
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testAuthHttpBearer'] to see the possible values for this operation
519519
*
520-
* @throws InvalidArgumentException
521-
* @return PromiseInterface
520+
* @throws \InvalidArgumentException
521+
* @return \GuzzleHttp\Promise\PromiseInterface
522522
*/
523523
public function testAuthHttpBearerAsyncWithHttpInfo(
524524
string $contentType = self::contentTypes['testAuthHttpBearer'][0]
@@ -568,7 +568,7 @@ function ($exception) {
568568
*
569569
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testAuthHttpBearer'] to see the possible values for this operation
570570
*
571-
* @throws InvalidArgumentException
571+
* @throws \InvalidArgumentException
572572
* @return \GuzzleHttp\Psr7\Request
573573
*/
574574
public function testAuthHttpBearerRequest(

0 commit comments

Comments
 (0)